开发者

Sending a menu item selection to a custom view's onTouch method

I'm writing a custom view to be able to draw on a bitmap and I'd like to be able to pass a menu selection from my activity to have the onTouch do different things. 开发者_JAVA技巧For instance, if you select circle from the menu then the onTouch will draw a circle, if rectangle, a rectangle etc. Am I going about this the right way? Is there a way to pass the menu item selection to the view?


I ended up using a getter/setter to accomplish this. Not sure if that's the best way but it works.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜