In pure Java there is MouseInputListener
which I can use to work with those 2 events.
How do I do it with Android?
If I implement both events then only one is fired (onClickListener
) and not the other.
Updated:
The question is not about detecting the finger movement.
I have a View (ImageView
for example). I need to detect the click on this view which is onClickListener()
and finger movement on this view (i.e. press, move then release the finger).
The problem here is that only onClickListener()
is called and MotionEvent
handler is not caught.
I need to be able to differentiate those 2 events as the main event should be finger movement and onClickListener()
should just say "Don't click this view. Spin this view."
Hopefully this is more clear.