开发者

Android:Canvas and onTouchListener

开发者 https://www.devze.com 2023-03-26 12:20 出处:网络
I have an application which has a canvas where I can draw free hand stuff. Now, I would want to display a toast message on the MotionEvent.KEY_UP event which can be handled in the开发者_运维知识库 onT

I have an application which has a canvas where I can draw free hand stuff. Now, I would want to display a toast message on the MotionEvent.KEY_UP event which can be handled in the开发者_运维知识库 onTouchListener handler. As of now I've used console or System.out.println to display my message. The application force closes if I use Toast. Kindly help.


You need to run this on the UI thread.

Look at this: http://developer.android.com/resources/articles/painless-threading.html

0

精彩评论

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