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. About CTS Plans

Hi All~~~

    I am using CTS to test my device now.

    There are 8 plans in CTS.(ls --plan)

    cts_host > ls --plan
    List of plans (8 in total):
    Signature
    Java
    AppSecurity
    CTS
    Performance
    VM
    RefApp
    Android

    and in plan Java, there 20 packages.

    cts_host > ls --plan Java
    Packages of plan Java (20 in total):
    =================================
    android.core.tests.annotation
    android.core.tests.archive
    android.core.tests.concurrent
    android.core.tests.crypto
    android.core.tests.dom
    android.core.tests.logging
    android.core.tests.luni.io
    android.core.tests.luni.lang
    android.core.tests.luni.net
    android.core.tests.luni.util
    android.core.tests.math
    android.core.tests.nio
    android.core.tests.nio_char
    android.core.tests.prefs
    android.core.tests.regex
    android.core.tests.security
    android.core.tests.sql
    android.core.tests.text
    android.core.tests.xml
    android.core.tests.xnet

    I have 3 questions

    1.What does each plan means?
    2.What does each test suit in the package of the plan means?
    3.When I input the command
      start --plan Java -p android.core.tests.annotation
      cts_host > start --plan Java -p android.core.tests.annotation
      The specific test package does not exist:
android.core.tests.annotation
      why does this package not exist?

-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

2. change wallpaper

Hi everybody,
             I am developing one application in that I want to change
wallpaper. But I don't know how to do that. please help me

-- 

3. Mainan Android, ada yang udah nyetok ngga?

4. stock api

5. Phone gets reset automatically.

6. How to get TimedOutException in DatagramSocket receive method ?

7. How to get TimedOutException in DatagramSocket receive method ?