Android: custom view onClickEvent with X & Y locations

后端 未结 6 648
你的背包
你的背包 2020-12-21 15:12

I\'ve got a custom view and I want to get the X and Y coordinates of a user click. I\'ve found that I can only get the coordinates from the onTouchEvent and an onClickEvent

6条回答
  •  青春惊慌失措
    2020-12-21 15:31

    FYI, in my tests it looks like onTouch does override onClick for a view, irrespective of whether onTouch returns true or false.

    -Frink

提交回复
热议问题