I build a simple android WebView for getting a html5-website. This website also provides the following line, which seems to always scale the view wrong (on my low density device):
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
Unluckily all my attempts to scale the view down to 75% were unsuccessful, which I tried by using various combinations of:
getView().getSettings().setUseWideViewPort(true); // used true, false
getView().getSettings().setSupportZoom(true); // used true, false
getView().getSettings().setBuiltInZoomControls(true); // used true, false
getView().setInitialScale(0); // used 0, 75,开发者_开发知识库 100, 150 here
Is there any other way of overriding the html5 ?
Regs, Rob
The correct syntax requires commas. so simply replace the semi-colons (;) with commas (,) and give it a try.
If possible remove the given meta tag from the html5-website. Without the tag the page is zoomed to view the whole website.
精彩评论