I am implementing OnTouchListener and am receiving MotionEvent objects. Some ACTION_MOVE events reports absolute X/Y coordinates, while some reports relative coordinates.
How can I ask a MotionEvent what kind of coordinates it currently represents?
You may want to use these for absolute coordinates (absolute, regarding the screen of the device):
MotionEvent.getRawX()
MotionEvent.getRawY()
The other methods,
getX()andgetY(), should return you coordinates relative to theViewthat dispatched them.