本文整理了Java中android.app.Dialog.onSaveInstanceState()
方法的一些代码示例,展示了Dialog.onSaveInstanceState()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Dialog.onSaveInstanceState()
方法的具体详情如下:
包路径:android.app.Dialog
类名称:Dialog
方法名:onSaveInstanceState
暂无
代码示例来源:origin: ukanth/afwall
@Override
public Bundle onSaveInstanceState() {
Bundle state = super.onSaveInstanceState();
state.putInt("old_color", mOldColor.getColor());
state.putInt("new_color", mNewColor.getColor());
return state;
}
代码示例来源:origin: SecUSo/privacy-friendly-sudoku
@Override
public Bundle onSaveInstanceState() {
Bundle bundle = super.onSaveInstanceState();
bundle.putString("hintString", hintString);
bundle.putString("timeString", timeString);
bundle.putBoolean("isNewBestTime", isNewBestTime);
return bundle;
}
代码示例来源:origin: wasdennnoch/AndroidN-ify
@Override
public Bundle onSaveInstanceState() {
Bundle state = super.onSaveInstanceState();
state.putInt("old_color", mOldColor.getColor());
state.putInt("new_color", mNewColor.getColor());
return state;
}
代码示例来源:origin: arminha/worldclockwidget
@Override
public Bundle onSaveInstanceState() {
Bundle state = super.onSaveInstanceState();
state.putInt("old_color", mOldColor.getColor());
state.putInt("new_color", mNewColor.getColor());
return state;
}
代码示例来源:origin: corcoran/Hangar
@Override
public Bundle onSaveInstanceState() {
Bundle state = super.onSaveInstanceState();
state.putInt("old_color", mOldColor.getColor());
state.putInt("new_color", mNewColor.getColor());
return state;
}
代码示例来源:origin: michael-rapp/AndroidMaterialDialog
@CallSuper
@NonNull
@Override
public Bundle onSaveInstanceState() {
Bundle outState = super.onSaveInstanceState();
decorator.onSaveInstanceState(outState);
return outState;
}
代码示例来源:origin: michael-rapp/AndroidBottomSheet
@NonNull
@Override
public final Bundle onSaveInstanceState() {
Bundle outState = super.onSaveInstanceState();
outState.putCharSequence(TITLE_EXTRA, title);
outState.putInt(TITLE_COLOR_EXTRA, titleColor);
outState.putBoolean(CANCELABLE_EXTRA, cancelable);
outState.putBoolean(CANCELED_ON_TOUCH_OUTSIDE_EXTRA, canceledOnTouchOutside);
outState.putFloat(DRAG_SENSITIVITY_EXTRA, dragSensitivity);
outState.putFloat(DIM_AMOUNT_EXTRA, dimAmount);
outState.putInt(WIDTH_EXTRA, width);
if (iconBitmap != null) {
outState.putParcelable(ICON_BITMAP_EXTRA, iconBitmap);
} else if (iconId != -1) {
outState.putInt(ICON_ID_EXTRA, iconId);
}
if (backgroundBitmap != null) {
outState.putParcelable(BACKGROUND_BITMAP_EXTRA, backgroundBitmap);
} else if (backgroundId != -1) {
outState.putInt(BACKGROUND_ID_EXTRA, backgroundId);
} else if (backgroundColor != -1) {
outState.putInt(BACKGROUND_COLOR_EXTRA, backgroundColor);
}
return outState;
}
代码示例来源:origin: com.google.android/support-v4
@Override
public void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
if (mDialog != null) {
Bundle dialogState = mDialog.onSaveInstanceState();
if (dialogState != null) {
outState.putBundle(SAVED_DIALOG_STATE_TAG, dialogState);
}
}
if (mStyle != STYLE_NORMAL) {
outState.putInt(SAVED_STYLE, mStyle);
}
if (mTheme != 0) {
outState.putInt(SAVED_THEME, mTheme);
}
if (!mCancelable) {
outState.putBoolean(SAVED_CANCELABLE, mCancelable);
}
if (!mShowsDialog) {
outState.putBoolean(SAVED_SHOWS_DIALOG, mShowsDialog);
}
if (mBackStackId != -1) {
outState.putInt(SAVED_BACK_STACK_ID, mBackStackId);
}
}
代码示例来源:origin: kingargyle/adt-leanback-support
@Override
public void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
if (mDialog != null) {
Bundle dialogState = mDialog.onSaveInstanceState();
if (dialogState != null) {
outState.putBundle(SAVED_DIALOG_STATE_TAG, dialogState);
}
}
if (mStyle != STYLE_NORMAL) {
outState.putInt(SAVED_STYLE, mStyle);
}
if (mTheme != 0) {
outState.putInt(SAVED_THEME, mTheme);
}
if (!mCancelable) {
outState.putBoolean(SAVED_CANCELABLE, mCancelable);
}
if (!mShowsDialog) {
outState.putBoolean(SAVED_SHOWS_DIALOG, mShowsDialog);
}
if (mBackStackId != -1) {
outState.putInt(SAVED_BACK_STACK_ID, mBackStackId);
}
}
代码示例来源:origin: jclehner/rxdroid
@Override
protected Parcelable onSaveInstanceState()
{
if(LOGV) Log.v(TAG, getKey() + ": onSaveInstanceState");
final Bundle extras = new Bundle();
if(mDialog != null)
{
extras.putBundle(EXTRA_DIALOG_STATE, mDialog.onSaveInstanceState());
mDialog.dismiss();
//extras.putString(EXTRA_DIALOG_VALUE, toPersistedString(getDialogValue()));
}
final Parcelable superState = super.onSaveInstanceState();
return InstanceState.createFrom(this, superState, extras);
}
代码示例来源:origin: saki4510t/libcommon
@Override
protected Parcelable onSaveInstanceState() {
final Parcelable superState = super.onSaveInstanceState();
if (mDialog == null || !mDialog.isShowing()) {
return superState;
}
final SavedState myState = new SavedState(superState);
myState.isDialogShowing = true;
myState.dialogBundle = mDialog.onSaveInstanceState();
return myState;
}
代码示例来源:origin: AndroidDeveloperLB/MaterialPreferenceLibrary
@Override
protected Parcelable onSaveInstanceState() {
final Parcelable superState = super.onSaveInstanceState();
if (mDialog == null || !mDialog.isShowing()) {
return superState;
}
final SavedState myState = new SavedState(superState);
myState.isDialogShowing = true;
myState.dialogBundle = mDialog.onSaveInstanceState();
return myState;
}
代码示例来源:origin: stackoverflow.com
Dialog dialog = new Dialog(getActivity());
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
dialog.setContentView(R.layout.dialogmap);
dialog.show();
GoogleMap googleMap;
MapView mMapView = (MapView) dialog.findViewById(R.id.mapView);
MapsInitializer.initialize(getActivity());
mMapView = (MapView) dialog.findViewById(R.id.mapView);
mMapView.onCreate(dialog.onSaveInstanceState());
mMapView.onResume();// needed to get the map to display immediately
googleMap = mMapView.getMap();
内容来源于网络,如有侵权,请联系作者删除!