WebView wrap-content

前端 未结 10 2443
我寻月下人不归
我寻月下人不归 2020-12-13 02:26

Is it possible to load a URL in a WebView and resize it to fit the screen? I mean I want to make the WebPage small so that the user doesn\'t need to scroll. Is this possible

10条回答
  •  粉色の甜心
    2020-12-13 02:51

    As mentioned, zooming out too much is not something the user would like cause it'll reduce the legibility of the content.

    I would suggest trying to set the zoom controls, however, I don't know if it'll work in 2.1.

    webview.getSettings().setBuiltInZoomControls(true);
    

    Hope this solves the problem as you now are giving user the control to change the zoom level.

提交回复
热议问题