在launcher上添加播放视频的插件后,改变当前的语言设置,返回到主界面后会出现异常终止的bug,以下是Log:
Error Log:java.lang.IllegalArgumentException: Wrong state class, expecting View State but received class android.appwidget.AppWidgetHostView$ParcelableSparseArray instead. This usually happens when two views of different type have the same id in the same hierarchy. This view's id is id/0xff0000. Make sure other views do not use the same id.
以下是launcher对应的代码:
if (mSavedInstanceState != null) { super.onRestoreInstanceState(mSavedInstanceState); mSavedInstanceState = null; }我不知道咋么进行修改,看了下ADWLauncher对应的代码,以下是它的处理方式及说明:
//ADW: sometimes on rotating the phone, some widgets fail to restore its states.... so... damn.
try{
super.onRestoreInstanceState(mSavedInstanceState);
}catch(Exception e){}
mSavedInstanceState = null;我也这样进行修改后就没有出现过问题了~~