web视图高度不改变后调整字体大小字体大小、视图、不改变、高度

2023-09-07 13:04:13 作者:缺锌缺钙又缺爱

在我的应用程序使用滚动型。这种滚动型包含许多web视图。 我改变的WebView字体大小:

In my application I use a ScrollView. This ScrollView contain many Webview. I change the webview font size:

webView.getSettings().setTextSize(WebSettings.TextSize.LARGER);

后,我再次改变字体大小:

after I change again the font size:

webView.getSettings().setTextSize(WebSettings.TextSize.SMALLER);

字体大小是变化的,但web视图布局高度没有改变。文本较小,有一个大的空间。 有任何方法对这个问题?

The font size is changing, but the webview layout height is not changing. The text is smaller and there are a big space. There are any method to this problem?

推荐答案

您可以使用此:

myWebView.loadUrl("about:blank");