That's because you're blocking in the UI thread with that sleep. If you
want to do something like that you'll have to do a sleep in a background
thread and then posting something back into the UI thread.
Maybe timers can help you better (System.Timers.Timer or
System.Threading.Timer).


On 27 November 2012 01:59, Canning <si...@wizbiz.net.nz> wrote:

> I am using MonoDevelop for Android and have a question.
>
> Currently, I am displaying a toast message and then wish to display a
> messagebox x amount of seconds later. I have tried this code:
>
> System.Threading.Thread.Sleep(5000)
>
> However, the messagebox is displayed straight after the toast statement
> with
> no wait.
>
> Can I please have some help to let the toast be displayed and then the
> application wait x amount of seconds and then display the messagebox?
>
> Thanks
>
>
>
> --
> View this message in context:
> http://mono-for-android.1047100.n5.nabble.com/Wait-x-seconds-tp5712503.html
> Sent from the Mono for Android mailing list archive at Nabble.com.
> _______________________________________________
> Monodroid mailing list
> Monodroid@lists.ximian.com
>
> UNSUBSCRIBE INFORMATION:
> http://lists.ximian.com/mailman/listinfo/monodroid
>



-- 
Gonçalo Oliveira
_______________________________________________
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

Reply via email to