views:

46

answers:

1

I cannot stop Toast messages that continue even when I have destroyed the activity from which they originate. They are queued and just carry on and on and on when I am in the next activity.

A: 

You'll have to keep track of your Toasts. Keep your Toast objects around and then on onPause or whatever you loop through them calling toast.cancel(). That will close that toast. This will also allow unlikely but possible outside-of-your-app Toast messages from being force-closed by you.

Moncader