i've got an async task
private class DownloadScheduleTask extends
AsyncTask<String,Void,String>
{
ProgressDialog progress;
protected void onPreExecute()
{
progress = ProgressDialog.show( StartupActivity.this,
null,
"Wait...", true, false );
}
protected String doInBackground(String... urls)
{
/* background task work here... */
return data;
}
protected void onPostExecute( String result )
{
progress.dismiss();
}
}
when a screen is rotated, emulator crashes in onPostExecute because
looks like
ProgressDialog is no longer valid.
how can i detect that progress instance var is no longer valid so that
i don't call dismiss()
the dialog is off the screen anyway.
--
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