Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WebView double tap zoom not working on a Motorola Droid A855

Tags:

android

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

like image 844
Farha Ansari Avatar asked Mar 03 '10 06:03

Farha Ansari


1 Answers

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.

like image 72
Yoni Samlan Avatar answered Jan 04 '23 12:01

Yoni Samlan