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. Browser App: Soft Keyboard int

I have a web page specifically designed to be displayed on the Android
Browser.

We would like to customize the soft keyboard or interact with the
keyboard. Is there any practices suggested in this scenario ?

We do not have access to the Java SDK because it is purely an web page
(not running inside WebView).

Any suggestions appreciated.



Kumar


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

2. Question about Android framework compatibility Suite

Hi There,

I would like to know more about Android framework compatibility in bit
more details. As per my understanding this is used to check incase a
new application API's are not disturbing the existing codebase
integrity.

Going ahead, I would also like to know how we can access Android
framework compatibility Suite source code, get compiled to make it
work, etc etc.

Note that my organization is NOT an OHA Member, and also we are not
and OEM.

Thanks in Advance.
Anand

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

3. Adding new Menu-Buttons to Youtube Application

4. SKIA archetectural and design docs

5. opencore PVPlayerEngine::SetPlaybackRate cannot work

6. Online Dating and friend finder

7. Random animation order question