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.
精彩评论