Yeah, create an 
AsyncTask<http://developer.android.com/reference/android/os/AsyncTask.html>and 
do your loading/building stuff in that. You can even post a "message" 
back for the dialog in the 
onProgressUpdate()<http://developer.android.com/reference/android/os/AsyncTask.html#onProgressUpdate(Progress...)>
.

When it is done 
onPostExecute()<http://developer.android.com/reference/android/os/AsyncTask.html#onPostExecute(Result)>will
 be called where you can call your startActivity(Intent).

I will warn you though, use due diligence when implementing AsyncTask: 
https://www.google.com/#hl=en&q=android+development+asynctask+crash+when+rotating+screen
 if 
you destroy the activity that the AsyncTask is tied to then recreate it (as 
in a screen rotation) the AsyncTask won't know what to do and throw an 
exception.

-- 
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

Reply via email to