Closed flaviusdemian closed 8 years ago
I have to mention that this works perfectly if I just do one level navigation back and forth from the FragmentActivity to the Activities...It happens only when we have more than 1 navigation level. Most probably the stack of fragments generates the problem
not sure if this is the case, but this error Java.Lang.IllegalStateExceptionCan not perform this action after onSaveInstanceState
usually means a fragment transaction is run when activity save state was already run, something shouldn't happen because it means fragment transaction is lost
and sometimes this happens when doing asynchronous fragment navigation
I don't think this helps at all...
Have you tried to debug it a bit with the source code? Any luck?
Hello Andrei,
I have changed everywhere to commitAllowingStateLoss and it did not help. I don't have anything async there. I will provide tomorrow a small demo in which it breaks.
Flavius
Salut Flavius, to "fix" the erorr maybe you could catch the exception, but note that fragment transaction won't be saved. ideally you need to figure out what triggers this situation and fix it
by the way, for now, why don't you only use MvxAppCompatActivity?
For the drawer I need to use a FragmentActivity. Besides this, I use MvxAppCompatActivity.
Not sure, but try with MvxCachingFragmentCompatActivity
I will. Normally it is not needed. I will let you know how it worked. Mersi
I think we have nailed it...It was something we did. We had an action hooked from another fragment which was already disposed. We still have one scenario. I will get back to you if it's now fixed.
Thank you for your info.
Steps to reproduce
Expected behavior
It should close Activity B and open Activity A which has a viewpager with 2 fragments.
Actual behavior
Configuration
MvvmCrossVersion:
Android Support V4 version :