android.widget.ImageButton.onRestoreInstanceState()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(4.5k)|赞(0)|评价(0)|浏览(129)

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

ImageButton.onRestoreInstanceState介绍

暂无

代码示例

代码示例来源:origin: Clans/FloatingActionButton

@Override
public void onRestoreInstanceState(Parcelable state) {
  if (!(state instanceof ProgressSavedState)) {
    super.onRestoreInstanceState(state);
    return;
  }
  ProgressSavedState ss = (ProgressSavedState) state;
  super.onRestoreInstanceState(ss.getSuperState());
  this.mCurrentProgress = ss.mCurrentProgress;
  this.mTargetProgress = ss.mTargetProgress;
  this.mSpinSpeed = ss.mSpinSpeed;
  this.mProgressWidth = ss.mProgressWidth;
  this.mProgressColor = ss.mProgressColor;
  this.mProgressBackgroundColor = ss.mProgressBackgroundColor;
  this.mShouldProgressIndeterminate = ss.mShouldProgressIndeterminate;
  this.mShouldSetProgress = ss.mShouldSetProgress;
  this.mProgress = ss.mProgress;
  this.mAnimateProgress = ss.mAnimateProgress;
  this.mShowProgressBackground = ss.mShowProgressBackground;
  this.mLastTimeAnimated = SystemClock.uptimeMillis();
}

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

@Override
public void onRestoreInstanceState(Parcelable state) {
  if (!(state instanceof GifViewSavedState)) {
    super.onRestoreInstanceState(state);
    return;
  }
  GifViewSavedState ss = (GifViewSavedState) state;
  super.onRestoreInstanceState(ss.getSuperState());
  ss.restoreState(getDrawable(), 0);
  ss.restoreState(getBackground(), 1);
}

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

@Override
public void onRestoreInstanceState(Parcelable state) {
  if (!(state instanceof ProgressSavedState)) {
    super.onRestoreInstanceState(state);
    return;
  }
  ProgressSavedState ss = (ProgressSavedState) state;
  super.onRestoreInstanceState(ss.getSuperState());
  this.mCurrentProgress = ss.mCurrentProgress;
  this.mTargetProgress = ss.mTargetProgress;
  this.mSpinSpeed = ss.mSpinSpeed;
  this.mProgressWidth = ss.mProgressWidth;
  this.mProgressColor = ss.mProgressColor;
  this.mProgressBackgroundColor = ss.mProgressBackgroundColor;
  this.mShouldProgressIndeterminate = ss.mShouldProgressIndeterminate;
  this.mShouldSetProgress = ss.mShouldSetProgress;
  this.mProgress = ss.mProgress;
  this.mAnimateProgress = ss.mAnimateProgress;
  this.mShowProgressBackground = ss.mShowProgressBackground;
  this.mLastTimeAnimated = SystemClock.uptimeMillis();
}

代码示例来源:origin: douzifly/clear-todolist

@Override
public void onRestoreInstanceState(Parcelable state) {
  if (!(state instanceof ProgressSavedState)) {
    super.onRestoreInstanceState(state);
    return;
  }
  ProgressSavedState ss = (ProgressSavedState) state;
  super.onRestoreInstanceState(ss.getSuperState());
  this.mCurrentProgress = ss.mCurrentProgress;
  this.mTargetProgress = ss.mTargetProgress;
  this.mSpinSpeed = ss.mSpinSpeed;
  this.mProgressWidth = ss.mProgressWidth;
  this.mProgressColor = ss.mProgressColor;
  this.mProgressBackgroundColor = ss.mProgressBackgroundColor;
  this.mShouldProgressIndeterminate = ss.mShouldProgressIndeterminate;
  this.mShouldSetProgress = ss.mShouldSetProgress;
  this.mProgress = ss.mProgress;
  this.mAnimateProgress = ss.mAnimateProgress;
  this.mShowProgressBackground = ss.mShowProgressBackground;
  this.mLastTimeAnimated = SystemClock.uptimeMillis();
}

代码示例来源:origin: LongDinhF/Hamburger-Button

@Override
public void onRestoreInstanceState(Parcelable state) {
  mCanInvalidate = 0;
  HBButtonSavedState hbButtonSavedState = (HBButtonSavedState) state;
  super.onRestoreInstanceState(hbButtonSavedState.getSuperState());
  mBorderThickness = hbButtonSavedState.borderThickness;
  mBorderColor = hbButtonSavedState.borderColor;
  mBorderCornersRadius = hbButtonSavedState.borderCornersRadius;
  mBackgroundColor = hbButtonSavedState.backgroundColor;
  mLineThickness = hbButtonSavedState.lineThickness;
  mLineColor = hbButtonSavedState.lineColor;
  mLineCornersRadius = hbButtonSavedState.lineCornersRadius;
  mLineWidthPadding = hbButtonSavedState.lineWidthPadding;
  mAnimationDuration = hbButtonSavedState.animationDuration;
  mSlideLeftToRight = hbButtonSavedState.slideLeftToRight;
  mCurrentState = hbButtonSavedState.currentState;
  mRFBorder = hbButtonSavedState.rfBorder;
  mRFBackground = hbButtonSavedState.rfBackground;
  mRFSlider = hbButtonSavedState.rfSlider;
  mLineCenter = hbButtonSavedState.lineCenter;
  mLineTop = hbButtonSavedState.lineTop;
  mLineBottom = hbButtonSavedState.lineBottom;
  mCanInvalidate = 1;
}

代码示例来源:origin: konradrenner/kolabnotes-android

@Override
  public void onRestoreInstanceState(Parcelable state) {
    SavedState savedState = (SavedState) state;

    super.onRestoreInstanceState(savedState.getSuperState());
    setChecked(savedState.checked);
    requestLayout();
  }
}

相关文章

ImageButton类方法