I have an image which implements both OnClickListener
and OnLongClickListener
. In the OnLongClickListener
at press down (ACTION_DOWN
) I start a timer. I want to cancel it at ACTION_UP
.
Now, if I implement OnTouchListener
for this image, then I catch ACTION_DOWN
for normal clicks. And I want to catch Long clicks ONLY.
Why does not long click fire ACTION_UP
event? How can I detect this event and stop the timer.
If you need a code, I can post it, but I do not think it will help you as there is no errors in the code.
PS. I cannot stop the timer at any specific time or value as this long press continuously increase the value of another element. This increase process should stop only at image long press ACTION_UP
.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…