I was using the commit method in my project that built it with fragments.
Anyway, sometimes I was getting IllegalStateException: Can not perform this action after onSaveInstanceState
error and I couldn't find any good solution about it but just this method commitAllowingStateLoss()
. I changed commit function to commitAllowingStateLoss()
but didn't use it long time to test so may this function help me? And the main question, what is the difference between commit()
and commitAllowingStateLoss()
?