本文整理了Java中android.view.View.onRestoreInstanceState()
方法的一些代码示例,展示了View.onRestoreInstanceState()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。View.onRestoreInstanceState()
方法的具体详情如下:
包路径:android.view.View
类名称:View
方法名:onRestoreInstanceState
暂无
代码示例来源:origin: androidannotations/androidannotations
@Override
protected void onRestoreInstanceState(Parcelable state) {
super.onRestoreInstanceState(state);
restoredInRestoreInstanceState = instanceField;
}
}
代码示例来源:origin: smuyyh/BookReader
@Override
protected void onRestoreInstanceState(Parcelable state) {
SavedState savedState = (SavedState) state;
super.onRestoreInstanceState(state);
mRing = savedState.ring;
}
代码示例来源:origin: wangdan/AisenWeiBo
@Override
protected void onRestoreInstanceState(Parcelable state) {
if (state instanceof Bundle) {
Bundle bundle = (Bundle) state;
colorHSV = bundle.getFloatArray("color");
super.onRestoreInstanceState(bundle.getParcelable("super"));
} else {
super.onRestoreInstanceState(state);
}
}
代码示例来源:origin: gzu-liyujiang/AndroidPicker
@Override
protected void onRestoreInstanceState(Parcelable state) {
if (!(state instanceof SavedState)) {
super.onRestoreInstanceState(state);
return;
}
SavedState ss = (SavedState) state;
super.onRestoreInstanceState(ss.getSuperState());
mIsBrightnessGradient = ss.isBrightnessGradient;
setColor(ss.color, true);
}
代码示例来源:origin: naman14/Timber
@Override
protected void onRestoreInstanceState(Parcelable state) {
Bundle savedState = (Bundle) state;
Parcelable superState = savedState.getParcelable("PARENT");
super.onRestoreInstanceState(superState);
mMax = savedState.getInt("MAX");
mProgress = savedState.getInt("PROGRESS");
mCircleColor = savedState.getInt("mCircleColor");
mCircleProgressColor = savedState.getInt("mCircleProgressColor");
mPointerColor = savedState.getInt("mPointerColor");
mPointerHaloColor = savedState.getInt("mPointerHaloColor");
mPointerHaloColorOnTouch = savedState.getInt("mPointerHaloColorOnTouch");
mPointerAlpha = savedState.getInt("mPointerAlpha");
mPointerAlphaOnTouch = savedState.getInt("mPointerAlphaOnTouch");
lockEnabled = savedState.getBoolean("lockEnabled");
initPaints();
recalculateAll();
}
代码示例来源:origin: k9mail/k-9
@Override
protected void onRestoreInstanceState(Parcelable state) {
Bundle savedState = (Bundle) state;
Parcelable superState = savedState.getParcelable(STATE_PARENT);
super.onRestoreInstanceState(superState);
mAngle = savedState.getFloat(STATE_ANGLE);
mPointerColor.setColor(calculateColor(mAngle));
}
}
代码示例来源:origin: Bearded-Hen/Android-Bootstrap
@Override
public void onRestoreInstanceState(Parcelable state) {
if (state instanceof Bundle) {
Bundle bundle = (Bundle) state;
Serializable brand = bundle.getSerializable(BootstrapBrand.KEY);
if (brand instanceof BootstrapBrand) {
bootstrapBrand = (BootstrapBrand) brand;
}
this.userProgress = bundle.getInt(KEY_USER_PROGRESS);
this.drawnProgress = bundle.getInt(KEY_DRAWN_PROGRESS);
this.striped = bundle.getBoolean(KEY_STRIPED);
this.animated = bundle.getBoolean(KEY_ANIMATED);
this.rounded = bundle.getBoolean(RoundableView.KEY);
this.bootstrapSize = bundle.getFloat(BootstrapSizeView.KEY);
state = bundle.getParcelable(TAG);
}
super.onRestoreInstanceState(state);
updateBootstrapState();
setProgress(userProgress);
}
代码示例来源:origin: qiujuer/Genius-Android
@Override
protected void onRestoreInstanceState(Parcelable state) {
if (state == null || !state.getClass().equals(CustomState.class)) {
super.onRestoreInstanceState(state);
return;
}
CustomState customState = (CustomState) state;
setMin(customState.min);
setMax(customState.max);
setProgress(customState.progress);
super.onRestoreInstanceState(customState.getSuperState());
}
代码示例来源:origin: jiangqqlmj/FastDev4Android
@Override
public void onRestoreInstanceState(Parcelable state) {
SavedState savedState = (SavedState)state;
super.onRestoreInstanceState(savedState.getSuperState());
mCurrentPage = savedState.currentPage;
requestLayout();
}
代码示例来源:origin: jiangqqlmj/FastDev4Android
@Override
public void onRestoreInstanceState(Parcelable state) {
SavedState savedState = (SavedState)state;
super.onRestoreInstanceState(savedState.getSuperState());
mCurrentPage = savedState.currentPage;
requestLayout();
}
代码示例来源:origin: jiangqqlmj/FastDev4Android
@Override
public void onRestoreInstanceState(Parcelable state) {
SavedState savedState = (SavedState)state;
super.onRestoreInstanceState(savedState.getSuperState());
mCurrentPage = savedState.currentPage;
requestLayout();
}
代码示例来源:origin: jiangqqlmj/FastDev4Android
@Override
public void onRestoreInstanceState(Parcelable state) {
SavedState savedState = (SavedState)state;
super.onRestoreInstanceState(savedState.getSuperState());
mCurrentPage = savedState.currentPage;
mSnapPage = savedState.currentPage;
requestLayout();
}
代码示例来源:origin: TangoAgency/material-intro-screen
@Override
public void onRestoreInstanceState(Parcelable state) {
SavedState savedState = (SavedState) state;
super.onRestoreInstanceState(savedState.getSuperState());
currentPage = savedState.currentPage;
requestLayout();
}
代码示例来源:origin: wangdan/AisenWeiBo
@Override
public void onRestoreInstanceState(Parcelable state) {
SavedState ss = (SavedState) state;
super.onRestoreInstanceState(ss.getSuperState());
setProgress(ss.progress);
}
代码示例来源:origin: rey5137/material
@Override
protected void onRestoreInstanceState(Parcelable state) {
SavedState ss = (SavedState) state;
super.onRestoreInstanceState(ss.getSuperState());
setPosition(ss.position, false);
requestLayout();
}
代码示例来源:origin: rey5137/material
@Override
protected void onRestoreInstanceState(Parcelable state) {
SavedState ss = (SavedState) state;
super.onRestoreInstanceState(ss.getSuperState());
setChecked(ss.checked);
requestLayout();
}
代码示例来源:origin: rey5137/material
@Override
protected void onRestoreInstanceState(Parcelable state) {
SavedState ss = (SavedState) state;
super.onRestoreInstanceState(ss.getSuperState());
if(ss.state >= 0)
setLineMorphingState(ss.state, false);
requestLayout();
}
代码示例来源:origin: naman14/Timber
/**
* Restoreしてきたやつから {@link PlayPauseButton.SavedState}
* を取得し状況をセットする
* {@inheritDoc}
*/
@Override
public void onRestoreInstanceState(Parcelable state) {
SavedState savedState = (SavedState) state;
super.onRestoreInstanceState(savedState.getSuperState());
setPlayed(savedState.played);
setUpAnimator();
invalidate();
}
代码示例来源:origin: rey5137/material
@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);
}
代码示例来源:origin: seven332/EhViewer
@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();
}
内容来源于网络,如有侵权,请联系作者删除!