开发者

WebView double tap zoom not working on a Motorola Droid A855

开发者 https://www.devze.com 2022-12-22 05:04 出处:网络
开发者_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

开发者_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);
0

精彩评论

暂无评论...
验证码 换一张
取 消