Пример #1
0
 @Override
 public Parcelable onSaveInstanceState() {
   Parcelable superState = super.onSaveInstanceState();
   SavedState ss = new SavedState(superState);
   ss.selectedId = getSelectedItemId();
   if (ss.selectedId >= 0) {
     ss.position = getSelectedItemPosition();
   } else {
     ss.position = INVALID_POSITION;
   }
   return ss;
 }
Пример #2
0
 @Override
 public Parcelable onSaveInstanceState() {
   Parcelable superState = super.onSaveInstanceState();
   SavedState savedState = new SavedState(superState);
   savedState.position = mPosition;
   savedState.backgroundColorPressed = mBackgroundColorPressed;
   savedState.textColor = mTextColor;
   savedState.textColorCenter = mTextColorCenter;
   savedState.lineColorCenter = mLineColorCenter;
   savedState.lineHeight = mLineHeight;
   savedState.tabPaddingLeft = mTabPaddingLeft;
   savedState.tabPaddingTop = mTabPaddingTop;
   savedState.tabPaddingRight = mTabPaddingRight;
   savedState.tabPaddingBottom = mTabPaddingBottom;
   savedState.textSize = mTextSize;
   return savedState;
 }