I'm showing a dialog fragment like progressDialog.show(getSupportFragmentManager());
When my thread finishes, the dialog is dismissed. This is not working after screen rotation, because my 'progressDialog' variable is not set.
Using progressDialog.show(getSupportFragmentManager(), "progressDialog");
and retaining the fragment manually would work, but this function is deprecated...
So what is the correct way to do this?