bharath bharath - 3 months ago 75
Android Question

How to remove zoom buttons on Android webview?

Is it possible to remove the zoom buttons enter image description here? Its showing when I zooming the WebView. I need zoom control without these buttons. I'm using android 2.3.

I used below code,

WebView webview = (WebView) findViewById(R.id.webview);
webview.getSettings().setBuiltInZoomControls(false);
webview.getSettings().setJavaScriptEnabled(true);
FrameLayout mContentView = (FrameLayout) getWindow().
getDecorView().findViewById(android.R.id.content);
final View zoom = webview.getZoomControls();
mContentView.addView(zoom, ZOOM_PARAMS);
zoom.setVisibility(View.GONE);

Answer

Finally my answer is, Its not possible to hide/remove these button's on WebView in Android 2.3.