I want pinch-to-zoom in WebView but I dont want it to have the integrated control (the little zoom in and zoom out buttons) all I want is the pinch to zoom.
I tried this and it didn't work:
wv1.getSettings().setBuiltInZoomControls(false);
wv1.getSettings().setSupportZoom(true);
Any ideas would be great!
p.s. I'm using API Version 8
2. show(): This method is used to show the ZoomControls which we hide from the screen by using hide method.
Important Methods of Zoom Controls ZoomControl zoomControls = (ZoomControls) findViewById(R. id. simpleZoomControl); show(): This method is used to show the zoom controls on the App UI.
In android, Zoom In and Zoom Out animations are used to change the appearance and behavior of the objects over a particular interval of time. The Zoom In and Zoom Out animations will provide a better look and feel for our applications.
On API 11 or greater, you can use:
webview.getSettings().setBuiltInZoomControls(true);
webview.getSettings().setDisplayZoomControls(false);
From API 11,
public void setDisplayZoomControls (boolean enabled)
Sets whether the on screen zoom buttons are used. A combination of built in zoom controls enabled and on screen zoom controls disabled allows for pinch to zoom to work without the on screen controls
Look at enable/disable zoom in Android WebView.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With