Reputation: 11
How to disable zoom effect in webview....i am trying below code but its not working for me
mWeb = (WebView) findViewById(R.id.web);
mWeb.setBackgroundColor(Color.parseColor("#1d1d1d"));
WebSettings mWebSetting=mWeb.getSettings();
mWebSetting.setBuiltInZoomControls(false);
Upvotes: 0
Views: 2889
Reputation: 230
on Api 11 or greater you may be able to use
mWeb getSettings().setBuiltInZoomControls(false);
mWeb.getSettings().setDisplayZoomControls(false);
Upvotes: 0
Reputation: 56925
wv.getSettings().setSupportZoom(false);
setBuiltInZoomControls it won't disable multitouch zooming but this does.
Upvotes: 2
Reputation:
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
It will work from Api level 11 only.. see this: http://developer.android.com/reference/android/webkit/WebSettings.html#setDisplayZoomControls%28boolean%29
Upvotes: 0