Example usage for android.os Bundle putSerializable

List of usage examples for android.os Bundle putSerializable

Introduction

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

Prototype

@Override
public void putSerializable(@Nullable String key, @Nullable Serializable value) 

Source Link

Document

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

Usage

From source file:com.github.vase4kin.teamcityapp.properties.view.PropertiesFragment.java

public static Fragment newInstance(Build build) {
    PropertiesFragment fragment = new PropertiesFragment();
    Bundle args = new Bundle();
    args.putSerializable(BundleExtractorValues.BUILD, build);
    fragment.setArguments(args);// w w w .  j a va  2 s  . c  o m
    return fragment;
}

From source file:com.maxleap.mall.fragments.ReviewFragment.java

public static ReviewFragment newInstance(ArrayList<Comment> list) {
    ReviewFragment fragment = new ReviewFragment();
    Bundle bundle = new Bundle();
    bundle.putSerializable(DATALIST, list);
    fragment.setArguments(bundle);/*from w w w  .  java2 s . c  om*/
    return fragment;
}

From source file:com.chatwingsdk.fragments.EmoticonsPageFragment.java

public static EmoticonsPageFragment newInstance(TreeMap<String, String> emoticons) {
    EmoticonsPageFragment instance = new EmoticonsPageFragment();

    Bundle args = new Bundle();
    args.putSerializable(EXTRA_EMOTICONS, emoticons);
    instance.setArguments(args);//from  w  w w. ja v a  2 s. co m

    return instance;
}

From source file:com.chatwingsdk.fragments.EmoticonsFragment.java

public static EmoticonsFragment newInstance(TreeMap<String, String> emoticons) {
    EmoticonsFragment instance = new EmoticonsFragment();

    Bundle args = new Bundle();
    args.putSerializable(EXTRA_EMOTICONS, emoticons);
    instance.setArguments(args);/*from  w ww .j a v a2 s  .co  m*/

    return instance;
}

From source file:be.brunoparmentier.openbikesharing.app.fragments.StationsListFragment.java

public static StationsListFragment newInstance(ArrayList<Station> stations) {
    StationsListFragment stationsListFragment = new StationsListFragment();
    Bundle args = new Bundle();
    args.putSerializable("stations", stations);
    stationsListFragment.setArguments(args);
    return stationsListFragment;
}

From source file:Main.java

public static void addIfNotNull(Bundle b, String key, Serializable value) {
    if (value != null) {
        b.putSerializable(key, value);
    }/*from  w w  w  .  j a va2  s. c  o m*/
}

From source file:com.akop.bach.fragment.ErrorDialogFragment.java

public static ErrorDialogFragment newInstance(String errorMessage, Exception error) {
    ErrorDialogFragment f = new ErrorDialogFragment();

    Bundle args = new Bundle();
    args.putSerializable("exception", error);
    args.putString("message", errorMessage);
    f.setArguments(args);//w ww. j  a v  a2  s  .  c om

    return f;
}

From source file:Main.java

public static <T extends Serializable> Bundle putArguments(Bundle bundle, String key, List<T> objects) {
    for (int i = 0; i < objects.size(); i++) {
        bundle.putSerializable(String.format("%s%s", key, i), objects.get(i));
    }//from  w w  w.  j  ava2  s  . com
    return bundle;
}

From source file:com.yasiradnan.Schedule.ScheduleSlideFragment.java

public static Fragment create(ScheduleItem[] data) {

    Fragment fragment = new ScheduleSlideFragment();
    Bundle args = new Bundle();
    args.putSerializable(ARG_DATA, data);
    fragment.setArguments(args);//w  w  w . j a v a 2  s.c  o m

    return fragment;
}

From source file:com.asy.animations.ui.fragment.detail.HeroeDetailFragment.java

public static HeroeDetailFragment newInstance(Heroe heroe) {

    Bundle args = new Bundle();

    args.putSerializable(EXTRA_HEROE, heroe);

    HeroeDetailFragment fragment = new HeroeDetailFragment();

    fragment.setArguments(args);// w  w w.  j  a  va 2 s .  c  o  m

    return fragment;
}