views:

77

answers:

1

This should be easy, but I'm having trouble figuring out how to zoom an ImageView. I have an ImageView inside of a ScrollView and a HorizontalScrollView. I floated a ZoomControls over the ImageView and now I'm trying to figure out how to actually zoom the image.

I was thinking I would just scale the Drawable inside of the ImageView, but I can't figure out an easy way to do this.

How should I be going about displaying an image that I can both zoom and scroll?

(And yes, I know about WebViews, but it seems wasteful to load an entire WebView just to display one image.)

+1  A: 

I had tried to do a similar thing myself (a pair of scrollviews) in my app, and while it worked okay, I've since replaced it with the one-finger zoom described in this tutorial, and it works fantastic: http://blogs.sonyericsson.com/developerworld/2010/05/18/android-one-finger-zoom-tutorial-part-1/

Blumer
Thank you! This makes pinch zooming look clumsy! Out of curiosity, have you had any issues with your users not understanding how to zoom? Once you figure it out it is awesome, but it's not obvious that you are supposed to long press.
Computerish
Most figure it out, but, I have gotten some feedback to that effect. I've added a dialog that displays explaining it the first time they access that view, and it can be dismissed once or they can click "Don't Show This Again". Since I added that dialog, the e-mails stopped. :)
Blumer