When you rotate your device, activity executes
onSaveInstanceState
method and save the current state which means it saves your fragment state as well, after recreation it executes
onCreate(Bundle savedInstanceState)
method again, savedInstanceState holds your old data, in here you can make something like
if (savedInstanceState == null){
YourDialogFragment f = new YourDialogFragment()
f.show // etc
}
Only once your fragment will be created, instead of putting a control inside fragment, you can control it by the activity