开发者

android webview for different size and dpi

开发者 https://www.devze.com 2023-03-11 16:38 出处:网络
By using WebView, I have loaded some html content contains image(large size, for example, 800*600) and text.

By using WebView, I have loaded some html content contains image(large size, for example, 800*600) and text. For text, it 开发者_开发技巧can perform line wrapping automatically. But for image, it will enable the horizontal scroll even if "setHorizontalScrollBarEnabled" is set to false. Is there any method to force auto-fit in the WebView? Thanks!


You can parse the HTML content before loading it into the WebView and change the image(s) size according to screen resolution (that you can detect)

0

精彩评论

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