How to set WebView as non-fullscreen?

后端 未结 4 2103
野的像风
野的像风 2021-01-05 09:34

I am trying to use a WebView in my Android application. I am creating my webview in code-side (not in XML). My problem is; when I call loadUrl method of webview, the webview

4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-05 10:25

    See my reply and comments on how to show a webview inside an activity in the middle of screen

    Apply LayoutParams to your WebView or to the Layout (i.e. LinearLayout) that's surrounding the WebView, if any, i.e. setLayoutParams(LinearLayout.LayoutParams(200, 200));

提交回复
热议问题