Dear Greg Donald,
                          There is problem with Toast cancel() function,
t.cancel() will not cancel the inflight notification.
Better option use t.hide() instead of t.cancel().

Cheers...
BR,
Suchand

On Fri, Nov 27, 2009 at 11:23 PM, Greg Donald <gdon...@gmail.com> wrote:

> How can I keep Toast from building up a queue of messages?
>
> I'm working on a board game and I'm sending status messages back to
> the user with this wrapper function I created for Toast:
>
>        private void toast( String s )
>        {
>                if( t != null )
>                        t.cancel();
>
>                t = Toast.makeText( getApplicationContext(), s,
> Toast.LENGTH_SHORT );
>
>                t.show();
>        }
>
> The problem is I've made the flow of game play so simple I can now
> play it so fast Toast messages queue up, even to the point where they
> continue to show on the desktop after I quit out of the game.
>
> t.cancel() doesn't seem to cancel out the previous message, anyone
> know what I might be doing wrong?
>
>
>
> Thanks,
>
>
> --
> Greg Donald
> http://destiney.com/
>
> --
>  You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com<android-developers%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to