情景:项目中使用DialogFragment 做登录的加载对话框,正常使用是没问题的,当按下手机home键时APP爆了
java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState错。经过这篇文章的启发。查看DialogFragment 源码。
将dimess方法改为
dismissAllowingStateLoss()即可
情景:项目中使用DialogFragment 做登录的加载对话框,正常使用是没问题的,当按下手机home键时APP爆了
java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState错。经过这篇文章的启发。查看DialogFragment 源码。
将dimess方法改为
dismissAllowingStateLoss()即可