In order to have list reordering functionality I turned to this implementation.
My problem is that when I try to drag an item in my ListView, I don't get the ACTION_DOWN event. Instead, for a single smear down motion I get 2 ACTION_MOVE events (action=0x00000002) and a single ACTION_UP event (action=0x00000001) in this order.
I've looked at similar questions but it seems like everyone has the opposite problem, getting only ACTION_DOWN events. Can anyone think of why this is happening?
Thanks, Yoel
I was using the same code.
My problem was also that something was consuming the event and I didn't managed to found what was it... but i managed to solve it using onInterceptTouchEvent to return true on the events i needed on onTouchEvent.
Problem solved :-)
It turns out I needed to add this small piece of code:
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
return super.onInterceptTouchEvent(ev);
}
Now I get the ACTION_DOWN events in the OnTouchEvent function and it all works fine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With