It is necessary to remove the zoom buttons in the webView Android, while the zoom works. Did so:

 settings.setSupportZoom(true); settings.setBuiltInZoomControls(true); if (API >= 11) { settings.setDisplayZoomControls(false); settings.setAllowContentAccess(true); } 

In Android < 4.0 everything is perfect. In 2.x there are zoom buttons. If settings.setBuiltInZoomControls declare false , then the buttons will go away and the zoom will turn off. Options?

  • The question is not quite clear ... Should I have the zoom with the help of other tools worked, and disable the buttons? - Vladyslav Matviienko
  • Exactly. that is, if you pinch and pinch with your fingers, the zoom worked. but at the same time this squalor (curves buttons) were not shown. I fight the problem ... - Martin_Devil

1 answer 1

Try this option. Should work fine. Just set the size of the buttons to 0 and the user will not see them.

 private WebView myWebView; private static final FrameLayout.LayoutParams ZOOM_PARAMS = new FrameLayout.LayoutParams(0, 0, Gravity.BOTTOM); FrameLayout mContentView = (FrameLayout) getWindow(). getDecorView().findViewById(android.R.id.content); final View zoom = myWebView.getZoomControls(); mContentView.addView(zoom, ZOOM_PARAMS); zoom.setVisibility(View.GONE); 
  • a crutch of some kind :) you need to look at how it was done in Finest WebView, for example - Flippy