IllegalStateException: Can not perform this action after onSaveInstanceState

来源:互联网 发布:手机恢复数据软件 编辑:程序博客网 时间:2024/05/18 04:29
IllegalStateException: Can not perform this action after onSaveInstanceState
 我的问题是使用viewgroup,按返回的时候,
 网上搜很多答案
http://stackoverflow.com/questions/7575921/illegalstateexception-can-not-perform-this-action-after-onsaveinstancestate-h
 以下是我的当前解决的, 不确定是不是,至少不报错了,有时间再测试
      说api11以后,
super.onSaveInstanceState(outState); 没有调用这个,不过加了好像也有问题。
 下面是我现在的解决方法 -----2013年6月3日15:05:55 好像不行,过几天再测试
@Overridepublic boolean onKeyDown(int keyCode, KeyEvent event) {// TODO Auto-generated method stubif(keyCode == KeyEvent.KEYCODE_BACK){this.finish();this.getParent().finish();}return super.onKeyDown(keyCode, event);}

原创粉丝点击