зеркало из https://github.com/mono/mail-archives.git
112 строки
4.4 KiB
HTML
112 строки
4.4 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE> [mono-android] Wait x seconds
|
|
</TITLE>
|
|
<LINK REL="Index" HREF="index.html" >
|
|
<LINK REL="made" HREF="mailto:monodroid%40lists.ximian.com?Subject=Re%3A%20%5Bmono-android%5D%20Wait%20x%20seconds&In-Reply-To=%3CCA%2BC5j5ZEwqZK15YSHQ7v8LeQPgdPOKYdeDi3e2rocb3ffXHACw%40mail.gmail.com%3E">
|
|
<META NAME="robots" CONTENT="index,nofollow">
|
|
<style type="text/css">
|
|
pre {
|
|
white-space: pre-wrap; /* css-2.1, curent FF, Opera, Safari */
|
|
}
|
|
</style>
|
|
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
|
<LINK REL="Previous" HREF="012969.html">
|
|
<LINK REL="Next" HREF="012970.html">
|
|
</HEAD>
|
|
<BODY BGCOLOR="#ffffff">
|
|
<H1>[mono-android] Wait x seconds</H1>
|
|
<B>Goncalo Oliveira</B>
|
|
<A HREF="mailto:monodroid%40lists.ximian.com?Subject=Re%3A%20%5Bmono-android%5D%20Wait%20x%20seconds&In-Reply-To=%3CCA%2BC5j5ZEwqZK15YSHQ7v8LeQPgdPOKYdeDi3e2rocb3ffXHACw%40mail.gmail.com%3E"
|
|
TITLE="[mono-android] Wait x seconds">goncalo at minkan.net
|
|
</A><BR>
|
|
<I>Tue Nov 27 10:15:40 UTC 2012</I>
|
|
<P><UL>
|
|
<LI>Previous message: <A HREF="012969.html">[mono-android] Wait x seconds
|
|
</A></li>
|
|
<LI>Next message: <A HREF="012970.html">[mono-android] Display simple menu when item is pressed
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#12972">[ date ]</a>
|
|
<a href="thread.html#12972">[ thread ]</a>
|
|
<a href="subject.html#12972">[ subject ]</a>
|
|
<a href="author.html#12972">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
<HR>
|
|
<!--beginarticle-->
|
|
<PRE>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 <<A HREF="http://lists.ximian.com/mailman/listinfo/monodroid">simon at wizbiz.net.nz</A>> wrote:
|
|
|
|
><i> I am using MonoDevelop for Android and have a question.
|
|
</I>><i>
|
|
</I>><i> Currently, I am displaying a toast message and then wish to display a
|
|
</I>><i> messagebox x amount of seconds later. I have tried this code:
|
|
</I>><i>
|
|
</I>><i> System.Threading.Thread.Sleep(5000)
|
|
</I>><i>
|
|
</I>><i> However, the messagebox is displayed straight after the toast statement
|
|
</I>><i> with
|
|
</I>><i> no wait.
|
|
</I>><i>
|
|
</I>><i> Can I please have some help to let the toast be displayed and then the
|
|
</I>><i> application wait x amount of seconds and then display the messagebox?
|
|
</I>><i>
|
|
</I>><i> Thanks
|
|
</I>><i>
|
|
</I>><i>
|
|
</I>><i>
|
|
</I>><i> --
|
|
</I>><i> View this message in context:
|
|
</I>><i> <A HREF="http://mono-for-android.1047100.n5.nabble.com/Wait-x-seconds-tp5712503.html">http://mono-for-android.1047100.n5.nabble.com/Wait-x-seconds-tp5712503.html</A>
|
|
</I>><i> Sent from the Mono for Android mailing list archive at Nabble.com.
|
|
</I>><i> _______________________________________________
|
|
</I>><i> Monodroid mailing list
|
|
</I>><i> <A HREF="http://lists.ximian.com/mailman/listinfo/monodroid">Monodroid at lists.ximian.com</A>
|
|
</I>><i>
|
|
</I>><i> UNSUBSCRIBE INFORMATION:
|
|
</I>><i> <A HREF="http://lists.ximian.com/mailman/listinfo/monodroid">http://lists.ximian.com/mailman/listinfo/monodroid</A>
|
|
</I>><i>
|
|
</I>
|
|
|
|
|
|
--
|
|
Gonçalo Oliveira
|
|
-------------- next part --------------
|
|
An HTML attachment was scrubbed...
|
|
URL: <<A HREF="http://lists.ximian.com/pipermail/monodroid/attachments/20121127/41c98a39/attachment.html">http://lists.ximian.com/pipermail/monodroid/attachments/20121127/41c98a39/attachment.html</A>>
|
|
</PRE>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!--endarticle-->
|
|
<HR>
|
|
<P><UL>
|
|
<!--threads-->
|
|
<LI>Previous message: <A HREF="012969.html">[mono-android] Wait x seconds
|
|
</A></li>
|
|
<LI>Next message: <A HREF="012970.html">[mono-android] Display simple menu when item is pressed
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#12972">[ date ]</a>
|
|
<a href="thread.html#12972">[ thread ]</a>
|
|
<a href="subject.html#12972">[ subject ]</a>
|
|
<a href="author.html#12972">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
|
|
<hr>
|
|
<a href="http://lists.ximian.com/mailman/listinfo/monodroid">More information about the Monodroid
|
|
mailing list</a><br>
|
|
</body></html>
|