I’d like to perform an action when the user let his finger on a View more than 1 sec.
With OnTouch, I can access to ACTION_UP,ACTION_DOWN and ACTION_MOVE.
The problem is that if the user has his finger on the screen and doesn’t move his finger, ACTION_MOVE is not triggered and thus I can’t perform my action.
I precise that I’d like to perform my action after 1sec but while the user still have its finger on screen.
In fact I’d need to sense that the user has his finger on the screen even if he’s not moving it.
Thanks for your help.
You can Make Use of the TimerTask class and schedule a Task which will run after a specific time.
Here is an Example.
In case the user has lifted his finger before 1000 ms then just cancel the task scheduled upon ACTION_UP event.