Android gesture sliding enables ImageView to zoom image size
•
Android
This paper introduces two methods to scale the image size of ImageView with Android gestures, which are shared for your reference. The specific contents are as follows
Method 1: write the following code to mulitpointtouchlistener.java, and then ontouchlistener your corresponding picture. For example: ImageView. Setontouchlistener (New mulitpointtouchlistener()); In XML, change the zoom format of ImageView to matrix, for example: Android: scaletype = "matrix", so that the image can be zoomed. The following is the mulitpointtouchlistener.java Code:
Method 2: customize an ImageView, such as touchimageview:
Then we can use it directly in our activity:
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码