Reputation: 9601
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.)
Upvotes: 3
Views: 1374
Reputation: 5035
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/
Upvotes: 1