0

is it possible to set a listener in a canvas so that it will react when it's clicked??

I'm confused because I want to draw an image with x y coordinates as well as setting the clickListener to the image...

if so then, please show the codes....

THX , I appreciate your help....

Simon Sarris
  • 62,212
  • 13
  • 141
  • 171
jason
  • 51
  • 1
  • 2
  • 4

1 Answers1

4

A Canvas is not a View in Android. You can add a onClickListener to a View. You may want to look into SurfaceView, which is a View, if you want to do drawing.

Some links

Mike dg
  • 4,648
  • 2
  • 27
  • 26