List of usage examples for android.os Bundle putSerializable
@Override public void putSerializable(@Nullable String key, @Nullable Serializable value)
From source file:com.afstd.sqlitecommander.app.filemanager.FMFragment.java
@Override public void onSaveInstanceState(Bundle outState) { // Serialize the current dropdown position. Parcelable state = fListView.onSaveInstanceState(); outState.putParcelable("list_position", state); outState.putString(CURR_DIR, path);//from ww w . jav a2s. c om outState.putSerializable(BACKSTACK, backstack); }
From source file:com.google.android.gms.nearby.messages.samples.nearbybackgroundbeacons.MainActivityFragment.java
@Override public void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); outState.putSerializable(KEY_SUB_STATE, mSubState); outState.putBoolean(KEY_RESOLVING_ERROR, mResolvingError); }
From source file:com.auth0.lock.util.LockFragmentBuilder.java
public Fragment signUp() { final DatabaseSignUpFragment fragment = new DatabaseSignUpFragment(); Bundle arguments = new Bundle(); arguments.putBoolean(DatabaseSignUpFragment.LOGIN_AFTER_SIGNUP_ARGUMENT, lock.shouldLoginAfterSignUp()); arguments.putBoolean(BaseTitledFragment.AUTHENTICATION_USES_EMAIL_ARGUMENT, lock.shouldUseEmail()); arguments.putSerializable(BaseTitledFragment.AUTHENTICATION_PARAMETER_ARGUMENT, new HashMap<>(lock.getAuthenticationParameters())); fragment.setArguments(arguments);/* w w w.j ava 2s . c om*/ return fragment; }
From source file:org.mifos.androidclient.main.AccountDetailsActivity.java
@Override protected void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); outState.putSerializable(AbstractAccountDetails.BUNDLE_KEY, mDetails); outState.putSerializable(Fee.BUNDLE_KEY, (Serializable) mApplicableFees); TabHost tabs = (TabHost) findViewById(R.id.accountDetails_tabHost); if (tabs != null) { outState.putSerializable(SELECTED_TAB_BUNDLE_KEY, tabs.getCurrentTab()); }/* w w w. j a v a 2s .c o m*/ }
From source file:ch.citux.td.ui.TDActivity.java
public void showChannel(TwitchChannel channel) { if (channelFragment == null) { channelFragment = new ChannelFragment(); }/* w ww . j ava 2 s . c o m*/ if (channelFragment.isAdded()) { channelFragment.updateChannel(channel); } else { Bundle arguments = new Bundle(); arguments.putSerializable(ChannelFragment.CHANNEL, channel); channelFragment.setArgs(arguments); replaceFragment(channelFragment); } }
From source file:com.ibm.pi.beacon.PIBeaconSensor.java
private Bundle getBundle() { Bundle extras = new Bundle(); extras.putSerializable(ADAPTER_KEY, mAdapter); extras.putLong(SEND_INTERVAL_KEY, mPrefs.getLong(SEND_INTERVAL_KEY, 5000l)); extras.putLong(BACKGROUND_BETWEEN_SCAN_PERIOD_KEY, mPrefs.getLong(BACKGROUND_BETWEEN_SCAN_PERIOD_KEY, 60000l)); extras.putLong(BACKGROUND_SCAN_PERIOD_KEY, mPrefs.getLong(BACKGROUND_SCAN_PERIOD_KEY, 1100l)); if (mPrefs.contains(BEACON_LAYOUT_KEY)) { extras.putString(BEACON_LAYOUT_KEY, mPrefs.getString(BEACON_LAYOUT_KEY, "")); }//from w w w.jav a 2 s .c om if (startSensorInBackgroundMode) { extras.putBoolean(START_IN_BACKGROUND_KEY, true); startSensorInBackgroundMode = false; } return extras; }
From source file:com.hackvg.android.views.activities.MoviesActivity.java
@Override protected void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); if (mMoviesAdapter != null) { outState.putSerializable(BUNDLE_MOVIES_WRAPPER, new MoviesWrapper(mMoviesAdapter.getMovieList())); outState.putFloat(BUNDLE_BACK_TRANSLATION, mBackgroundTranslation); }/*from w w w. java 2 s.c o m*/ }
From source file:com.cw.litenote.note_add.Note_addText.java
@Override protected void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); System.out.println("Note_addText / _onSaveInstanceState"); outState.putSerializable(DB_page.KEY_NOTE_ID, rowId); }
From source file:com.microsoft.identity.client.testapp.MainActivity.java
@Override public boolean onNavigationItemSelected(final MenuItem item) { final Fragment fragment; int menuItemId = item.getItemId(); if (menuItemId == R.id.nav_acquire) { fragment = new AcquireTokenFragment(); } else if (menuItemId == R.id.nav_result) { fragment = new ResultFragment(); final Bundle bundle = new Bundle(); if (mAuthResult != null) { bundle.putString(ResultFragment.ACCESS_TOKEN, mAuthResult.getAccessToken()); bundle.putString(ResultFragment.ID_TOKEN, mAuthResult.getIdToken()); bundle.putString(ResultFragment.DISPLAYABLE, mAuthResult.getAccount().getUsername()); }/*from w ww. jav a 2 s .c o m*/ fragment.setArguments(bundle); mAuthResult = null; } else if (menuItemId == R.id.nav_cache) { fragment = new CacheFragment(); final Bundle args = new Bundle(); args.putSerializable(CacheFragment.ARG_LIST_CONTENTS, (Serializable) CacheFragment.TEST_LIST_ELEMENTS); fragment.setArguments(args); } else if (menuItemId == R.id.nav_log) { fragment = new LogFragment(); final String logs = ((MsalSampleApp) this.getApplication()).getLogs(); final Bundle bundle = new Bundle(); bundle.putString(LogFragment.LOG_MSG, logs); fragment.setArguments(bundle); } else { fragment = null; } attachFragment(fragment); return true; }
From source file:com.marianhello.bgloc.Config.java
public void writeToParcel(Parcel out, int flags) { out.writeFloat(getStationaryRadius()); out.writeInt(getDistanceFilter());/*from w w w. ja v a 2 s . co m*/ out.writeInt(getDesiredAccuracy()); out.writeValue(isDebugging()); out.writeString(getNotificationTitle()); out.writeString(getNotificationText()); out.writeString(getLargeNotificationIcon()); out.writeString(getSmallNotificationIcon()); out.writeString(getNotificationIconColor()); out.writeValue(getStopOnTerminate()); out.writeValue(getStartOnBoot()); out.writeValue(getStartForeground()); out.writeInt(getLocationProvider()); out.writeInt(getInterval()); out.writeInt(getFastestInterval()); out.writeInt(getActivitiesInterval()); out.writeValue(getStopOnStillActivity()); out.writeString(getUrl()); out.writeString(getSyncUrl()); out.writeInt(getSyncThreshold()); out.writeInt(getMaxLocations()); Bundle bundle = new Bundle(); bundle.putSerializable("httpHeaders", getHttpHeaders()); out.writeBundle(bundle); }