Invisible Zoom Controls in WebView

I want to use scaling in WebView, but I donโ€™t want it to have a built-in control (small buttons for zooming in and out), all I want to do is zoom.
I tried this and it did not work:

wv1.getSettings().setBuiltInZoomControls(false); wv1.getSettings().setSupportZoom(true); 

Any ideas would be great!

postscript I am using Version 8 API

+4
source share
1 answer

In API 11 or higher, you can use:

 webview.getSettings().setBuiltInZoomControls(true); webview.getSettings().setDisplayZoomControls(false); 

From API 11,

 public void setDisplayZoomControls (boolean enabled) 

Sets whether to use the zoom buttons on the screen. A combination of built-in zoom controls is turned on and off the zoom control buttons on the screen, which allows you to use zoom to zoom without using the controls on the screen.

See enable / disable scaling in Android WebView .

+7
source

Source: https://habr.com/ru/post/1380325/


All Articles