2

I am using a single Toast object that is being accessed from multiple methods. Each of the methods initializes the Toast to display a different message, and each of the methods cancels the existing Toast on the screen in order to display its own. However, after the on-screen Toast is cancelled and it disappears, there is a delay before the new Toast is displayed.

I have found that this delay is exactly equivalent to how long it would have taken the original Toast to disappear off the screen by itself (instead of being cancelled). This has led me to believe that although the Toast cancel() method removes it from the screen, it does not dequeue it from the system, causing other Toasts to still have to wait before they are displayed. Is there any way around this?

John Roberts
  • 5,885
  • 21
  • 70
  • 124
  • possible dup of http://stackoverflow.com/questions/5390914/custom-toast-cancel-not-working – logray Dec 31 '12 at 20:57
  • Code in [possible duplicate here definitely dequeues and displays subsequent `Toast` views right away](http://stackoverflow.com/questions/16098151/android-cancel-toast-when-exiting-the-app-and-when-toast-is-being-shown). Production tested for a few years and seems to still be working well. YMMV. – Richard Le Mesurier Aug 16 '16 at 21:09

0 Answers0