Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Double tap to zoom on ImageView

 
Adam Schweitzer
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic