Home » Android » imageview – how to zoom the image to specified coordinates in android

imageview – how to zoom the image to specified coordinates in android

Posted by: admin May 14, 2020 Leave a comment

Questions:

I would like to zoom the image to particular portion(to specified coordinates) of the image.
I have an image, i displayed it in android image view with full screen. when i click on a button i would like to zoom the image to specified coordinates of the image.lets say coordinates i have is left:500,top:50,width:60 and height:20. I want the full image zoom to specified coordinates and fit this sub image in center of the image view.

Currently i am doing it by cropping the image to specified coordinates. I will get small image. I am displaying it in image view. But i think it is not as good solution.

Can some one help me to find the way to implement the zoom functionality.

How to&Answers:

Use this Custom ImageView class for you Image View. Then If you want to keep Pinch Zoom then you can use that as well otherwise remove all gestures from it. You can see a “Double Tap method” in the class given below. Just call this method code on the click of your button.

Hope this will help!

Answer:

May be this is what you looking for :

for more info you can refer :

This link Github can help you more

enter link description here

Edit :

please refer this youll get your answer :

The Answer for your question