Why does pinch-to-zoom not work in my Android WebView?

This is the page you linked has the following viewport meta tag:

<meta name="viewport" content="width=1024, maximum-scale=1.0, target-densitydpi=device-dpi">

The page that works has a different viewport meta tag. The maximum-scale bit is telling the WebView to not allow zooming in more than the specified amount.

The site should also be broken in any modern mobile browser. Setting maximum-scale to a low value like that is not very "mobile friendly" so it might just be a bug on the site. Have you tried contacting the owner, maybe they can fix it server-side?

There is not a whole lot you can do in the WebView that will not result in other sites rendering incorrectly. You could try injecting JavaScript to fix up the page by changing the meta tag as a last resort.


Have you tried this suggestion?

webSettings.setSupportZoom(true);

See Disable pinch zoom in WebView?

Note the link is in regards for disabling zoom. But perhaps your zoom is being disabled by default as some users suggest.


Add these two lines to enable pinch to zoom in webview

webview.getSettings().setSupportZoom(true);
webview.getSettings().setBuiltInZoomControls(true);