FlycoTabLayout
FlycoTabLayout copied to clipboard
modify onRestoreInstanceState NullPointerException
modify NullPointerException in SlidingTabLayout at line 343 "getWidth()" see #333 #384
可惜作者不活跃了
继承父类 @Override protected void onRestoreInstanceState(Parcelable state) { if (state instanceof Bundle) { Bundle bundle = (Bundle) state; int position = bundle.getInt("mCurrentTab"); mLogger.info("tag_count", "" + this.getTabCount() + "position:" + position); if (position >= this.getTabCount()) { mLogger.info("position > tag_count", "重置current为0"); bundle.putInt("mCurrentTab", 0); } } super.onRestoreInstanceState(state); mLogger.info("tag_count", "" + this.getTabCount()); }