@Override public void onSaveInstanceState(Bundle savedInstanceState) { // Saving title field if (titleEditText != null) { savedInstanceState.putString(STATE_TITLE, titleEditText.getText().toString()); } // Saving description field if (descriptionEditText != null) { savedInstanceState.putString(STATE_DESCRIPTION, descriptionEditText.getText().toString()); } // Saving time field if (time != null) { savedInstanceState.putInt(STATE_TIME_HOUR, time.first); savedInstanceState.putInt(STATE_TIME_MINUTES, time.second); } // Saving week days field if (weekDays != null) { savedInstanceState.putBooleanArray(STATE_WEEK_DAYS, weekDays); } // The call to super method must be at the end here super.onSaveInstanceState(savedInstanceState); }
@Override protected void onSaveInstanceState(Bundle outState) { // Ensure no fragment transaction attempt will occur after onSaveInstanceState() handler.removeCallbacksAndMessages(null); super.onSaveInstanceState(outState); outState.putInt(STATE_CURRENT_SECTION, currentSection.ordinal()); }
@Override public void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); setupData = getCurrentStep().save(setupData); outState.putBundle(KEY_DATA, setupData); outState.putInt(KEY_STEP_INDEX, mStepIndex); }
@Override protected void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); outState.putInt(KEY_GENERATED, generatedNum); outState.putString(KEY_DATA_TEXT, tvData.getText().toString()); }
@Override protected void onSaveInstanceState(Bundle outState) { // Save values that we need to use if we are getting restored later on. super.onSaveInstanceState(outState); outState.putInt("firstSpinner", spinners.get(0).getSelectedItemPosition()); outState.putInt("secondSpinner", spinners.get(1).getSelectedItemPosition()); }
/** State handling */ @Override protected void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); outState.putBoolean(SEARCH_COMPLETE, mSearchComplete); if (mMeterPayments != null) outState.putString(METER_PAYMENTS, new Gson().toJson(mMeterPayments)); }
@Override public void onSaveInstanceState(Bundle savedInstanceState) { super.onSaveInstanceState(savedInstanceState); savedInstanceState.putBoolean(EXTRA_CHEAT_CHECKER, mIsAnswerShown); savedInstanceState.putBoolean(EXTRA_ANSWER_IS_TRUE, mAnswerIsTrue); }
@Override public void onSaveInstanceState(Bundle savedInstanceState) { super.onSaveInstanceState(savedInstanceState); savedInstanceState.putString(KEY_STRING, text.getText().toString()); savedInstanceState.putSerializable(KEY_EVENT, event); savedInstanceState.putSerializable(KEY_SHOW_BUTTON, current_event_registered); }
@Override protected void onSaveInstanceState(Bundle saveInstanceState) { if (mColors != null) { saveInstanceState.putStringArray(KEY_COLORS, mColors); } super.onSaveInstanceState(saveInstanceState); }
@Override protected void onSaveInstanceState(Bundle outState) { outState.putBoolean(STATE_IS_NORMAL_FULLSCREEN, mIsNormalFullScreen); outState.putBoolean(STATE_IS_IMMERSIVE_FULLSCREEN, mIsImmersiveFullScreen); super.onSaveInstanceState(outState); }
@Override public void onSaveInstanceState(Bundle savedInstanceState) { // Always call the superclass so it can save the view hierarchy state super.onSaveInstanceState(savedInstanceState); // Save the user's current game state savedInstanceState.putSerializable("game", game); }
@Override protected void onSaveInstanceState(Bundle outState) { // add the values which need to be saved from the drawer to the bundle outState = result.saveInstanceState(outState); // add the values which need to be saved from the accountHeader to the bundle outState = headerResult.saveInstanceState(outState); super.onSaveInstanceState(outState); }
@Override public void onSaveInstanceState(Bundle savedInstanceState) { // Save the user's current game state Log.d(TAG + "Cycle", "Entering onSaveInstanceInstance"); // Always call the superclass so it can save the view hierarchy state super.onSaveInstanceState(savedInstanceState); }
@Override protected void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); // save file url in bundle as it will be null on screen orientation // changes outState.putParcelable("file_uri", selectedattachment); }
// save the state @Override public void onSaveInstanceState(Bundle outState) { // Save the internet state if (mbInternet == true) outState.putInt(ARG_NO_INTERNET, 0); else outState.putInt(ARG_NO_INTERNET, 1); super.onSaveInstanceState(outState); }
@Override public void onRestoreInstanceState(Bundle savedInstanceState) { super.onSaveInstanceState(savedInstanceState); if (savedInstanceState != null) { setupData = savedInstanceState.getBundle(KEY_DATA); mStepIndex = savedInstanceState.getInt(KEY_STEP_INDEX, 0); } }
@Override protected void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); final ActiveListings currentActiveListings = mActiveListingsAdapter.getActiveListings(); if (currentActiveListings != null) { outState.putParcelable(STATE_ACTIVE_LISTINGS, currentActiveListings); } }
@Override protected void onSaveInstanceState(Bundle savedInstanceState) { mRequestingLocationUpdates = TestManager.getInstance().getmRequestingLocationUpdates(); savedInstanceState.putBoolean( TestManager.REQUESTING_LOCATION_UPDATES_KEY, mRequestingLocationUpdates); savedInstanceState.putParcelable(TestManager.LOCATION_KEY, mCurrentLocation); super.onSaveInstanceState(savedInstanceState); }
@Override @CallSuper protected void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); if (viewModel != null) { viewModel.saveInstanceState(outState); } }
@Override protected void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); // Se salva el estado del RecyclerView. mEstadoLista = mGridLayoutManager.onSaveInstanceState(); outState.putParcelable(STATE_LISTA, mEstadoLista); outState.putParcelableArrayList(STATE_LISTA_DATOS, mAdaptador.getData()); outState.putString(STATE_MAX_TAG_ID, mMaxTagId); }
@Override public void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); stateSaved = true; Bundle bundle = new Bundle(); bundle.putLong(ARG_STATE_COMPONENT_ID, componentId); }
@Override protected void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); String[] mainFragmentTags = _stringSetToStringArray(stringFragmentHashMap.keySet()); outState.putInt(BUNDLE_KEY_LAST_MENU_ITEM_ID_REQUESTED, _lastMenuItemIDRequested); outState.putBoolean(BUNDLE_KEY_IS_A_NON_DRAWER_SCREEN_SHOWING, _isANonDrawerScreenShowing); outState.putStringArray(BUNDLE_KEY_MAIN_FRAGMENT_TAGS, mainFragmentTags); }
@Override protected void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); outState.putInt("currentOffset", demoUtils.currentOffset); outState.putInt("itemCount", adapter.getCount()); for (int i = 0; i < adapter.getCount(); i++) { outState.putParcelable("item_" + i, (Parcelable) adapter.getItem(i)); } }
@Override protected void onSaveInstanceState(Bundle outState) { outState.putInt(SAVED_INSTANCE_ACTIVE_FRAGMENT, activeFragment); if (activeFragment == UtilFragment.FRAGMENT_MOVIE_DETAIL) if (selectedMovie != null) outState.putParcelable(SAVED_INSTANCE_MOVIE, selectedMovie); if (movies != null) outState.putParcelableArrayList(SAVED_INSTANCE_MOVIES, new ArrayList<Parcelable>(movies)); super.onSaveInstanceState(outState); }
@Override public void onSaveInstanceState(Bundle savedInstanceState) { // Save the user's currentstate savedInstanceState.putInt(STRIKE_COUNT, strikeCount); savedInstanceState.putInt(BALL_COUNT, ballCount); savedInstanceState.putInt(OUT_COUNT, outCount); writeAllToFile(); super.onSaveInstanceState(savedInstanceState); }
@Override protected void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); outState.putBoolean("baseProgressButtonEnabled", baseProgressButtonEnabled); outState.putBoolean("progressButtonEnabled", progressButtonEnabled); outState.putBoolean("nextEnabled", pager.isPagingEnabled()); outState.putBoolean("nextPagingEnabled", pager.isNextPagingEnabled()); outState.putInt("lockPage", pager.getLockPage()); outState.putInt("currentItem", pager.getCurrentItem()); }
@Override protected void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); outState.putInt(KEY_FOLDER_ID, model.getFolderId()); outState.putString(KEY_FOLDER_NAME, model.getFolderName()); outState.putString(KEY_MEDIA_MODE, model.getMediaFilterMode().name()); }
@Override public void onSaveInstanceState(Bundle savedInstanceState) { // do something to backup data savedInstanceState.putInt("mCreate", tellerCreate); savedInstanceState.putInt("mRestart", tellerRestart); savedInstanceState.putInt("mResume", tellerResume); savedInstanceState.putInt("mStart", tellerStart); super.onSaveInstanceState(savedInstanceState); }
@Override protected void onSaveInstanceState(Bundle state) { super.onSaveInstanceState(state); state.putDouble(CURRENT_VALUE, currentVal); state.putDouble(VALUE, val); state.putInt(OPR, opr); state.putSerializable(OPERATION, currentOperation); state.putString(TEXT, et.getText().toString()); state.putInt(CLRBUTTON, (Integer) clearButton.getTag()); }
@Override public void onSaveInstanceState(Bundle savedInstanceState) { // Save the user's current search if (apiResults.getListings() != null) { saved = false; parking_listings = apiResults.getListings().toString(); latitude = apiResults.getLat(); longitude = apiResults.getLong(); savedInstanceState.putString("parking_listings", parking_listings); savedInstanceState.putDouble("lat", latitude); savedInstanceState.putDouble("lng", longitude); super.onSaveInstanceState(savedInstanceState); } if (saved) { savedInstanceState.putString("parking_listings", parking_listings); savedInstanceState.putDouble("lat", latitude); savedInstanceState.putDouble("lng", longitude); super.onSaveInstanceState(savedInstanceState); } }