wood burning stoves 2.0*
The moose likes Android and the fly likes Double tap to zoom on ImageView Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Android
Bookmark "Double tap to zoom on ImageView" Watch "Double tap to zoom on ImageView" New topic
Author

Double tap to zoom on ImageView

Adam Schweitzer
Greenhorn

Joined: May 26, 2006
Posts: 17
I am trying to implement zoom functionality on an ImageView, similar to the built-in Photos app on iOS (I don't have a physical android device to make a more suitable analogy). Pinch-to-zoom would be nice to have, but zoom on double-tap is essential.

I've tried some sample code (ex. http://android-journey.blogspot.com/2010/01/android-gestures.html), but this does not work for me, for some reason; none of the event handlers fire (I may be omitting something simple?).

Can someone point me in the right direction?

For troubleshooting purposes, I used sample code unmodified from the above link, on an Android 2.3 emulator in an application with android:minSdkVersion=7 and the following layout:
 
Don't get me started about those stupid light bulbs.
 
subject: Double tap to zoom on ImageView