Webview in Scrollview

后端 未结 6 896
南旧
南旧 2020-11-29 02:40

I have to place WebView into ScrollView. But I have to put some views into the same scrollview before webview. So it looks like this:



        
6条回答
  •  余生分开走
    2020-11-29 03:36

    I know that it's not right to place webview into scrollview, but it seems like I have no other choise.

    Yes you do, because what you want will not work reliably.

    But I have to put some views into the same scrollview before webview.

    Delete the ScrollView. Change the android:layout_height of your WebView to fill_parent. The WebView will fill up all remaining space in the LinearLayout not consumed by the other widgets.

提交回复
热议问题