Environment: I have an Android ListView with strings consisting of TextViews containing some HTML with tappable links ( URLSpans ). In ListView, I set OnItemLongClickListener to listen for long clicks on individual rows.
Purpose: When I receive an event with a long click, I want to DISABLE the link taps for the same touch event, but I donβt see how to do it. A long click fires correctly, but then as soon as I lift my finger, the link arrow also fires.
What I already tried: I tried to return true (and false) using the onItemLongClick method - it seems to have nothing to do with it anyway. I tried to intercept MotionEvent.ACTION_UP after a long click so that I could temporarily use the link, but ACTION_UP does not work - at least not on the ListView .
source share