您的位置:首页 > 其它

IllegalStateException: Can not perform this action after onSaveInstanceState - How to prevent?

2013-07-22 10:51 483 查看
Please check my answer here. Basically I just had to :

@Override
protected void onSaveInstanceState(Bundle outState) {
//No call for super(). Bug on API Level > 11.
}

don't make the call to
super()
on the
saveInstanceState
method. This was messing things up...

EDIT: after some more research, this is a know
bug in the support package.

If you nead to save the instance, and add something to your
outState

Bundle
you can use the following :

@Override
protected void onSaveInstanceState(Bundle outState) {
outState.putString("WORKAROUND_FOR_BUG_19917_KEY", "WORKAROUND_FOR_BUG_19917_VALUE");
super.onSaveInstanceState(outState);
}
 http://stackoverflow.com/questions/7575921/illegalstateexception-can-not-perform-this-action-after-onsaveinstancestate-h


内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐