How to properly retain a DialogFragment through rotation?
Inside your DialogFragment, call Fragment.setRetainInstance(boolean) with the value true. You don’t need to save the fragment manually, the framework already takes care of all of this. Calling this will prevent your fragment from being destroyed on rotation and your network requests will be unaffected. You may have to add this code to stop your dialog … Read more