use java.util.timer to invoke timertask which will trigger dialog.dismiss().do not forget to call dialog.dismiss from UI thread
On Thu, Apr 22, 2010 at 11:00 PM, krox <[email protected]> wrote: > Hi! > > Maybe not the optimal solution (quite new to Android development) but > spawn a new thread when you show() the AlertDialog, let the Thread > sleep 3000 ms and then call myDialog.dismiss(). You might have to use > RunOnUIThread() as well since it is messing with the UI. Someone out > here might have a more elegant solution but this should > (probably ;-) ) work.il > > Cheers, > Erik > > On Apr 22, 7:26 pm, Shekhar <[email protected]> wrote: > > Hi, > > > > I have to create an alert dialog which will timeout after 3 > > seconds.How can I use timer for it? In AlertDialog class i am not > > seeing any member function to set it. > > > > Thanks, > > Shekhar > > > > -- > > You received this message because you are subscribed to the Google > > Groups "Android Developers" group. > > To post to this group, send email to [email protected] > > To unsubscribe from this group, send email to > > [email protected]<android-developers%[email protected]> > > For more options, visit this group athttp:// > 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 [email protected] > To unsubscribe from this group, send email to > [email protected]<android-developers%[email protected]> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- Regards, Faizan -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

