How to implement zoom effect for image view in android?

后端 未结 9 1382
日久生厌
日久生厌 2020-11-30 20:13

I have to implement image zooming, I have tried with so many codes.But i didnt get full idea of gesture events. I want to implement when we apply double tap, image will be z

9条回答
  •  孤独总比滥情好
    2020-11-30 20:27

    Here is one of the most efficient way, it works smoothly:

    https://github.com/MikeOrtiz/TouchImageView

    Place TouchImageView.java in your project. It can then be used the same as ImageView.

    Example:

    TouchImageView img = (TouchImageView) findViewById(R.id.img);
    

    If you are using TouchImageView in xml, then you must provide the full package name, because it is a custom view.

    Example:

        
    

提交回复
热议问题