7

I have an imageview and when clicked, calls OnClickListener.onClick(View v). How do I get the exact point/coordinate that the user clicked?

Thanks

Bruce Lee
  • 3,049
  • 3
  • 20
  • 13

1 Answers1

15

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.

Jett Hsieh
  • 3,159
  • 27
  • 33