@Override public void onRestoreInstanceState(Parcelable state) { if (state instanceof Bundle) { Bundle bundle = (Bundle) state; swipeRightEnabled = bundle.getBoolean(STATE_SWIPE_RIGHT_ENABLED, true); swipeLeftEnabled = bundle.getBoolean(STATE_SWIPE_LEFT_ENABLED, true); state = bundle.getParcelable(STATE_SUPER); } super.onRestoreInstanceState(state); }
@Override public void onRestoreInstanceState(Parcelable state) { super.onRestoreInstanceState(state); mLastPosition = getCurrentItem(); mLastScrollOffset = 0f; }
@Override public void onRestoreInstanceState(Parcelable state) { super.onRestoreInstanceState(state); post(new Runnable() { @Override public void run() { //Force rerendering so the week is drawn again when you return to the view after // back button press. if (adapter != null) { adapter.notifyDataSetChanged(); } } }); }
@Override public void onRestoreInstanceState(Parcelable state) { if (!(state instanceof SavedState)) { super.onRestoreInstanceState(state); return; } SavedState ss = (SavedState) state; super.onRestoreInstanceState(ss.getSuperState()); mMultiPagePlugin.setPageHeightWidthRatio(ss.mPageHeightWidthRatio); mMultiPagePlugin.setPageHorizontalMinMargin(ss.mPageHorizontalMinMargin); mMultiPagePlugin.setPageVerticalMinMargin(ss.mPageVerticalMinMargin); }