本文整理了Java中android.app.Dialog.onRestoreInstanceState()
方法的一些代码示例,展示了Dialog.onRestoreInstanceState()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Dialog.onRestoreInstanceState()
方法的具体详情如下:
包路径:android.app.Dialog
类名称:Dialog
方法名:onRestoreInstanceState
暂无
代码示例来源:origin: ukanth/afwall
@Override
public void onRestoreInstanceState(Bundle savedInstanceState) {
super.onRestoreInstanceState(savedInstanceState);
mOldColor.setColor(savedInstanceState.getInt("old_color"));
mColorPicker.setColor(savedInstanceState.getInt("new_color"), true);
}
}
代码示例来源:origin: SecUSo/privacy-friendly-sudoku
@Override
public void onRestoreInstanceState(Bundle savedInstanceState) {
super.onRestoreInstanceState(savedInstanceState);
if(savedInstanceState == null) return;
hintString = savedInstanceState.getString("hintString");
timeString = savedInstanceState.getString("timeString");
isNewBestTime = savedInstanceState.getBoolean("isNewBestTime");
}
}
代码示例来源:origin: wasdennnoch/AndroidN-ify
@Override
public void onRestoreInstanceState(Bundle savedInstanceState) {
super.onRestoreInstanceState(savedInstanceState);
mOldColor.setColor(savedInstanceState.getInt("old_color"));
mColorPicker.setColor(savedInstanceState.getInt("new_color"), true);
}
}
代码示例来源:origin: arminha/worldclockwidget
@Override
public void onRestoreInstanceState(Bundle savedInstanceState) {
super.onRestoreInstanceState(savedInstanceState);
mOldColor.setColor(savedInstanceState.getInt("old_color"));
mColorPicker.setColor(savedInstanceState.getInt("new_color"), true);
}
}
代码示例来源:origin: corcoran/Hangar
@Override
public void onRestoreInstanceState(Bundle savedInstanceState) {
super.onRestoreInstanceState(savedInstanceState);
mOldColor.setColor(savedInstanceState.getInt("old_color"));
mColorPicker.setColor(savedInstanceState.getInt("new_color"), true);
}
}
代码示例来源:origin: michael-rapp/AndroidMaterialDialog
@CallSuper
@Override
public void onRestoreInstanceState(@NonNull final Bundle savedInstanceState) {
decorator.onRestoreInstanceState(savedInstanceState);
super.onRestoreInstanceState(savedInstanceState);
}
代码示例来源:origin: michael-rapp/AndroidBottomSheet
@Override
public final void onRestoreInstanceState(@NonNull final Bundle savedInstanceState) {
setTitle(savedInstanceState.getCharSequence(TITLE_EXTRA));
setTitleColor(savedInstanceState.getInt(TITLE_COLOR_EXTRA));
setCancelable(savedInstanceState.getBoolean(CANCELABLE_EXTRA));
setCanceledOnTouchOutside(savedInstanceState.getBoolean(CANCELED_ON_TOUCH_OUTSIDE_EXTRA));
setDragSensitivity(savedInstanceState.getFloat(DRAG_SENSITIVITY_EXTRA));
setDimAmount(savedInstanceState.getFloat(DIM_AMOUNT_EXTRA));
setWidth(savedInstanceState.getInt(WIDTH_EXTRA));
if (savedInstanceState.containsKey(ICON_BITMAP_EXTRA)) {
setIcon((Bitmap) savedInstanceState.getParcelable(ICON_BITMAP_EXTRA));
} else if (savedInstanceState.containsKey(ICON_ID_EXTRA)) {
setIcon(savedInstanceState.getInt(ICON_ID_EXTRA));
} else if (savedInstanceState.containsKey(ICON_ATTRIBUTE_ID_EXTRA)) {
setIconAttribute(savedInstanceState.getInt(ICON_ATTRIBUTE_ID_EXTRA));
}
if (savedInstanceState.containsKey(BACKGROUND_BITMAP_EXTRA)) {
setBackground((Bitmap) savedInstanceState.getParcelable(BACKGROUND_BITMAP_EXTRA));
} else if (savedInstanceState.containsKey(BACKGROUND_ID_EXTRA)) {
setBackground(savedInstanceState.getInt(BACKGROUND_ID_EXTRA));
} else if (savedInstanceState.containsKey(BACKGROUND_COLOR_EXTRA)) {
setBackgroundColor(savedInstanceState.getInt(BACKGROUND_COLOR_EXTRA));
}
super.onRestoreInstanceState(savedInstanceState);
}
代码示例来源:origin: kingargyle/adt-leanback-support
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
if (!mShowsDialog) {
return;
}
View view = getView();
if (view != null) {
if (view.getParent() != null) {
throw new IllegalStateException("DialogFragment can not be attached to a container view");
}
mDialog.setContentView(view);
}
mDialog.setOwnerActivity(getActivity());
mDialog.setCancelable(mCancelable);
mDialog.setOnCancelListener(this);
mDialog.setOnDismissListener(this);
if (savedInstanceState != null) {
Bundle dialogState = savedInstanceState.getBundle(SAVED_DIALOG_STATE_TAG);
if (dialogState != null) {
mDialog.onRestoreInstanceState(dialogState);
}
}
}
代码示例来源:origin: saki4510t/libcommon
dialog.onRestoreInstanceState(state);
代码示例来源:origin: com.google.android/support-v4
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
if (!mShowsDialog) {
return;
}
View view = getView();
if (view != null) {
if (view.getParent() != null) {
throw new IllegalStateException("DialogFragment can not be attached to a container view");
}
mDialog.setContentView(view);
}
mDialog.setOwnerActivity(getActivity());
mDialog.setCancelable(mCancelable);
mDialog.setOnCancelListener(this);
mDialog.setOnDismissListener(this);
if (savedInstanceState != null) {
Bundle dialogState = savedInstanceState.getBundle(SAVED_DIALOG_STATE_TAG);
if (dialogState != null) {
mDialog.onRestoreInstanceState(dialogState);
}
}
}
代码示例来源:origin: jclehner/rxdroid
mDialog.onRestoreInstanceState(state);
代码示例来源:origin: AndroidDeveloperLB/MaterialPreferenceLibrary
dialog.onRestoreInstanceState(state);
内容来源于网络,如有侵权,请联系作者删除!