Example usage for android.os Bundle putParcelable

List of usage examples for android.os Bundle putParcelable

Introduction

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

Prototype

public void putParcelable(@Nullable String key, @Nullable Parcelable value) 

Source Link

Document

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

Usage

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

public static MovieFragment newInstance(Movie movie) {
    Bundle args = new Bundle();
    args.putParcelable(ARG_MOVIE, movie);

    MovieFragment fragment = new MovieFragment();
    fragment.setArguments(args);// ww  w .  j a  v  a2  s .  co  m
    return fragment;
}

From source file:com.akop.bach.fragment.playstation.GamesFragment.java

public static GamesFragment newInstance(PsnAccount account) {
    GamesFragment f = new GamesFragment();

    Bundle args = new Bundle();
    args.putParcelable("account", account);
    f.setArguments(args);/*from  ww w.ja  va  2  s  . c o m*/

    return f;
}

From source file:com.btmura.android.reddit.app.ThingFragment.java

public static ThingFragment newInstance(String accountName, ThingBundle thingBundle) {
    Bundle args = new Bundle(2);
    args.putString(ARG_ACCOUNT_NAME, accountName);
    args.putParcelable(ARG_THING_BUNDLE, thingBundle);

    ThingFragment frag = new ThingFragment();
    frag.setArguments(args);//from  www  . j av a2  s  .co m
    return frag;
}

From source file:io.openkit.leaderboards.OKScoresFragment.java

public static OKScoresFragment newInstance(OKLeaderboard leaderboard) {
    OKScoresFragment fragment = new OKScoresFragment();

    Bundle args = new Bundle();
    args.putParcelable(OKLeaderboard.LEADERBOARD_KEY, leaderboard);
    fragment.setArguments(args);/*from w w w.j  a  va2s  .com*/
    return fragment;
}

From source file:com.ryan.ryanreader.fragments.ImageViewFragment.java

public static ImageViewFragment newInstance(final URI url, final RedditPost post) {

    final ImageViewFragment f = new ImageViewFragment();

    final Bundle bundle = new Bundle(1);
    bundle.putString("url", url.toString());
    if (post != null)
        bundle.putParcelable("post", post);
    f.setArguments(bundle);/*from   w  w  w  .  j  a va2s. c  o m*/

    return f;
}

From source file:com.cerema.cloud2.ui.fragment.EditShareFragment.java

/**
 * Public factory method to create new EditShareFragment instances.
 *
 * @param shareToEdit   An {@link OCShare} to show and edit in the fragment
 * @param sharedFile    The {@link OCFile} bound to 'shareToEdit'
 * @param account       The ownCloud account holding 'sharedFile'
 * @return A new instance of fragment EditShareFragment.
 *///from  www . j av  a2 s  .c  om
public static EditShareFragment newInstance(OCShare shareToEdit, OCFile sharedFile, Account account) {
    EditShareFragment fragment = new EditShareFragment();
    Bundle args = new Bundle();
    args.putParcelable(ARG_SHARE, shareToEdit);
    args.putParcelable(ARG_FILE, sharedFile);
    args.putParcelable(ARG_ACCOUNT, account);
    fragment.setArguments(args);
    return fragment;
}

From source file:butter.droid.fragments.dialog.EpisodeDialogFragment.java

public static EpisodeDialogFragment newInstance(Show show, Episode episode) {
    EpisodeDialogFragment frag = new EpisodeDialogFragment();
    Bundle args = new Bundle();
    args.putParcelable(EXTRA_SHOW, show);
    args.putParcelable(EXTRA_EPISODE, episode);
    frag.setArguments(args);//from  w w  w . ja  v  a 2 s .c  o  m
    return frag;
}

From source file:com.birdgang.sample.ui.fragment.ViewPagerHeaderVideoFragment.java

public static ViewPagerHeaderVideoFragment newInstance(HeaderItemEntry headerItemEntry,
        int headerVideoPosition) {
    ViewPagerHeaderVideoFragment fragment = new ViewPagerHeaderVideoFragment();
    Bundle args = new Bundle();
    args.putParcelable(IntentParams.PARAMS_HEADER_ITEM, headerItemEntry);
    args.putInt(IntentParams.PARAMS_EXTRA_INDEX, headerVideoPosition);
    fragment.setArguments(args);// w  w w  .  jav a  2 s.c  o m
    return fragment;
}

From source file:com.akop.bach.fragment.xboxlive.MessagesFragment.java

public static MessagesFragment newInstance(XboxLiveAccount account) {
    MessagesFragment f = new MessagesFragment();

    Bundle args = new Bundle();
    args.putParcelable("account", account);
    f.setArguments(args);//from  w w w .j  a v a2  s  .  com

    return f;
}

From source file:com.akop.bach.fragment.xboxlive.GamesFragment.java

public static GamesFragment newInstance(XboxLiveAccount account) {
    GamesFragment f = new GamesFragment();

    Bundle args = new Bundle();
    args.putParcelable("account", account);
    f.setArguments(args);//from   w w w.j  av  a 2s .  c  o m

    return f;
}