According to the documentation of Handler.postDelayed(Runnable r, long delayMillis):
Handler.postDelayed(Runnable r, long delayMillis)
Causes the Runnable r to be added to the message que
From the source, View.postDelayed() is simply using Handler.postDelayed() on an internal handler so there is no difference.
View.postDelayed()
Handler.postDelayed()
foo() may leak the Activity, you should use View.removeCallbacks() to minimize this chance.
foo()
View.removeCallbacks()