I have this Android activity/layout with a button. When I click this button, it opens a DialogFragment with 2 spinners. When the DialogFragment shows up, I need to populate thes
Apparently thats a widely complained about subject with ProgressDialog
, I suggest you try a normal dialog, created with the builder and whose layout (a custom one made by you) includes the progress bar or loading or whatever you need. This should solve your problem.
I also had a problem when my parent DialogFragment was recreated due to configuration change. I couldn't make the progressDialog to be visible on top again. The solution was to show progressDialog in the onResume() event:
@Override
public void onResume() {
super.onResume();
if (inProgress) {
progressDialog = ProgressDialog.show(ctx, "Report request", "connecting...", true);
}
}