List of usage examples for android.os Bundle putBundle
public void putBundle(@Nullable String key, @Nullable Bundle value)
From source file:com.adkdevelopment.earthquakesurvival.ui.DetailFragment.java
@Override public void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); final Bundle mapViewSaveState = new Bundle(outState); if (mMapView != null) { mMapView.onSaveInstanceState(mapViewSaveState); outState.putBundle(MAP_STATE, mapViewSaveState); }//w w w . j a v a 2s . c o m if (mGoogleMap != null) { CameraPosition save = mGoogleMap.getCameraPosition(); outState.putParcelable(CAMERA_POSITION, save); } }
From source file:mobi.cangol.mobile.base.BaseDialogFragment.java
public void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); if (this.mDialog != null) { Bundle dialogState = this.mDialog.onSaveInstanceState(); if (dialogState != null) { outState.putBundle("android:savedDialogState", dialogState); }// w w w .j a va2 s . co m } if (this.mStyle != 0) { outState.putInt("android:style", this.mStyle); } if (this.mTheme != 0) { outState.putInt("android:theme", this.mTheme); } if (!this.mCancelable) { outState.putBoolean("android:cancelable", this.mCancelable); } if (!this.mShowsDialog) { outState.putBoolean("android:showsDialog", this.mShowsDialog); } if (this.mBackStackId != -1) { outState.putInt("android:backStackId", this.mBackStackId); } }
From source file:com.balch.android.app.framework.preference.PreferenceFragment.java
public void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); PreferenceScreen preferenceScreen = getPreferenceScreen(); if (preferenceScreen != null) { Bundle container = new Bundle(); preferenceScreen.saveHierarchyState(container); outState.putBundle(PREFERENCES_TAG, container); }// ww w .j a va 2s . c o m }
From source file:com.hichinaschool.flashcards.anki.StudyOptionsFragment.java
public static StudyOptionsFragment newInstance(long deckId, boolean onlyFnsMsg, Bundle cramInitialConfig) { StudyOptionsFragment f = new StudyOptionsFragment(); // Supply index input as an argument. Bundle args = new Bundle(); args.putLong("deckId", deckId); args.putBoolean("onlyFnsMsg", onlyFnsMsg); args.putBundle("cramInitialConfig", cramInitialConfig); f.setArguments(args);//w w w .j av a 2 s . c o m return f; }
From source file:li.klass.fhem.activities.core.TopLevelFragment.java
@Override public void onSaveInstanceState(Bundle outState) { if (outState != null) { if (initialFragmentType != null) { outState.putString(INITIAL_FRAGMENT_TYPE_KEY, initialFragmentType.name()); }/*from w w w . j av a 2 s. co m*/ outState.putBundle(LAST_SWITCH_TO_BUNDLE_KEY, lastSwitchToBundle); } super.onSaveInstanceState(outState); }
From source file:com.android.cts.verifier.managedprovisioning.ByodHelperActivity.java
@Override protected void onSaveInstanceState(final Bundle savedState) { super.onSaveInstanceState(savedState); savedState.putBundle(ORIGINAL_SETTINGS_NAME, mOriginalSettings); }
From source file:li.barter.fragments.BookDetailFragment.java
@Override public void onSaveInstanceState(final Bundle outState) { super.onSaveInstanceState(outState); outState.putBundle(Keys.BOOK_DETAILS, mBookDetails); }
From source file:de.sourcestream.movieDB.controller.GenresList.java
/** * Called to ask the fragment to save its current dynamic state, * so it can later be reconstructed in a new instance of its process is restarted. * * @param outState Bundle in which to place your saved state. *///from w w w . ja v a 2 s . co m @Override public void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); // Used to avoid bug where we add item in the back stack // and if we change orientation twice the item from the back stack has null values if (save != null) outState.putBundle("save", save); else { Bundle send = new Bundle(); send.putInt("backState", backState); if (backState == 1) { send.putParcelableArrayList("listData", genresList); // used to restore the scroll listener variables // Save scroll position if (listView != null) { Parcelable listState = listView.onSaveInstanceState(); send.putParcelable("listViewScroll", listState); } } outState.putBundle("save", send); } }
From source file:org.jboss.aerogear.android.authentication.impl.loader.support.SupportAuthenticationModuleAdapter.java
@Override public void login(Map<String, String> loginData, Callback<HeaderAndBody> callback) { int id = Objects.hashCode(name, loginData, callback, Math.random()); Bundle bundle = new Bundle(); Bundle loginBundle = new Bundle(); for (Map.Entry<String, String> entry : loginData.entrySet()) { loginBundle.putString(entry.getKey(), entry.getValue()); }// w ww . ja va2 s .c om bundle.putSerializable(CALLBACK, callback); bundle.putBundle(PARAMS, loginBundle); bundle.putSerializable(METHOD, Methods.LOGIN); if (manager.getLoader(id) != null && !module.isLoggedIn()) { manager.restartLoader(id, bundle, this); } else { manager.initLoader(id, bundle, this); } }
From source file:org.jboss.aerogear.android.authentication.impl.loader.AuthenticationModuleAdapter.java
@Override public void login(Map<String, String> loginData, Callback<HeaderAndBody> callback) { int id = Objects.hashCode(name, loginData, callback); Bundle bundle = new Bundle(); Bundle loginBundle = new Bundle(); for (Map.Entry<String, String> entry : loginData.entrySet()) { loginBundle.putString(entry.getKey(), entry.getValue()); }/*from w w w . j a va 2s. c o m*/ bundle.putSerializable(CALLBACK, callback); bundle.putBundle(PARAMS, loginBundle); bundle.putSerializable(METHOD, AuthenticationModuleAdapter.Methods.LOGIN); if (manager.getLoader(id) != null && !module.isLoggedIn()) { manager.restartLoader(id, bundle, this); } else { manager.initLoader(id, bundle, this); } }