I want to know the best approach to handle the dialog boxes to be appeared when the user application comes to foreground.
My scenario would be like if am displaying some message in the progress dialog or normal alert dialog and i press the home button to take the application to background. And when i come back to the screen the progress dialog or alert dialog should be persisitent on the screen.
I tried putting this block in onStart() but it shows me NULL pointer exception.
onStart(){
if alertdialo开发者_运维技巧g.isShowing() alertdialog.show();
}
if(alertdialog == null){
// create your dialog here and then show it
} else if (!alertdialog.isShowing()) {
alertdialog.show();
}
精彩评论