@Override public void onRestoreInstanceState(Parcelable state) { if (state instanceof Bundle) { Bundle bundle = (Bundle) state; Serializable text = bundle.getSerializable(BootstrapTextView.KEY); Serializable brand = bundle.getSerializable(BootstrapBrand.KEY); if (brand instanceof BootstrapBrand) { bootstrapBrand = (BootstrapBrand) brand; } if (text instanceof BootstrapText) { bootstrapText = (BootstrapText) text; } state = bundle.getParcelable(TAG); } super.onRestoreInstanceState(state); updateBootstrapState(); }
@Override public void onRestoreInstanceState(Parcelable state) { if (!(state instanceof GifViewSavedState)) { super.onRestoreInstanceState(state); return; } GifViewSavedState ss = (GifViewSavedState) state; super.onRestoreInstanceState(ss.getSuperState()); Drawable[] compoundDrawables = getCompoundDrawables(); ss.restoreState(compoundDrawables[0], 0); ss.restoreState(compoundDrawables[1], 1); ss.restoreState(compoundDrawables[2], 2); ss.restoreState(compoundDrawables[3], 3); Drawable[] compoundDrawablesRelative = getCompoundDrawablesRelative(); ss.restoreState(compoundDrawablesRelative[0], 4); ss.restoreState(compoundDrawablesRelative[2], 5); ss.restoreState(getBackground(), 6); }
@Override public void onRestoreInstanceState(Parcelable state) { if (!(state instanceof SavedState)) { super.onRestoreInstanceState(state); return; } SavedState ss = (SavedState)state; mReferenceTime = ss.referenceTime; super.onRestoreInstanceState(ss.getSuperState()); }
@Override public void onRestoreInstanceState(Parcelable state) { DownloadProgressButton.SavedState ss = (DownloadProgressButton.SavedState) state; super.onRestoreInstanceState(ss.getSuperState()); mState = ss.state; mProgress = ss.progress; mCurrentText = ss.currentText; }
@Override public void onRestoreInstanceState(Parcelable state) { SavedState ss = (SavedState) state; super.onRestoreInstanceState(ss.getSuperState()); mState = ss.state; mProgress = ss.progress; mCurrentText = ss.currentText; }
@Override public void onRestoreInstanceState(Parcelable state) { if (!(state instanceof SavedState)) { super.onRestoreInstanceState(state); return; } SavedState ss = (SavedState) state; super.onRestoreInstanceState(ss.getSuperState()); this.ids = ss.ids; this.disappear = ss.disappear; this.type = ss.type; if (ss.visible) { setVisibility(View.VISIBLE); } }
@Override public void onRestoreInstanceState(Parcelable savedState) { if (savedState instanceof Bundle) { Bundle bundle = (Bundle) savedState; selectedIndex = bundle.getInt(SELECTED_INDEX); if (adapter != null) { setText(adapter.getItemInDataset(selectedIndex).toString()); adapter.notifyItemSelected(selectedIndex); } if (bundle.getBoolean(IS_POPUP_SHOWING)) { if (popupWindow != null) { // Post the show request into the looper to avoid bad token exception post(new Runnable() { @Override public void run() { showDropDown(); } }); } } savedState = bundle.getParcelable(INSTANCE_STATE); } super.onRestoreInstanceState(savedState); }
@Override public void onRestoreInstanceState(Parcelable savedState) { if (savedState instanceof Bundle) { Bundle bundle = (Bundle) savedState; selectedIndex = bundle.getInt("selected_index"); nothingSelected = bundle.getBoolean("nothing_selected"); if (adapter != null) { if (nothingSelected && !TextUtils.isEmpty(hintText)) { setHintColor(hintColor); setText(hintText); } else { setTextColor(textColor); setText(adapter.get(selectedIndex).toString()); } adapter.notifyItemSelected(selectedIndex); } if (bundle.getBoolean("is_popup_showing")) { if (popupWindow != null) { // Post the show request into the looper to avoid bad token exception post(new Runnable() { @Override public void run() { expand(); } }); } } savedState = bundle.getParcelable("state"); } super.onRestoreInstanceState(savedState); }