开发者

android set listener on canvas

i开发者_如何学Pythons 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....


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

  • Graphics
  • Surface View
  • Example
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜