disabled built in zoom controls disable pinch zoom, too
I have a WebView which should support zoom. The UI design requires custom zoom controls and therefore I disabled the built in zoom controls. The problem now, the pinch zoom is disabled, too. Setting the built in controls enables the pinch zoom.
final WebSettings settings = mWebVi开发者_StackOverflow中文版ew.getSettings();
settings.setBuiltInZoomControls(false); // disables the pinch zoom, too
settings.setSupportZoom(true);
Does someone know a solution to disable/hide the built in controls and keep the pinch zoom?
Yes there is a function setDisplayZoomControls,
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
NOTE: Since API Level 11 only:(
精彩评论