Robert Heine
Robert Heine

Reputation: 1838

Overriding a html5 viewport

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

Upvotes: 0

Views: 1086

Answers (2)

andreasbecker.de
andreasbecker.de

Reputation: 518

If possible remove the given meta tag from the html5-website. Without the tag the page is zoomed to view the whole website.

Upvotes: 0

snahl
snahl

Reputation: 503

The correct syntax requires commas. so simply replace the semi-colons (;) with commas (,) and give it a try.

Upvotes: 1

Related Questions