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. quoted printable decoder api on Android?

hi,

Was there any apis available on android for quoted printable
decoding ?. Thanks.

Regards,
Sukumar.
--~--~---------~--~----~------------~-------~--~----~

2. No context menu on map view intended??

Hi

Having been working with context menus with other views, which can be
done with

view.setLongClickable(true);
registerForContextMenu(view);

this does not seem to be the case with map view.  Is this intended??
Also overlays only seem to be able catch onTap events, is it possible
to catch long press events on these?

Many Thanks

Ross
--~--~---------~--~----~------------~-------~--~----~

3. SoundPool doesn't play sounds >100K in SDK 1.5

4. Where to store data

5. is it possible to support bluetooth OBEX?

6. 3D Streaming on Android Phone?

7. how to use g1's camera application from my application