Check Mobile App
Read now
Start a Project

Pinch to zoom in android

Save

Pinch to zoom in android

Today we are going to learn a cool functionality pinch to zoom in android.

1. Firstly You need to show an ImageView in your layout file:

2. After that you need to create a class that’s responsible for Gesture Detection:

This class should only be used with MotionEvent’s reported via touch.

4. Initialize Imageview and ScaleGestureDetector:

5. Override onTouchEvent() as follows:

6. Yes! as a result of above all,  we are done, to experiment with the pinch-to-zoom functionality.

     

 

. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


Be the first to comment.

css.php

When I think in getting solutions for my Ecommerce Platform, I think of Webkul. They have been such a blessing in our business. We have spent thousands of dollars in support and modules from them. We love their support team. They work very closely with us, and they always go the extra mile when we need help.

Michael Urresta

Michael Urresta

Talk to Sales

Global

Live Chat
Start a Project

    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home