ListView onItemLongClickListener does not prevent link taps

Viewed 362

Environment: I have an Android ListView with rows that consist of TextViews containing some HTML with tappable links (URLSpans). On the ListView, I have set an OnItemLongClickListener to listen for long click events on individual rows.

Goal: When I receive a long click event, I want to DISABLE taps on the links for the same touch event, but I'm not seeing how to do this. The long click fires correctly, but then as soon as I lift my finger, the link tap also fires.

What I've Tried Already: I've tried returning true (and false) on the onItemLongClick method -- it doesn't seem to make a difference either way. I've tried to intercept the MotionEvent.ACTION_UP after a long click so that I can temporarily consume the link tap, but the ACTION_UP doesn't fire -- at least not on the ListView.

1 Answers
Related