Implementing pinch zoom and drag using Android's build in gesture listener and scale listener
问题 I am trying to implement pinch zoom and drag using Android's gesture listener and scale listener. The problem is that when I perform pinch zoom, the image (which I am trying to zoom) bounces to a particular location. Also the zoom position is not centered. The following code demonstrates what I am trying to achieve. Any idea why the image is jumping (and how to correct it) ? public class CustomView extends View { Bitmap image; int screenHeight; int screenWidth; Paint paint; GestureDetector