Implementing an app where the user can log in I have the following situation: If the user is logged in perform the action else start the login activity for result and if the
This exception is thrown whenever a FragmentTrasaction
is commited after FragmentManager
has saved its state. The easy and clean way is to check if FragmentManager
has already saved state before showing a DialogFragment
.
if(!getSupportFragmentManager.isStateSaved()) {
MyDialogFragment dialogFragment = new MyDialogFragment()
dialogFragment.show(getSupportFragmentManager, TAG);
}