小编Mer*_*din的帖子

Fragments中commit()和commitAllowingStateLoss()之间有什么区别

我在我的项目中使用了commit方法,它使用片段构建它.

无论如何,有时我得到IllegalStateException: Can not perform this action after onSaveInstanceState错误,我找不到任何关于它的好解决方案,但只是这种方法commitAllowingStateLoss().我改变了提交功能,commitAllowingStateLoss()但没有长时间使用它进行测试,所以这个功能可以帮助我吗?而主要的问题是,commit()和之间有什么区别commitAllowingStateLoss()

java android android-fragments

44
推荐指数
1
解决办法
2万
查看次数

标签 统计

android ×1

android-fragments ×1

java ×1