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. Free Phone Call Worldwide

Free Phone Call Worldwide
Phone family and friends for free Receive local rate telephone calls
http://www.attphone.co.cc/

--~--~---------~--~----~------------~-------~--~----~

2. Liver Cancer Concerns?

Liver Cancer Concerns?
Types, dangers, causes, symptoms, treatment options for liver cancer.
http://www.scalp-cancer-from-toppik.com/

--~--~---------~--~----~------------~-------~--~----~

3. Paris hilton Video clips !!!

4. When will the next version of SDK be published

5. You can earn Rs.25000 very month from internet. This is easy form filling jobs. Work less than 1 hr daily. No investment. Please visit the website http://mahesbiotech.googlep

6. Setting transparency color on an ImageView

7. New Project: Craigs List for Cell Phones, with Cell Phone Features