0

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?

LittleBobbyTables - Au Revoir
  • 32,008
  • 25
  • 109
  • 114
John Jared
  • 790
  • 3
  • 16
  • 40
  • May this two links help you: Zoom: http://stackoverflow.com/questions/6650398/android-imageview-zoom-in-and-zoom-out Move: http://stackoverflow.com/questions/5743328/android-image-in-canvas-with-touch-events/5747233#5747233 – Bruno Bieri Aug 13 '12 at 05:21

1 Answers1

2

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

Rotate zoom drag image in android imageview

Community
  • 1
  • 1
kzs
  • 1,111
  • 5
  • 20
  • 35
  • thanks, But I couldn't get it to work. I want when the button is clicked the canvas will draw a drawable ( this is working fine ), and u can move, resize the drawable around the canvas – John Jared Aug 13 '12 at 08:38