AlertDialog Timeout

by Shekhar » Fri, 23 Apr 2010 01:26:32 GMT


Sponsored Links
 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

--



AlertDialog Timeout

by krox » Fri, 23 Apr 2010 01:31:17 GMT


 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.

Cheers,
Erik



>


Sponsored Links


AlertDialog Timeout

by Liviu Ungureanu » Fri, 23 Apr 2010 01:35:43 GMT


 Hi!

 You have to create a thread which count until 3 and when counter is 3 you
have to call - via an handler -  yourDialogObject.cancel().

Hope this help.

--



AlertDialog Timeout

by faizan khan » Fri, 23 Apr 2010 03:22:31 GMT


 use java.util.timer to invoke timertask which will trigger
dialog.dismiss().do not forget to call dialog.dismiss from UI thread





> >



Other Threads

1. I want mms number,sent/received , body and attachment details from MMS db in android鈥?How to do that?

I am using "content://mms" Content resolver and getting mms database.
How to get number,sent/received, body and attachment details from
that?

-- 

2. Connect a device which is over LAN from Android Emulator...???

I am having problem to connect any device which is over LAN of my
system, with the Android-Emulator. As I create the socket by giving
the IP and Port of the LAN-Device my application hangs?? I also
included the <uses-permission> tag for INTERNET permission in
AnderoidMenifest.xml file..

-- 

3. Having too many errors when compiling applications

4. To connect a LAN device from Android Emulator......!!

5. Android Camera Preview 鈥?How to 'freeze' the camera?

6. AT&T HTC ARIA - Can not install APK

7. HTC Desire HD has eaten all my texts