Reputation: 16609
Simply i post a runnable with delay on views using this code:
view.postDelayed(new Runnable() {
public void run() {
// Do Something
};
}, delay);
I need to stop and remove this runnable sometimes. The idea is that there is delay, sometimes i need to stop it and ignore the delay and everything.
so how to stop it !?
Upvotes: 2
Views: 534
Reputation: 157437
calling view.removeCallbacks(null);
. Passing null as parameter removes every Runnable
associated with the handler.
Upvotes: 3