AlertDialog Timeout

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

Sponsored Links

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.



AlertDialog Timeout

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


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.



Sponsored Links

AlertDialog Timeout

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


 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. Why force java 1.5?

Recently the build system will check if java version is 1.5, and stop
if the version mismatch. I'm unhappy with such unnecessary checking.

My system is Fedora 11, I can use its default java compiler, openjdk
1.6, to compile Android without problem. In fact I just removed the
unnecessary checking, and it compiled fine. I can run the emulator
well. I didn't notice any abnormality yet.

Any comment?

2. Is arm-eabi-gcc support iwmmxt?

% info gcc

3.17.2 ARM Options

These `-m' options are defined for Advanced RISC Machines (ARM)

     Generate code for the specified ABI.  Permissible values are:
     `apcs-gnu', `atpcs', `aapcs', `aapcs-linux' and `iwmmxt'.


3. is it possible to display a multi column list ?

4. Where can I find good remote Android developers?

5. Getting exception if directional key pad is pressed, pls help

6. Bitmaps and AppWidgets

7. Garbled extracted XML resources