Solution of web pages loaded by WebView in Android being enlarged

In some large resolutions, the web pages loaded with WebView may be enlarged, which is obviously not the result we want. I began to see whether websettings can be set not to zoom. Websettings.setbuiltinzoomcontrols (false). I found that this setting has no effect, so I can't help but continue to look at the code. Later, I saw this attribute: websettings. Zoomdensity

To finally solve this problem (the website is as follows: http://www.Android-doc.com/reference/android/webkit/WebSettings.ZoomDensity.html )

Let's paste the code of the key parts directly below.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>