开发者

How to change WebView Height?

开发者 https://www.devze.com 2023-03-23 23:40 出处:网络
I load in WebView some table from res. These tables 开发者_运维技巧have a different size. How do I change the size of the height of the WebView content?

I load in WebView some table from res. These tables 开发者_运维技巧have a different size. How do I change the size of the height of the WebView content?

I tried:

LayoutParams params = new LayoutParams(LayoutParams.WRAP_CONTENT,
                                LayoutParams.WRAP_CONTENT);
                        myWebView.setLayoutParams(params);

after load content but it doesn't work...


you can change it in layout as

android:layout_height="300dp "


first you can set size your table layout then you set the your webview height

0

精彩评论

暂无评论...
验证码 换一张
取 消