I have a ProgressDialog that is running and accepting the percent complete from a thread handl开发者_如何学运维e. When the screen is locked, then unlocked, the app returns back to the home screen of the app and does not continue to display the ProgressDialog.
How can I return to the same page with the ProgressDialog on it? I assume I need to somehow save the handle resource and recreate it on onResume but am unsure how to do this.
Thanks.
It seems you're on the right track. Assuming you have class variables showProgressDialog and myProgress:
@Override
protected void onResume() {
super.onResume();
if(showProgressDialog)
{
myProgressDialog.show();
myProgressDialog.setProgress(myProgress);
}
}
精彩评论