开发者

make image's particular part click listener in android

开发者 https://www.devze.com 2023-01-19 21:35 出处:网络
I have an android application, which needs to display a开发者_高级运维n image and make that images particular part click listenable... anybody please help me with some hints..I think you have to work

I have an android application, which needs to display a开发者_高级运维n image and make that images particular part click listenable... anybody please help me with some hints..


I think you have to work with an onTouchListener. The MotionEvent object which will be passed to the handler method onTouch() contains the coordinates of the touch event that was made. So with this data you should be able to calculate which part of your image was clicked.

0

精彩评论

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