Re: [android-developers] Force close/wait popup while in onCreate().

2010-09-22 Thread TreKing
On Wed, Sep 22, 2010 at 12:24 PM, Kakyoin wrote: > But it doesn't work. The screen goes black for the same amount of time even > after I use the progress dialog. > You probably used the dialog in the main thread, which won't make a difference. Look at AsyncTask. ---

Re: [android-developers] Force close/wait popup while in onCreate().

2010-09-22 Thread Leigh McRae
Your loading shouldn't be done on the main event thread. You should have some modes/state machine that shows some kind of splash and then does the loading in another thread. I have modes and a stack system. So I start by pushing on the Menu mode, then the Loading and finally the Splash. S

[android-developers] Force close/wait popup while in onCreate().

2010-09-22 Thread Kakyoin
Hi. My situation: I've a lot of initialization code in my main activity's onCreate(). When I launch my game, the screen goes black for a long time, then my game appears. I did logged some message at the start and end of onCreate() and found that onCreate() is executing its code while the screen