Gaurav
07/25/2022, 4:06 PMoverride fun onBackPressed() {
if (supportFragmentManager.backStackEntryCount <= 1) {
finish()
} else {
supportFragmentManager.popBackStack()
}
}
now sometime i am getting this exception
java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState
this may be happening bcoz state is getting saved and then popBackStack() is called...
need help...how to handle this situation...i can put a check isStateSaved or not....but i want to handle those cases also where state is saved and user clicked on back press....What to do in such scenario...How to do back press handling when state is saved??
please suggest some solution..
Thanks a lot in advance.🙏Nikolay Puliaev
07/25/2022, 4:11 PMRobert Williams
07/25/2022, 4:17 PMGaurav
07/25/2022, 4:33 PMGaurav
07/25/2022, 4:34 PMRobert Williams
07/25/2022, 4:40 PM