Is there a way to detect a click from MotionEvents in Android? To be more specific, I need a way to distinct two kind of events: movement and click (I’m more interested in the latter).
For example, this kind of behavior can be observed in MapView component: if you drag the map just a little – it does not move (I would call this a click), however if movement distance is bigger the map starts to move as well (I would call this movement). Is there a standard threshold (global parameter) or other method to distinct these two actions?
You can implement an OnGestureListener.
onSingleTapUp()will be called for a click type event andonScroll()will be called for a movement type event.