0

私のレイアウト:

<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は表示されません。コードで隠していません。他のすべてのビューは正しく表示されます。1 つのボタンに含まれるボタンをクリックすると、webview が表示されます。webView のコンテンツは文字列から読み込まれます。

何が間違っている可能性がありますか?

4

1 に答える 1

0

WebView には独自の「scrollview」システムがあります。したがって、長い Web ページがある場合、webview は自動的にスクロールを作成するため、既にあるものにスクロールビューを配置するのは論理的ではありません。外に置くだけで問題なく表示されます。

于 2013-06-03T11:13:19.933 に答える