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.example.parkhere.provider.ParkingSpaceReservationDetailsFragment.java

public static ParkingSpaceReservationDetailsFragment newInstance(User user, ParkingSpace parkingSpace,
        ProviderReservation providerReservation) {
    ParkingSpaceReservationDetailsFragment fragment = new ParkingSpaceReservationDetailsFragment();
    Bundle bundle = new Bundle();
    bundle.putSerializable(USER_KEY, user);
    bundle.putSerializable(PARKING_SPACE_KEY, parkingSpace);
    bundle.putSerializable(PROVIDER_RESERVATION_KEY, providerReservation);
    fragment.setArguments(bundle);//ww  w . j  ava 2 s .c om

    return fragment;
}

From source file:com.chrynan.guitartuner.PitchFragment.java

public static PitchFragment newInstance(Note note, float x, float y) {
    PitchFragment fragment = new PitchFragment();
    Bundle args = new Bundle();
    args.putSerializable("note", note);
    args.putFloat("x", x);
    args.putFloat("y", y);
    fragment.setArguments(args);//from   ww  w  .  jav  a  2  s.c o m
    return fragment;
}

From source file:com.eugene.fithealthmaingit.UI.MealView.MealViewFragment.java

public static MealViewFragment newInstance(int mId) {
    Bundle args = new Bundle();
    args.putSerializable("EXTRA_ID", mId);
    MealViewFragment fragment = new MealViewFragment();
    fragment.setArguments(args);/* w ww.  j a  v  a 2s  .c o  m*/
    return fragment;
}

From source file:com.boko.vimusic.menu.DeleteDialog.java

/**
 * @param title/* w  ww  .ja  va 2s  .co  m*/
 *            The title of the artist, album, or song to delete
 * @param items
 *            The item(s) to delete
 * @param key
 *            The key used to remove items from the cache.
 * @return A new instance of the dialog
 */
public static DeleteDialog newInstance(final String title, final Song[] items, final String key) {
    final DeleteDialog frag = new DeleteDialog();
    final Bundle args = new Bundle();
    args.putString(Config.NAME, title);
    args.putSerializable("items", items);
    args.putString("cachekey", key);
    frag.setArguments(args);
    return frag;
}

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

public static ProfileFragment newInstance(ViewProfileEvent profile) {
    ProfileFragment profileFragment = new ProfileFragment();
    Bundle bundle = new Bundle();
    bundle.putSerializable(PROFILE_KEY, profile);
    profileFragment.setArguments(bundle);
    return profileFragment;
}

From source file:com.coinblesk.client.ui.dialogs.ProgressSuccessOrFailDialog.java

public static DialogFragment newInstance(String dialogTitle) {
    DialogFragment fragment = new ProgressSuccessOrFailDialog();
    Bundle args = new Bundle();
    args.putSerializable(ARG_STATE, State.PROGRESS);
    args.putString(ARG_TITLE, dialogTitle);
    fragment.setArguments(args);//from ww  w.j a  va  2s .  c o m
    return fragment;
}

From source file:com.connectsdk.smarthomesampler.fragment.SetupMultiChoiceFragment.java

public static Fragment setArguments(Fragment fragment, ArrayList<String> ids) {
    Bundle args = new Bundle();
    args.putSerializable("ids", ids);
    fragment.setArguments(args);//from  w w  w. ja va  2s.co m
    return fragment;
}

From source file:com.krossovochkin.kwitter.fragments.SendTweetFragment.java

public static SendTweetFragment newInstance(Status statusToReply) {
    SendTweetFragment sendTweetFragment = new SendTweetFragment();

    Bundle bundle = new Bundle();
    bundle.putSerializable(Constants.STATUS_KEY, statusToReply);

    sendTweetFragment.setArguments(bundle);
    return sendTweetFragment;
}

From source file:com.fowlcorp.homebank4android.gui.OverviewFragment.java

public static final OverviewFragment newInstance(Model model) {
    OverviewFragment f = new OverviewFragment();
    Bundle bdl = new Bundle(3);
    bdl.putSerializable(ARG_MODEL, model);
    f.setArguments(bdl);/*from ww  w  . j  a v  a  2 s  .  c  om*/
    return f;
}

From source file:com.brq.wallet.lt.activity.TraderInfoFragment.java

public static TraderInfoFragment createInstance(PublicTraderInfo traderInfo) {
    TraderInfoFragment tif = new TraderInfoFragment();
    Bundle args = new Bundle();
    args.putSerializable("traderInfo", traderInfo);
    tif.setArguments(args);// w  ww. j  a va 2s.com
    return tif;
}