tags:

views:

344

answers:

2

Zoomin in my webview will not work on a double tab. I am using Motorola Droid A855.

+1  A: 

Have you explicitly enabled the zoom controls? They are disabled by default.

WebSettings webSettings = webView.getSettings();
webSettings.setBuiltInZoomControls(true);
Jim Blackler
This doesn't do anything. Double tap still not working with it (on Nexus One w/ Froyo 2.2)
Mathias Lin
+3  A: 

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.

Yoni Samlan
This did the trick, thanks :)
HXCaine