本文整理了Java中android.widget.ImageView.onRestoreInstanceState()
方法的一些代码示例,展示了ImageView.onRestoreInstanceState()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ImageView.onRestoreInstanceState()
方法的具体详情如下:
包路径:android.widget.ImageView
类名称:ImageView
方法名:onRestoreInstanceState
暂无
代码示例来源:origin: android10/Android-CleanArchitecture
@Override protected void onRestoreInstanceState(Parcelable state) {
if(!(state instanceof SavedState)) {
super.onRestoreInstanceState(state);
return;
}
SavedState savedState = (SavedState)state;
super.onRestoreInstanceState(savedState.getSuperState());
this.imagePlaceHolderResId = savedState.imagePlaceHolderResId;
this.imageUrl = savedState.imageUrl;
this.setImageUrl(this.imageUrl);
}
代码示例来源:origin: Bearded-Hen/Android-Bootstrap
@Override public void onRestoreInstanceState(Parcelable state) {
if (state instanceof Bundle) {
Bundle bundle = (Bundle) state;
this.hasBorder = bundle.getBoolean(BorderView.KEY_DISPLAYED);
this.bootstrapSize = bundle.getFloat(BootstrapSizeView.KEY);
Serializable brand = bundle.getSerializable(BootstrapBrandView.KEY);
if (brand instanceof BootstrapBrand) {
this.bootstrapBrand = (BootstrapBrand) brand;
}
state = bundle.getParcelable(TAG);
}
super.onRestoreInstanceState(state);
updateImageState();
}
代码示例来源: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: igreenwood/SimpleCropView
@Override public void onRestoreInstanceState(Parcelable state) {
SavedState ss = (SavedState) state;
super.onRestoreInstanceState(ss.getSuperState());
this.mCropMode = ss.mode;
this.mBackgroundColor = ss.backgroundColor;
代码示例来源:origin: multidots/android-app-common-tasks
@Override
public void onRestoreInstanceState(Parcelable state) {
if (state instanceof Bundle) {
Bundle bundle = (Bundle) state;
normalizedScale = bundle.getFloat("saveScale");
m = bundle.getFloatArray("matrix");
prevMatrix.setValues(m);
prevMatchViewHeight = bundle.getFloat("matchViewHeight");
prevMatchViewWidth = bundle.getFloat("matchViewWidth");
prevViewHeight = bundle.getInt("viewHeight");
prevViewWidth = bundle.getInt("viewWidth");
imageRenderedAtLeastOnce = bundle.getBoolean("imageRendered");
super.onRestoreInstanceState(bundle.getParcelable("instanceState"));
return;
}
super.onRestoreInstanceState(state);
}
代码示例来源:origin: multidots/android-app-common-tasks
@Override
public void onRestoreInstanceState(Parcelable state) {
if (state instanceof Bundle) {
Bundle bundle = (Bundle) state;
normalizedScale = bundle.getFloat("saveScale");
m = bundle.getFloatArray("matrix");
prevMatrix.setValues(m);
prevMatchViewHeight = bundle.getFloat("matchViewHeight");
prevMatchViewWidth = bundle.getFloat("matchViewWidth");
prevViewHeight = bundle.getInt("viewHeight");
prevViewWidth = bundle.getInt("viewWidth");
imageRenderedAtLeastOnce = bundle.getBoolean("imageRendered");
super.onRestoreInstanceState(bundle.getParcelable("instanceState"));
return;
}
super.onRestoreInstanceState(state);
}
代码示例来源:origin: WuLiFei/SpannableStringDemo
@Override
protected void onRestoreInstanceState(Parcelable state) {
if (state instanceof Bundle) {
Bundle bundle = (Bundle) state;
super.onRestoreInstanceState(((Bundle) state).getParcelable(STATE_INSTANCE));
this.type = bundle.getInt(STATE_TYPE);
this.mBorderRadius = bundle.getInt(STATE_BORDER_RADIUS);
}
else {
super.onRestoreInstanceState(state);
}
}
代码示例来源:origin: fanturbo/Kanzhibo
@Override
protected void onRestoreInstanceState(Parcelable state) {
if (state instanceof Bundle) {
Bundle bundle = (Bundle) state;
super.onRestoreInstanceState(((Bundle) state)
.getParcelable(STATE_INSTANCE));
this.type = bundle.getInt(STATE_TYPE);
this.mBorderRadius = bundle.getInt(STATE_BORDER_RADIUS);
} else {
super.onRestoreInstanceState(state);
}
}
代码示例来源:origin: vsona/orz
@Override
protected void onRestoreInstanceState(Parcelable state) {
if (state instanceof Bundle) {
Bundle bundle = (Bundle) state;
super.onRestoreInstanceState(((Bundle) state).getParcelable(STATE_INSTANCE));
this.mType = bundle.getInt(STATE_TYPE);
this.mBorderRadius = bundle.getInt(STATE_BORDER_RADIUS);
} else {
super.onRestoreInstanceState(state);
}
}
}
代码示例来源:origin: hayribakici/imageprogressbar
@Override
protected void onRestoreInstanceState(final Parcelable state) {
if (state instanceof Bundle) {
Bundle bundle = (Bundle) state;
final int progressPercent = bundle.getInt(BUNDLE_CURRENT_PROGRESS, 0);
setProgress(progressPercent, false);
final Bitmap bitmap = bundle.getParcelable(BUNDLE_CURRENT_BITMAP);
if (bitmap != null) {
superSetImageBitmap(bitmap);
}
super.onRestoreInstanceState(bundle.getParcelable("super_state"));
return;
}
super.onRestoreInstanceState(state);
}
代码示例来源:origin: LanSoSdk/LanSoEditor_advance
/**
* Overridden to restore instance state when device orientation changes.
* This method is called automatically if you assign an id to the
* RangeSeekBar widget using the {@link #setId(int)} method.
*/
@Override
protected void onRestoreInstanceState(Parcelable parcel) {
final Bundle bundle = (Bundle) parcel;
super.onRestoreInstanceState(bundle.getParcelable("SUPER"));
normalizedMinValue = bundle.getDouble("MIN");
normalizedMaxValue = bundle.getDouble("MAX");
}
代码示例来源:origin: vinsol-spree-contrib/spree-android
/**
* Overridden to restore instance state when device orientation changes.
* This method is called automatically if you assign an id to the
* RangeSeekBar widget using the {@link #setId(int)} method.
*/
@Override
protected void onRestoreInstanceState(Parcelable parcel) {
final Bundle bundle = (Bundle) parcel;
super.onRestoreInstanceState(bundle.getParcelable("SUPER"));
normalizedMinValue = bundle.getDouble("MIN");
normalizedMaxValue = bundle.getDouble("MAX");
}
代码示例来源:origin: KosyanMedia/Aviasales-Android-SDK
/**
* Overridden to restore instance state when device orientation changes. This method is called automatically if you assign an id to the RangeSeekBar widget using the {@link #setId(int)} method.
*/
@Override
protected void onRestoreInstanceState(Parcelable parcel) {
final Bundle bundle = (Bundle) parcel;
super.onRestoreInstanceState(bundle.getParcelable("SUPER"));
normalizedMinValue = bundle.getDouble("MIN");
normalizedMaxValue = bundle.getDouble("MAX");
}
代码示例来源:origin: KosyanMedia/Aviasales-Android-SDK
/**
* Overridden to restore instance state when device orientation changes. This method is called automatically if you
* assign an id to the RangeSeekBar widget using the {@link #setId(int)} method.
*/
@Override
protected void onRestoreInstanceState(Parcelable parcel) {
final Bundle bundle = (Bundle) parcel;
super.onRestoreInstanceState(bundle.getParcelable(SAVE_SUPER));
mNormalizedMinValue = bundle.getDouble(SAVE_MIN);
mNormalizedMaxValue = bundle.getDouble(SAVE_MAX);
}
代码示例来源:origin: CUTR-at-USF/OpenTripPlanner-for-Android
/**
* Overridden to restore instance state when device orientation changes.
* This method is called automatically if you assign an id to the
* RangeSeekBar widget using the {@link #setId(int)} method.
*/
@Override
protected void onRestoreInstanceState(Parcelable parcel) {
final Bundle bundle = (Bundle) parcel;
super.onRestoreInstanceState(bundle.getParcelable("SUPER"));
normalizedMinValue = bundle.getDouble("MIN");
normalizedMaxValue = bundle.getDouble("MAX");
}
代码示例来源:origin: zyycj/FuLiApp
@Override
public void onRestoreInstanceState(Parcelable state) {
if (state instanceof Bundle) {
Bundle bundle = (Bundle) state;
normalizedScale = bundle.getFloat("saveScale");
m = bundle.getFloatArray("matrix");
prevMatrix.setValues(m);
prevMatchViewHeight = bundle.getFloat("matchViewHeight");
prevMatchViewWidth = bundle.getFloat("matchViewWidth");
prevViewHeight = bundle.getInt("viewHeight");
prevViewWidth = bundle.getInt("viewWidth");
imageRenderedAtLeastOnce = bundle.getBoolean("imageRendered");
super.onRestoreInstanceState(bundle.getParcelable("instanceState"));
return;
}
super.onRestoreInstanceState(state);
}
代码示例来源:origin: HotBitmapGG/MoeQuest
@Override
public void onRestoreInstanceState(Parcelable state) {
if (state instanceof Bundle) {
Bundle bundle = (Bundle) state;
normalizedScale = bundle.getFloat("saveScale");
m = bundle.getFloatArray("matrix");
prevMatrix.setValues(m);
prevMatchViewHeight = bundle.getFloat("matchViewHeight");
prevMatchViewWidth = bundle.getFloat("matchViewWidth");
prevViewHeight = bundle.getInt("viewHeight");
prevViewWidth = bundle.getInt("viewWidth");
imageRenderedAtLeastOnce = bundle.getBoolean("imageRendered");
super.onRestoreInstanceState(bundle.getParcelable("instanceState"));
return;
}
super.onRestoreInstanceState(state);
}
代码示例来源:origin: AppLozic/Applozic-Android-SDK
@Override
public void onRestoreInstanceState(Parcelable state) {
if (state instanceof Bundle) {
Bundle bundle = (Bundle) state;
normalizedScale = bundle.getFloat("saveScale");
m = bundle.getFloatArray("matrix");
prevMatrix.setValues(m);
prevMatchViewHeight = bundle.getFloat("matchViewHeight");
prevMatchViewWidth = bundle.getFloat("matchViewWidth");
prevViewHeight = bundle.getInt("viewHeight");
prevViewWidth = bundle.getInt("viewWidth");
imageRenderedAtLeastOnce = bundle.getBoolean("imageRendered");
super.onRestoreInstanceState(bundle.getParcelable("instanceState"));
return;
}
super.onRestoreInstanceState(state);
}
代码示例来源:origin: ta893115871/VideoEdit
@Override
protected void onRestoreInstanceState(Parcelable parcel) {
final Bundle bundle = (Bundle) parcel;
super.onRestoreInstanceState(bundle.getParcelable("SUPER"));
normalizedMinValue = bundle.getDouble("MIN");
normalizedMaxValue = bundle.getDouble("MAX");
normalizedMinValueTime = bundle.getDouble("MIN_TIME");
normalizedMaxValueTime = bundle.getDouble("MAX_TIME");
}
代码示例来源:origin: andremion/Music-Cover-View
@Override
protected void onRestoreInstanceState(Parcelable state) {
SavedState ss = (SavedState) state;
super.onRestoreInstanceState(ss.getSuperState());
setShape(ss.shape);
setTrackColor(ss.trackColor);
if (ss.isRotating) {
start();
}
}
内容来源于网络,如有侵权,请联系作者删除!