webview zoom : how to hide the + - magnifying glass..

warwound

Expert
Licensed User
Longtime User
WebViewSettings has two methods: setDisplayZoomControls and setSupportZoom.

setDisplayZoomControls looks to be the method you want to use:

Sets whether the WebView should display on-screen zoom controls when using the built-in zoom mechanisms. See setBuiltInZoomControls(boolean). The default is true.

But it's a method that's only available with Android API level 11 and later.

The documentation for setSupportZoom states:

Sets whether the WebView should support zooming using its on-screen zoom controls and gestures. The particular zoom mechanisms that should be used can be set with setBuiltInZoomControls(boolean). This setting does not affect zooming performed using the zoomIn() and zoomOut() methods. The default is true.

That sounds as though you can use this method to disable the user from being able to zoom the page but still programmatically zoom the page using code (not what you want).

Martin.
 
Upvote 0
Top