/** * add the values to the bundle for saveInstanceState * * @param savedInstanceState If the activity is being re-initialized after * previously being shut down then this Bundle contains the data it most * recently supplied in Note: Otherwise it is null. * @return the passed bundle with the newly added data */ public Bundle saveInstanceState(@Nullable Bundle savedInstanceState) { return saveInstanceState(savedInstanceState, ""); }
@Override protected void onSaveInstanceState(Bundle outState) { //add the values which need to be saved from the adapter to the bundle outState = fastAdapter.saveInstanceState(outState); super.onSaveInstanceState(outState); }
/** * add the values to the bundle for saveInstanceState * * @param savedInstanceState * @return */ public Bundle saveInstanceState(Bundle savedInstanceState) { if (savedInstanceState != null) { if (!mDrawerBuilder.mAppended) { savedInstanceState = mDrawerBuilder.mAdapter.saveInstanceState(savedInstanceState, BUNDLE_SELECTION); savedInstanceState.putInt(BUNDLE_STICKY_FOOTER_SELECTION, mDrawerBuilder.mCurrentStickyFooterSelection); savedInstanceState.putBoolean(BUNDLE_DRAWER_CONTENT_SWITCHED, switchedDrawerContent()); } else { savedInstanceState = mDrawerBuilder.mAdapter.saveInstanceState(savedInstanceState, BUNDLE_SELECTION_APPENDED); savedInstanceState.putInt(BUNDLE_STICKY_FOOTER_SELECTION_APPENDED, mDrawerBuilder.mCurrentStickyFooterSelection); savedInstanceState.putBoolean(BUNDLE_DRAWER_CONTENT_SWITCHED_APPENDED, switchedDrawerContent()); } } return savedInstanceState; }
@Override protected void onSaveInstanceState(Bundle outState) { //add the values which need to be saved from the adapter to the bundle outState = fastAdapter.saveInstanceState(outState); super.onSaveInstanceState(outState); }
@Override protected void onSaveInstanceState(Bundle outState) { //add the values which need to be saved from the adapter to the bundle outState = fastAdapter.saveInstanceState(outState); super.onSaveInstanceState(outState); }
@Override protected void onSaveInstanceState(Bundle outState) { //add the values which need to be saved from the adapter to the bundle outState = mFastAdapter.saveInstanceState(outState); super.onSaveInstanceState(outState); }
@Override protected void onSaveInstanceState(Bundle outState) { //add the values which need to be saved from the adapter to the bundle outState = fastAdapter.saveInstanceState(outState); //We need to persist our sorting strategy between orientation changes outState.putInt("sorting_strategy", sortingStrategy); super.onSaveInstanceState(outState); }
@Override protected void onSaveInstanceState(Bundle outState) { //add the values which need to be saved from the adapter to the bundle outState = fastAdapter.saveInstanceState(outState); super.onSaveInstanceState(outState); }
@Override protected void onSaveInstanceState(Bundle outState) { //add the values which need to be saved from the adapter to the bundle outState = mFastAdapter.saveInstanceState(outState); super.onSaveInstanceState(outState); }
@Override protected void onSaveInstanceState(Bundle outState) { //add the values which need to be saved from the drawer to the bundle outState = mResult.saveInstanceState(outState); //add the values which need to be saved from the adapter to the bundle outState = mFastAdapter.saveInstanceState(outState); super.onSaveInstanceState(outState); }
originalDrawerState = getAdapter().saveInstanceState(new Bundle()); mDrawerBuilder.mExpandableExtension.collapse(false); originalDrawerItems = getDrawerItems();
@Override protected void onSaveInstanceState(Bundle outState) { //add the values which need to be saved from the drawer to the bundle outState = mResult.saveInstanceState(outState); //add the values which need to be saved from the adapter to the bundel outState = mFastAdapter.saveInstanceState(outState); super.onSaveInstanceState(outState); }