I was wondering if there was a way to display a Toast message, and then not execute any of the following code until after the Toast message had disappeared.
Asked
Active
Viewed 2,437 times
0
-
See this similar question here: [http://stackoverflow.com/questions/6163563/is-it-possible-to-wait-until-a-toast-has-finished-to-resume-the-method][1] [1]: http://stackoverflow.com/questions/6163563/is-it-possible-to-wait-until-a-toast-has-finished-to-resume-the-method – Victor Ribeiro da Silva Eloy Jul 23 '12 at 20:15
-
Saw those, but was hoping there was a better solution found since then, thanks though. – JuiCe Jul 23 '12 at 20:20
-
I like the idea on that thread of having an AlertDialog with no buttons that gets dismissed after a time. You don't need to rely on Toast. – eternalmatt Jul 23 '12 at 20:25
-
1http://stackoverflow.com/questions/7607410/finish-activity-after-toast-message-disappears seems to be the solution. – Murat Jul 23 '12 at 20:25
-
Yeah I know, I wanted to do this to more or less debug my code. Not essential for my program but was curious. – JuiCe Jul 23 '12 at 20:28
-
@Murat that is a bad solution, 1st because there is no guarantee that a toast will display exactly when you tell it to. If you do go with this a handler would be better suited. I would recommend writing your own toast class, its easy enough and you could get the exact functionality required. – Jug6ernaut Jul 23 '12 at 20:31
-
http://stackoverflow.com/questions/7607410/finish-activity-after-toast-message-disappears – Omid Farvid Nov 26 '16 at 12:30