I have to display image in an imageview. And what I want to do is just simply pinch and zoom functionality on imageview.
Tap anywhere on the screen, except the keyboard or navigation bar. Drag 2 fingers to move around the screen. Pinch with 2 fingers to adjust zoom. To stop magnification, use your magnification shortcut again.
When you pinch to zoom in on a photo or a video, what you are actually doing is cropping the viewing size and making it larger. What happens then is things that used to be one pixel large will now take up four or eight or 10 or however many pixels they need in order to make the photo as large as you want it.
TouchImageViews placed in a ViewPager like the Gallery app. Mirror two TouchImageViews using onTouchImageViewListener and setZoom() . Click on TouchImageView to cycle through images. Note that the zoom state is maintained though the images are switched.
You can use Chrisbanes photoview library:
https://github.com/chrisbanes/PhotoView
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With