you can do this with a very long-running AsyncTask which causes dialogs to be shown via the reportProgress() mechanism.
i know i sound like a stuck record, but AsyncTask is very well thought out. props. >Hello, > >One thing that you'll need to make sure to do is run this code on the >UI thread. You should do this any time you are dealing with Android >Views/Widgets. One way you can do this by wrapping the code in case 1 >in a Runnable and then use your Activity's runOnUiThread method. > >- Mike > >On Sep 21, 11:41 am, xingye <[email protected]> wrote: >> My code: >> public class GameView extends SurfaceView implements >> SurfaceHolder.Callback { >> ... >> Dialog dialog = new Dialog(app); >> class GameThread extends Thread { >> public void run() { >> Looper.prepare(); >> while (bRun) { >> switch(flag){ >> case 0: >> break; >> case 1: >> dialog.show(); >> flag=0; >> break; >> } >> } >> } >> } >> ...} >> >> The dialog.show() was called, but noting happened. > -- jason.vp.engineering.particle --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

