user3109249
user3109249

Reputation:

android - pinch to zoom not working, double tapping is. In webview

As the title says pinch to zoom is no working. Double tap is working in android 4.3 but not in android 5.0

Here it's the viewport:

<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=yes">

in the Activity:

mWebView.getSettings().setLoadWithOverviewMode(true);
mWebView.getSettings().setUseWideViewPort(true);

Upvotes: 2

Views: 1041

Answers (1)

rick
rick

Reputation: 182

Have you used setBuiltInZoomControls?

mWebView.getSettings().setBuiltInZoomControls(true);

The above will display an on-screen zoom control for WebView and also enable pinch to zoom.

If you only want pinch to zoom but hide the zoom controls, use the following in addition to the one above. mWebView.getSettings().setDisplayZoomControls(false);

Upvotes: 1

Related Questions