android.widget.TextView.onSaveInstanceState()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(3.0k)|赞(0)|评价(0)|浏览(103)

本文整理了Java中android.widget.TextView.onSaveInstanceState()方法的一些代码示例,展示了TextView.onSaveInstanceState()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TextView.onSaveInstanceState()方法的具体详情如下:
包路径:android.widget.TextView
类名称:TextView
方法名:onSaveInstanceState

TextView.onSaveInstanceState介绍

暂无

代码示例

代码示例来源:origin: Bearded-Hen/Android-Bootstrap

@Override public Parcelable onSaveInstanceState() {
  Bundle bundle = new Bundle();
  bundle.putParcelable(TAG, super.onSaveInstanceState());
  bundle.putSerializable(BootstrapTextView.KEY, bootstrapText);
  bundle.putSerializable(BootstrapBrand.KEY, bootstrapBrand);
  return bundle;
}

代码示例来源:origin: koral--/android-gif-drawable

@Override
public Parcelable onSaveInstanceState() {
  Drawable[] savedDrawables = new Drawable[7];
  if (viewAttributes.freezesAnimation) {
    Drawable[] compoundDrawables = getCompoundDrawables();
    System.arraycopy(compoundDrawables, 0, savedDrawables, 0, compoundDrawables.length);
    Drawable[] compoundDrawablesRelative = getCompoundDrawablesRelative();
    savedDrawables[4] = compoundDrawablesRelative[0]; //start
    savedDrawables[5] = compoundDrawablesRelative[2]; //end
    savedDrawables[6] = getBackground();
  }
  return new GifViewSavedState(super.onSaveInstanceState(), savedDrawables);
}

代码示例来源:origin: curioustechizen/android-ago

@Override
public Parcelable onSaveInstanceState() {
  Parcelable superState = super.onSaveInstanceState();
  SavedState ss = new SavedState(superState);
  ss.referenceTime = mReferenceTime;
  return ss;
}

代码示例来源:origin: Blankeer/DownloadProgressButton

@Override
public Parcelable onSaveInstanceState() {
  Parcelable superState = super.onSaveInstanceState();
  return new SavedState(superState, (int) mProgress, mState, mCurrentText.toString());
}

代码示例来源:origin: hiwhitley/DownloadProgressButton

@Override
public Parcelable onSaveInstanceState() {
  Parcelable superState = super.onSaveInstanceState();
  return new DownloadProgressButton.SavedState(superState, (int) mProgress, mState, mCurrentText.toString());
}

代码示例来源:origin: jaredrummler/MaterialSpinner

@Override public Parcelable onSaveInstanceState() {
 Bundle bundle = new Bundle();
 bundle.putParcelable("state", super.onSaveInstanceState());
 bundle.putInt("selected_index", selectedIndex);
 bundle.putBoolean("nothing_selected", nothingSelected);
 if (popupWindow != null) {
  bundle.putBoolean("is_popup_showing", popupWindow.isShowing());
  collapse();
 } else {
  bundle.putBoolean("is_popup_showing", false);
 }
 return bundle;
}

代码示例来源:origin: yaozs/YzsLib

@Override
public Parcelable onSaveInstanceState() {
  Bundle bundle = new Bundle();
  bundle.putParcelable(INSTANCE_STATE, super.onSaveInstanceState());
  bundle.putInt(SELECTED_INDEX, selectedIndex);
  if (popupWindow != null) {
    bundle.putBoolean(IS_POPUP_SHOWING, popupWindow.isShowing());
    dismissDropDown();
  }
  return bundle;
}

代码示例来源:origin: andforce/iBeebo

@Override
public Parcelable onSaveInstanceState() {
  // begin boilerplate code that allows parent classes to save state
  Parcelable superState = super.onSaveInstanceState();
  SavedState ss = new SavedState(superState);
  // end
  ss.ids = this.ids;
  ss.disappear = this.disappear;
  ss.visible = this.isShown();
  ss.type = this.type;
  return ss;
}

相关文章

微信公众号

最新文章

更多

TextView类方法