Search code examples
androidcanvasbitmapgesture-recognition

Android using hand gestures to move and zoom


I have an image that gets created once a button gets clicked; it gets created in the middle of the canvas, as I set it to do so:

if(choosenImage != null) {
     c.drawBitmap(choosenImage, 0, 0, null);
}

I want to move and zoom the image using my hand, like drag to to, move it, etc.

How can I do that ? And is that related to onTouchListener?


Solution

  • Yes it is related to OnTouchListener. I think code on the following link will solve your problem:

    Rotate zoom drag image in android imageview