Reputation: 1202
As per the title, how I can hide the zoom control in a webview?
Upvotes: 12
Views: 11376
Reputation: 41
well, infact ,
WebView.getSettings().setBuiltInZoomControls (false); (<11)
and
myWebView.getSettings().setDisplayZoomControls(false);
shared same code
/**
* Sets whether the zoom mechanism built into WebView is used.
*/
public void setBuiltInZoomControls(boolean enabled) {
mBuiltInZoomControls = enabled;
mWebView.updateMultiTouchSupport(mContext);
}
/**
* 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
*/
public void setDisplayZoomControls(boolean enabled) {
mDisplayZoomControls = enabled;
mWebView.updateMultiTouchSupport(mContext);
}
just have different names
Upvotes: 0
Reputation: 24857
You should use WebSettings and set setDisplayZoomControls to false. This will allow the user to still use the pinch to zoom but the controls will not be displayed.
myWebView.getSettings().setDisplayZoomControls(false);
Upvotes: 24
Reputation: 46856
WebView.getSettings().setBuiltInZoomControls (false);
Is what you're looking for I think.
Upvotes: 0