Example usage for android.os Bundle putParcelableArrayList

List of usage examples for android.os Bundle putParcelableArrayList

Introduction

In this page you can find the example usage for android.os Bundle putParcelableArrayList.

Prototype

public void putParcelableArrayList(@Nullable String key, @Nullable ArrayList<? extends Parcelable> value) 

Source Link

Document

Inserts a List of Parcelable values into the mapping of this Bundle, replacing any existing value for the given key.

Usage

From source file:com.amaze.filemanager.fragments.CompressedExplorerFragment.java

@Override
public void onSaveInstanceState(Bundle outState) {
    super.onSaveInstanceState(outState);

    outState.putParcelableArrayList(KEY_ELEMENTS, elements);
    outState.putString(KEY_PATH, relativeDirectory);
    outState.putString(KEY_URI, compressedFile.getPath());
    outState.putString(KEY_FILE, compressedFile.getPath());
    outState.putParcelableArrayList(KEY_CACHE_FILES, files);
    outState.putBoolean(KEY_OPEN, isOpen);
}

From source file:com.gbozza.android.popularmovies.fragments.MovieGridFragment.java

@Override
public void onSaveInstanceState(Bundle outState) {
    super.onSaveInstanceState(outState);
    List<Movie> movieList = mMoviesAdapter.getMoviesData();
    if (null != movieList) {
        outState.putParcelableArrayList(BUNDLE_MOVIES_KEY, new ArrayList<>(movieList));
        outState.putInt(BUNDLE_PAGE_KEY, mPage);
        outState.putInt(BUNDLE_SORTING_KEY, mSorting);
    } else if (mErrorMessageDisplay.isShown()) {
        outState.putBoolean(BUNDLE_ERROR_KEY, true);
    }/*from  w w w  .jav a 2  s.com*/
}

From source file:ru.moscow.tuzlukov.sergey.weatherlog.SettingsActivity.java

@Override
protected void onSaveInstanceState(Bundle outState) {
    super.onSaveInstanceState(outState);
    outState.putString(SAVED_CITY_NAME_REQUESTED, etCityName.getText().toString());
    outState.putParcelableArrayList(SAVED_CITY_LIST, (ArrayList<? extends Parcelable>) cityList);
    outState.putBoolean(SAVED_LIST_VISIBILITY, lvVariants.getVisibility() == View.VISIBLE);
    outState.putBoolean(SAVED_MESSAGE_VISIBILITY, tvErrorMessage.getVisibility() == View.VISIBLE);
    outState.putInt(SAVED_RESULT_CODE, resultCode);
    outState.putBoolean(SAVED_LOADER_VISIBILITY, llLoader.getVisibility() == View.VISIBLE);
    outState.putString(SAVED_DIALOG_APPID, registerDialog.getEtAppId().getText().toString());
    outState.putBoolean(SAVED_DIALOG_VISIBILITY, registerDialog.isVisible());
}

From source file:com.dmitrymalkovich.android.popularmoviesapp.details.MovieDetailFragment.java

@Override
public void onSaveInstanceState(Bundle outState) {
    super.onSaveInstanceState(outState);
    ArrayList<Trailer> trailers = mTrailerListAdapter.getTrailers();
    if (trailers != null && !trailers.isEmpty()) {
        outState.putParcelableArrayList(EXTRA_TRAILERS, trailers);
    }/*  w  w  w  . j a  va  2 s  .  co m*/

    ArrayList<Review> reviews = mReviewListAdapter.getReviews();
    if (reviews != null && !reviews.isEmpty()) {
        outState.putParcelableArrayList(EXTRA_REVIEWS, reviews);
    }
}

From source file:com.ultramegasoft.flavordex2.fragment.ViewFlavorsFragment.java

@Override
public void onSaveInstanceState(@NonNull Bundle outState) {
    super.onSaveInstanceState(outState);
    outState.putBoolean(STATE_EDIT_MODE, mEditMode);
    outState.putParcelableArrayList(STATE_DATA, mData);
}

From source file:com.playhaven.android.view.HTMLView.java

/**
 * Create a response bundle for passing back to the publisher
 *
 * @return bundle containing data/*from   w w  w .  j a  v a 2  s .c  o m*/
 */
@Override
public Bundle generateResponseBundle() {
    Bundle data = null;

    if (mRewards != null) {
        data = new Bundle();
        data.putParcelableArrayList(PlayHavenView.BUNDLE_DATA_REWARD, mRewards);
    }

    if (mDataFields != null) {
        if (data == null)
            data = new Bundle();
        data.putParcelableArrayList(PlayHavenView.BUNDLE_DATA_OPTIN, mDataFields);
    }

    if (mPurchases != null) {
        if (data == null)
            data = new Bundle();
        data.putParcelableArrayList(PlayHavenView.BUNDLE_DATA_PURCHASE, mPurchases);
    }

    return data;
}

From source file:com.bilibili.boxing.AbsBoxingViewFragment.java

/**
 * called when you have input medias, then call {@link #onCreateWithSelectedMedias(Bundle, List)} to get the input medias.
 *
 * @param selectedMedias input medias// w  w  w .  j  a va 2s  .c  o m
 * @return {@link AbsBoxingViewFragment}
 */
public final AbsBoxingViewFragment setSelectedBundle(ArrayList<BaseMedia> selectedMedias) {
    Bundle bundle = new Bundle();
    if (selectedMedias != null && !selectedMedias.isEmpty()) {
        bundle.putParcelableArrayList(Boxing.EXTRA_SELECTED_MEDIA, selectedMedias);
    }
    setArguments(bundle);
    return this;
}

From source file:com.bilibili.boxing.AbsBoxingViewFragment.java

/**
 * in {@link BoxingConfig.Mode#MULTI_IMG}, call this in {@link Fragment#onSaveInstanceState(Bundle)}.
 *
 * @param outState Bundle in which to place your saved state.
 * @param selected the selected medias./*ww w . java  2s .co m*/
 */
public final void onSaveMedias(Bundle outState, ArrayList<BaseMedia> selected) {
    if (selected != null && !selected.isEmpty()) {
        outState.putParcelableArrayList(Boxing.EXTRA_SELECTED_MEDIA, selected);
    }
}

From source file:com.nextgis.maplibui.SelectNGWResourceDialog.java

@Override
public void onSaveInstanceState(Bundle outState) {
    outState.putString(KEY_TITLE, mTitle);
    outState.putInt(KEY_MASK, mTypeMask);
    outState.putShort(KEY_ID, mGroupLayer.getId());
    outState.putInt(KEY_RESOURCEID, mListAdapter.getCurrentResourceId());
    outState.putParcelable(KEY_CONNECTIONS, mListAdapter.getConnections());
    outState.putParcelableArrayList(KEY_STATES,
            (ArrayList<? extends android.os.Parcelable>) mListAdapter.getCheckState());
    super.onSaveInstanceState(outState);
}

From source file:com.burhan.udacity.popularmovies.ui.fragment.MovieFragment.java

@Override
public void onSaveInstanceState(Bundle outState) {
    super.onSaveInstanceState(outState);
    outState.putParcelable(STATE_SCROLL_VIEW, mScrollView.onSaveInstanceState());
    if (mReviews != null)
        outState.putParcelableArrayList(STATE_REVIEWS, new ArrayList<>(mReviews));
    if (mVideos != null)
        outState.putParcelableArrayList(STATE_VIDEOS, new ArrayList<>(mVideos));
}