@Override protected void onRestoreInstanceState(Parcelable state) { Bundle bundle = (Bundle) state; super.onRestoreInstanceState(bundle.getParcelable(STATE_KEY_SUPER)); mSeekBarValue = bundle.getInt(STATE_KEY_SEEK_BAR_VALUE); callChangeListener((float) mSeekBarValue / SEEKBAR_RESOLUTION); } }
@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); }
@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()); setText(myState.text); }
@Override protected void onRestoreInstanceState(final Parcelable state) { if (!(state instanceof SavedState)) { super.onRestoreInstanceState(state); return; } final SavedState myState = (SavedState) state; super.onRestoreInstanceState(myState.getSuperState()); setSubtype(myState.mSubtype); }
@Override protected void onRestoreInstanceState(Parcelable state) { if (!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.wasPositiveResult); }
@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()); adapter.setList(convertStringToList(myState.text)); }
@Override protected void onRestoreInstanceState(Parcelable state) { // Check whether we saved the state in onSaveInstanceState if (state == null || !state.getClass().equals(SavedState.class)) { // Didn't save the state, so call superclass super.onRestoreInstanceState(state); return; } // Cast state to custom BaseSavedState and pass to superclass SavedState myState = (SavedState) state; super.onRestoreInstanceState(myState.getSuperState()); // Set this Preference's widget to reflect the restored state if(getDialog() != null && mColorPickerView != null) { Log.d("mColorPicker", "Restoring color!"); mColorPickerView.setColor(myState.currentColor, true); } }
@Override protected void onRestoreInstanceState(Parcelable state) { if(LOGV) Log.v(TAG, getKey() + ": onRestoreInstanceState: value=" + mValue); super.onRestoreInstanceState(InstanceState.getSuperState(state)); InstanceState.restoreTo(this, state); if(LOGV) Log.v(TAG, " value=" + mValue); final Bundle extras = InstanceState.getExtras(state); if(extras != null) { final Bundle dialogState = extras.getBundle(EXTRA_DIALOG_STATE); if(dialogState != null) showDialog(dialogState); } //mDialog.onS }