How to create an image with the zoom and pan function?

I created an application that has a small image downloaded from a website URL. I want that when a user clicks on this small image, he will display the image in full screen mode, and also be able to scale and pan this image.

What I did was display an image in WebView with built-in zoom controls, but the result was ugly. (I set the layout for wrap_content, so white areas are not displayed, but this leads to the fact that the image does not dynamically increase).

Any solution? and sorry for my bad english.

+8
android android-imageview
source share
3 answers

The problem is solved! For those who have the same problem, I use this library and it works great! http://blog.sephiroth.it/2011/04/04/imageview-zoom-and-scroll/

Here's a link to the Github ImageViewZoom page .

+11
source share

You can create this from scratch or ... you can use this library:

http://code.google.com/p/android-pinch

Take a look at the PinchImageView class

+1
source share
0
source share

All Articles