WebView double tap zoom not working on a Motorola Droid A855
开发者_JS百科Zoomin in my webview will not work on a double tab. I am using Motorola Droid A855.
From some digging in the Android 2.0/2.1 source code, it seems like double-taps are ignored unless you turn on the webview's WebSettings' useWideViewport option:
mywebviewinstance.getSettings().setUseWideViewPort(true)
though this appears not to be documented anywhere that I can find, and has some other effects on the max-zoomed-out state of the WebView.
You can also always roll your own double-click handling with a GestureListener, too.
Have you explicitly enabled the zoom controls? They are disabled by default.
WebSettings webSettings = webView.getSettings();
webSettings.setBuiltInZoomControls(true);
精彩评论