簡體   English   中英

ScrollView內LinearLayout內的Webview不顯示

[英]Webview inside LinearLayout inside ScrollView doesnt show

我的布局:

<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_margin="20dip"
    android:background="@drawable/feed_bg_newnew"
    android:orientation="vertical" >

    <include
        android:id="@+id/header"
        layout="@layout/info_header" />

    <WebView
        android:id="@+id/myWebView"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_margin="5dip" />

    <include
        android:id="@+id/imgAttachmentsRow"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginLeft="5dip"
        android:layout_marginTop="5dip"
        layout="@layout/attachemnts_thumbs_container"
        android:visibility="invisible" />

    <include
        android:id="@+id/docAttachmentsContainer"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="5dip"
        layout="@layout/document_attachments_thumbs_container"
        android:visibility="invisible" />

    <include
        android:id="@+id/feedItemFooter"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        layout="@layout/feed_row_footer" />


</LinearLayout>

Webview沒有顯示,我也沒有將其隱藏在代碼中。 所有其他視圖正確顯示。 如果我單擊其中一部分包含的按鈕,則將顯示webview。 從字符串加載webView的內容。

有什么事嗎

該webview有它自己的“ scrollview”系統。 因此,當您的網頁較長時,webview會自動創建滾動條,因此為已存在的內容放置滾動條不是邏輯。 只需將其放在外面,它就會顯示正常。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM