ich zeigen eine DialogFragment innerhalb einer Schaltfläche OnClick-Ereignis wie folgt:Fatal Exception: java.lang.IllegalStateException: Diese Aktion kann nicht nach onSaveInstanceState ausführen
public void onButtonClick() {
myDialogFragment.show(getSupportFragmentManager(), "dialog");
}
Warum es Illegal verursacht, kann es nach onSaveInstanceState genannt? Hier ist das Protokoll:
Fatal Exception: java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState
at android.support.v4.app.FragmentManagerImpl.checkStateLoss(FragmentManager.java:1377)
at android.support.v4.app.FragmentManagerImpl.enqueueAction(FragmentManager.java:1395)
at android.support.v4.app.BackStackRecord.commitInternal(BackStackRecord.java:637)
at android.support.v4.app.BackStackRecord.commit(BackStackRecord.java:616)
at android.support.v4.app.DialogFragment.show(DialogFragment.java:139)
at com.a.b.AFragment.editSex(AFragment.java:226)
at com.a.b.AFragment.access$200(AFragment.java:46)
at com.a.b.AFragment$3.onButtonClick(AFragment.java:134)
werfen Sie einen Blick auf diese http://stackoverflow.com/questions/22713002/java-lang-illegalstateexception-can-not-perform-this-action-after-onsaveinstanc –
Beitrag einige Code mit logcat – Chandrakanth
Bitte lesen http://stackoverflow.com/help/how-to-ask – Chandrakanth