Answer the question
In order to leave comments, you need to log in
Problem with arrow in toolbar, Fatal Exception: java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState?
I create an activity, from this activity I create the same one but with a different parameter. If you click on the arrow in the toolbar on the 2nd activity, it will close, if you click again next, nothing will happen
@Override
public void onClickDrawerNavigation() {
NewsActivity.this.finish();
}
NewsActivity.this.finish();
with onBackPressed();
Fatal Exception: java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState
at android.support.v4.app.FragmentManagerImpl.checkStateLoss(FragmentManager.java:1489)
at android.support.v4.app.FragmentManagerImpl.popBackStackImmediate(FragmentManager.java:584)
at android.support.v4.app.FragmentActivity.onBackPressed(FragmentActivity.java:169)
at ru.cl.cl.NewsActivity.onBackPressed(NewsActivity.java:163)
at ru.cl.cl.NewsActivity.onClickDrawerNavigation(NewsActivity.java:171)
at ru.cl.cl.DrawerMenu$1.onNavigationClickListener(DrawerMenu.java:87)
at com.mikepenz.materialdrawer.DrawerBuilder$1.onClick(DrawerBuilder.java:1327)
at android.view.View.performClick(View.java:5181)
at android.view.View$PerformClick.run(View.java:20887)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:5942)
at java.lang.reflect.Method.invoke(Method.java)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1400)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1195)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question