@Override
  public void onRestoreInstanceState(Parcelable state) {
    if (!(state instanceof SavedState)) {
      super.onRestoreInstanceState(state);
      return;
    }

    SavedState ss = (SavedState) state;
    super.onRestoreInstanceState(ss.getSuperState());

    setText(ss.prefix);
    prefix = ss.prefix;
    updateHint();
    allowDuplicates = ss.allowDuplicates;
    tokenClickStyle = ss.tokenClickStyle;
    deletionStyle = ss.tokenDeleteStyle;

    resetListeners();
    for (Object obj : convertSerializableArrayToObjectArray(ss.baseObjects)) {
      addObject(obj);
    }

    // This needs to happen after all the objects get added (which also get posted)
    // or the view truncates really oddly
    if (!isFocused()) {
      post(
          new Runnable() {
            @Override
            public void run() {
              // Resize the view nad display the +x if appropriate
              handleFocus(isFocused());
            }
          });
    }
  }
  @Override
  protected void onRestoreInstanceState(Parcelable state) {
    SavedState savedState = (SavedState) state;
    super.onRestoreInstanceState(savedState.getSuperState());

    if (savedState.mRightPaneVisible) showRightPane(false);
  }
Пример #3
0
 @Override
 public void onRestoreInstanceState(Parcelable state) {
   SavedState ss = (SavedState) state;
   super.onRestoreInstanceState(ss.getSuperState());
   setYearRange(ss.yearMin, ss.yearMax);
   setYear(ss.year);
 }
Пример #4
0
 @Override
 public void onRestoreInstanceState(Parcelable state) {
   SavedState ss = (SavedState) state;
   mPrevScrollY = ss.prevScrollY;
   mScrollY = ss.scrollY;
   super.onRestoreInstanceState(ss.getSuperState());
 }
 @Override
 public void onRestoreInstanceState(Parcelable state) {
   SavedState savedState = (SavedState) state;
   super.onRestoreInstanceState(savedState.getSuperState());
   currentPosition = savedState.currentPosition;
   requestLayout();
 }
  @Override
  public void onRestoreInstanceState(Parcelable state) {
    SavedState ss = (SavedState) state;
    super.onRestoreInstanceState(ss.getSuperState());

    setProgress(ss.progress);
    setSecondaryProgress(ss.secondaryProgress);
  }
  @Override
  protected void onRestoreInstanceState(Parcelable state) {
    SavedState ss = (SavedState) state;

    super.onRestoreInstanceState(ss.getSuperState());
    if (ss.state >= 0) setLineMorphingState(ss.state, false);
    requestLayout();
  }
Пример #8
0
  @Override
  protected void onRestoreInstanceState(Parcelable state) {
    SavedState ss = (SavedState) state;

    super.onRestoreInstanceState(ss.getSuperState());
    setChecked(ss.checked);
    requestLayout();
  }
  @Override
  protected void onRestoreInstanceState(Parcelable state) {
    SavedState ss = (SavedState) state;
    super.onRestoreInstanceState(ss.getSuperState());

    if (ss.bShowMenu) showMenu();
    else hideMenu();
  }
 @Override
 public void onRestoreInstanceState(Parcelable state) {
   SavedState savedState = (SavedState) state;
   super.onRestoreInstanceState(savedState.getSuperState());
   mCurrentPage = savedState.currentPage;
   mSnapPage = savedState.currentPage;
   requestLayout();
 }
Пример #11
0
 @Override
 protected void onRestoreInstanceState(Parcelable state) {
   SavedState ss = (SavedState) state;
   super.onRestoreInstanceState(ss.getSuperState());
   this.color = ss.color;
   this.currentAction = ss.currentAction;
   this.animationProgress = 1f;
 }
Пример #12
0
 @Override
 protected void onRestoreInstanceState(Parcelable state) {
   SavedState ss = (SavedState) state;
   super.onRestoreInstanceState(ss.getSuperState());
   setDate(ss.mYear, ss.mMonth, ss.mDay);
   updateSpinners();
   updateCalendarView();
 }
Пример #13
0
 @Override
 public void onRestoreInstanceState(Parcelable state) {
   SavedState ss = (SavedState) state;
   super.onRestoreInstanceState(ss.getSuperState());
   for (int i = 0; i < getChildCount(); i++) {
     getChildAt(i).restoreHierarchyState(ss.childrenStates);
   }
 }
 @Override
 protected void onRestoreInstanceState(Parcelable state) {
   SavedState savedState = (SavedState) state;
   super.onRestoreInstanceState(savedState.getSuperState());
   if (savedState.currentScreen != INVALID_SCREEN) {
     mCurrentPage = savedState.currentScreen;
   }
 }
  @Override
  public void onRestoreInstanceState(Parcelable state) {
    SavedState ss = (SavedState) state;

    super.onRestoreInstanceState(ss.getSuperState());
    mAreHeadersSticky = ss.areHeadersSticky;

    requestLayout();
  }
  @Override
  protected void onRestoreInstanceState(Parcelable state) {
    SavedState savedState = (SavedState) state;
    super.onRestoreInstanceState(savedState.getSuperState());

    numberPicker1.setValue(savedState.getNumber1());
    numberPicker2.setValue(savedState.getNumber2());
    numberPicker3.setValue(savedState.getNumber3());
  }
Пример #17
0
 @Override
 protected void onRestoreInstanceState(Parcelable state) {
   SavedState ss = (SavedState) state;
   super.onRestoreInstanceState(ss.getSuperState());
   set24Hour(ss.is24Hour);
   setMode(ss.mode, false);
   setHour(ss.hour);
   setMinute(ss.minute);
 }
 @Override
 protected void onRestoreInstanceState(Parcelable state) {
   Log.e(TAG, "onRestoreInstanceState");
   SavedState savedState = (SavedState) state;
   super.onRestoreInstanceState(savedState.getSuperState());
   if (savedState.currentScreen != -1) {
     mCurrentScreen = savedState.currentScreen;
     Launcher.setScreen(mCurrentScreen);
   }
 }
Пример #19
0
 @Override
 protected void onRestoreInstanceState(Parcelable state) {
   final SavedState ss = (SavedState) state;
   super.onRestoreInstanceState(ss.getSuperState());
   setPattern(DisplayMode.Correct, LockPatternUtils.stringToPattern(ss.getSerializedPattern()));
   mPatternDisplayMode = DisplayMode.values()[ss.getDisplayMode()];
   mInputEnabled = ss.isInputEnabled();
   mInStealthMode = ss.isInStealthMode();
   mEnableHapticFeedback = ss.isTactileFeedbackEnabled();
 }
 @Override
 protected void onRestoreInstanceState(Parcelable state) {
   if (state == null || !state.getClass().equals(SavedState.class)) {
     super.onRestoreInstanceState(state);
     return;
   }
   SavedState myState = (SavedState) state;
   super.onRestoreInstanceState(myState.getSuperState());
   setChecked(myState.checked);
 }
 @Override
 public void onRestoreInstanceState(Parcelable state) {
   SavedState ss = (SavedState) state;
   mPrevFirstVisiblePosition = ss.prevFirstVisiblePosition;
   mPrevFirstVisibleChildHeight = ss.prevFirstVisibleChildHeight;
   mPrevScrolledChildrenHeight = ss.prevScrolledChildrenHeight;
   mPrevScrollY = ss.prevScrollY;
   mScrollY = ss.scrollY;
   mChildrenHeights = ss.childrenHeights;
   super.onRestoreInstanceState(ss.getSuperState());
 }
Пример #22
0
 @Override
 protected void onRestoreInstanceState(Parcelable state) {
   SavedState ss = (SavedState) state;
   super.onRestoreInstanceState(ss.getSuperState());
   mYear = ss.getYear();
   mMonth = ss.getMonth();
   mDay = ss.getDay();
   mHasYear = ss.hasYear();
   mYearOptional = ss.isYearOptional();
   updateSpinners();
 }
Пример #23
0
 /** Called when Android restores the activity. */
 @Override
 protected void onRestoreInstanceState(Parcelable state) {
   if (state == null || !state.getClass().equals(SavedState.class)) {
     super.onRestoreInstanceState(state);
     setTheTime(((SavedState) state).dateValue);
   } else {
     SavedState s = (SavedState) state;
     super.onRestoreInstanceState(s.getSuperState());
     setTheTime(s.dateValue);
   }
 }
 @Override
 protected void onRestoreInstanceState(Parcelable state) {
   if (state == null || !(state instanceof SavedState)) {
     super.onRestoreInstanceState(state);
     return;
   }
   SavedState ss = (SavedState) state;
   super.onRestoreInstanceState(ss.getSuperState());
   setValue(ss.mValue);
   setMaxValue(ss.mMaxValue);
 }
Пример #25
0
 /** Restore the previous saved current screen */
 @Override
 protected void onRestoreInstanceState(Parcelable state) {
   SavedState savedState = (SavedState) state;
   super.onRestoreInstanceState(savedState.getSuperState());
   if (savedState.currentRow != -1) {
     mCurrentRow = savedState.currentRow;
   }
   if (savedState.currentColumn != -1) {
     mCurrentColumn = savedState.currentColumn;
   }
 }
Пример #26
0
  @Override
  public void onRestoreInstanceState(Parcelable state) {
    if (!(state instanceof SavedState)) {
      super.onRestoreInstanceState(state);
      return;
    }

    SavedState savedState = (SavedState) state;
    super.onRestoreInstanceState(savedState.getSuperState());

    mSavedState = savedState;
  }
Пример #27
0
 @Override
 protected void onRestoreInstanceState(Parcelable state) {
   if (!state.getClass().equals(SavedState.class)) {
     super.onRestoreInstanceState(state);
     return;
   }
   SavedState myState = (SavedState) state;
   super.onRestoreInstanceState(myState.getSuperState());
   mProgress = myState.progress;
   mMax = myState.max;
   notifyChanged();
 }
Пример #28
0
  @Override
  public void onRestoreInstanceState(Parcelable state) {
    if (!(state instanceof SavedState)) {
      super.onRestoreInstanceState(state);
      return;
    }
    SavedState ss = (SavedState) state;
    super.onRestoreInstanceState(ss.getSuperState());

    step = ss.step;
    isStarting = ss.isStarting;
  }
Пример #29
0
  @Override
  protected void onRestoreInstanceState(Parcelable state) {
    if (state == null || !state.getClass().equals(SavedState.class)) {
      // Didn't save state for us in onSaveInstanceState
      super.onRestoreInstanceState(state);
      return;
    }

    SavedState myState = (SavedState) state;
    super.onRestoreInstanceState(myState.getSuperState());
    setValue(myState.value);
  }
  /** Restores the visibility of the child EditTexts, and mHideOptional. */
  @Override
  protected void onRestoreInstanceState(Parcelable state) {
    SavedState ss = (SavedState) state;
    super.onRestoreInstanceState(ss.getSuperState());

    mHideOptional = ss.mHideOptional;

    int numChildren = Math.min(mFieldEditTexts.length, ss.mVisibilities.length);
    for (int i = 0; i < numChildren; i++) {
      mFieldEditTexts[i].setVisibility(ss.mVisibilities[i]);
    }
  }