开发者

how to get event of click of button in canvas -- Android?

开发者 https://www.devze.com 2023-02-16 15:25 出处:网络
Anyone please tell me how to get event of click of button , button in canvas-开发者_如何学运维-- Android ? I think you can use onclickListener according to what i understood from your question.

Anyone please tell me how to get event of click of button , button in canvas -开发者_如何学运维-- Android ?


I think you can use onclickListener according to what i understood from your question.

Eg; Button button = (Button)findViewById(your button id);

button.setOnClickListener(this);

implement onClickListener.

Add the methods,then do the codings for what you want to do.


To capture the event of when a user clicks a button, you need to call setOnItemClickListener for that button, and define the onClickListener usually within that method.

0

精彩评论

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