IndexOutOfBoundsException 索引越界
Created by: songfeibeijing
错误日志 java.util.ArrayList.get(ArrayList.java:437) com.chaychan.library.BottomBarLayout.onRestoreInstanceState(BottomBarLayout.java:272) android.view.View.dispatchRestoreInstanceState(View.java:18814)
相关代码 protected void onRestoreInstanceState(Parcelable state) { if (state instanceof Bundle) { Bundle bundle = (Bundle)state; this.mCurrentItem = bundle.getInt("state_item"); this.resetState(); ((BottomBarItem)this.mItemViews.get(this.mCurrentItem)).setStatus(true); super.onRestoreInstanceState(bundle.getParcelable("instance_state")); } else { super.onRestoreInstanceState(state); }
}
mItemViews 这里 index---0 ; size --- 0
请问要怎么处理