开发者

Android Webview not resizing consistently when data is changed

I am using the same Webview multiple times. When I load html that takes up more space, the webview expands to fit it, but once in 开发者_运维问答awhile, it doesn't shrink back when less content is loaded into it again. How can I make this behavior more consistent?


I just solved this problem, you can call new WebView(context) , then call webview.loadData(..), and add it to container layout every time when you have to reload a new data.

Don't define webview in xml(especially when scrollview is its parent), tried to add webview dynamically in code.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜