片段中的 commit() 和 commitAllowingStateLoss() 有什么区别
2022-08-31 16:21:46
我在我的项目中使用了提交方法,该方法使用片段构建了它。
无论如何,有时我遇到错误,我找不到任何好的解决方案,但只是这种方法。我将提交函数更改为,但没有长时间使用它来测试,所以这个函数可以帮助我吗?主要问题是,和 之间有什么区别?IllegalStateException: Can not perform this action after onSaveInstanceState
commitAllowingStateLoss()
commitAllowingStateLoss()
commit()
commitAllowingStateLoss()