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
精彩评论