user1682793
user1682793

Reputation: 33

Android WebView disable automatic Zoom

is there a possibility to disable the automatic zoom when i'am clicking an input field in my Webview ?

I'd tryed with some meta tags: user-scalable=no;initial-scale=1, maximum-scale=1 But that doesent work. The Zoom is disabled if i put a meta-tag width in there. But is there a possibility without this meta tag ? Just with the Java code ? I'd tryed: webview.getSettings().setDefaultZoom(ZoomDensity.FAR); (Better, but not correct) webview.getSettings().setBuiltInZoomControls(false);
webview.getSettings().setSupportZoom(false);

Upvotes: 0

Views: 3715

Answers (1)

Mennan
Mennan

Reputation: 4497

Can you try this code:

<meta content='width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;' name='viewport' />

<meta name="viewport" content="width=device-width" />

Upvotes: 2

Related Questions