Can anyone see if I am doing the following correctly. I have a fragment with a progressive dialog, and I need it to work through the orientation switch. I am currently doing it like this:
In my activity, I create this ProgressDialogFragment, and I call show () when I need the dialog to show. I am trying to understand why in the onCreateDialog method I cannot just return mProgressDialog if it already exists (I get an exception: "requestFeature () must be called before adding content"). Of course, one way to use fragments is to reuse resources in these cases - why do I need to create a new dialog box instead of using the one that already exists?
source share