I am developing an android application and successfully disabled zoom-in, zoom-out by swiping. But I have failed to disable double tap zooming. Is there an obvious function to use? Thanks.
Here is my code,
webview.getSettings().setJavaScriptEnabled(true);
webview.getSettings().setLoadWithOverviewMode(true);
webview.getSettings().setUseWideViewPort(true);
webview.getSettings().setBuiltInZoomControls(false);
webview.getSettings().setDisplayZoomControls(false);
webview.getSettings().setSupportZoom(false);
webview.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
webview.loadUrl(url1);
Unfortunately, it's a "feature" in WebView in pre-KitKat versions of Android, that double tap can be explicitly disabled only by turning off UseWideViewPort
setting.
There are workarounds that based on "stealing" double tap events from WebView described in WebView getting rid of double tap zoom. and How to disable doubletap zoom in android webview?