Monali
Monali

Reputation: 1966

How to disable webview zoom out?

I am loading javascript file in webview but If I double click a web view, it zooms out. Is there any way to disable that?

Thanks Monali

Upvotes: 2

Views: 1133

Answers (2)

Pankaj Kumar
Pankaj Kumar

Reputation: 82948

Try this.

WebView browser = (WebView)findViewById(R.id.webkit);
WebSettings mWebSettings = browser.getSettings();
mWebSettings.setBuiltInZoomControls(false);

in above code mWebSettings.setBuiltInZoomControls(false); will do your task.

Reference : setBuiltInZoomControls(boolean enabled)

Upvotes: 1

Mike
Mike

Reputation: 819

WebSetting class has method setSupportZoom(boolean) http://developer.android.com/reference/android/webkit/WebSettings.html#setSupportZoom(boolean)

Upvotes: 0

Related Questions