您的位置:首页 > 其它

解决IllegalStateException: Can not perform this action after onSaveInstanceState

2015-08-12 10:02 585 查看

使用Activity与Fragment遇到的问题

解决方法1:

在Activity内部复写onSaveInstanceState方法

@Override protected void onSaveInstanceState(Bundle outState) {
//super.onSaveInstanceState(outState);
}


解决方法2:

transaction.commitAllowingStateLoss();//commitAllowingStateLosscommit();
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: