开发者

How do i get the point/coordinate the user clicked on an android view?

I have an imageview and when clicked, calls OnClickLi开发者_StackOverflow中文版stener.onClick(View v). How do I get the exact point/coordinate that the user clicked?

Thanks


You can't get the coordinate touched in OnClickListerner. Please use OnTouchListener.onTouch(View v, MotionEvent event) instead of it, and you could get the coordinate from the event.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜