I would like to register clicks on a text wrapped in a ClickableSpan only if they are clicked for over say 1 second. Is there any way to do this? If not, capturing a double click would also be fine.
It would be great if the onClick method captured an event that had some meta data about the click - then I could say ignore if the click length was short.
Any advice?
Thanks, Victor
I want to do the same, the only method that comes to mind is custom MovementMethod class replacing LinkMovementMethod and a replacement for ClickableSpan that adds a long click abstract method. It is actually quite simple:
EDIT: Works like a charm. I've made some stupid mistakes like downloading LinkMovementMethod from different Android version and not using the new ClickableSpan class in setSpan(), but nothing serious.
In case anyone needs it, I found it on this place
LongClickableSpan in the same place: