Android - webview cuts off

后端 未结 2 1568
南笙
南笙 2021-01-19 09:47

I currently have a webview that displays a current site. However, it cuts off the side of the page. See the picture below. Is there anyway to fix this? See my c

相关标签:
2条回答
  • 2021-01-19 10:09

    Two possibilities here:

    1. Look if you got padding/margin in your parent view (the tabhost layout).

    2. Add following to your:

    <supports-screens android:smallScreens="true"
          android:normalScreens="true" 
          android:largeScreens="true"
      android:anyDensity="true" />
    
    0 讨论(0)
  • 2021-01-19 10:21

    From your picture it looks like you're also using Tabs. It's likely a result of the embedded webview not knowing its parents bounds properly and taking the width of the screen instead of the tab view.

    You can fix this in a couple of ways, but probably the quickest/dirtiest way would be messing around with the margin of the webview to match that of your tab layout.

    0 讨论(0)
提交回复
热议问题