开发者

android set listener on canvas

开发者 https://www.devze.com 2023-03-01 13:12 出处:网络
i开发者_如何学Pythons it possible to set a listener in a canvas so that it will react when it\'s clicked??

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

精彩评论

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

关注公众号