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.cerema.cloud2.ui.dialog.ExpirationDatePickerDialogFragment.java

/**
 *  Factory method to create new instances
 *
 *  @param file                 File to bind an expiration date
 *  @param chosenDateInMillis   Date chosen when the dialog appears
 *  @return                     New dialog instance
 *///from  w w w.ja va 2  s  . c o  m
public static ExpirationDatePickerDialogFragment newInstance(OCFile file, long chosenDateInMillis) {
    Bundle arguments = new Bundle();
    arguments.putParcelable(ARG_FILE, file);
    arguments.putLong(ARG_CHOSEN_DATE_IN_MILLIS, chosenDateInMillis);

    ExpirationDatePickerDialogFragment dialog = new ExpirationDatePickerDialogFragment();
    dialog.setArguments(arguments);
    return dialog;
}

From source file:at.bitfire.davdroid.ui.setup.DetectConfigurationFragment.java

public static DetectConfigurationFragment newInstance(LoginCredentials credentials) {
    DetectConfigurationFragment frag = new DetectConfigurationFragment();
    Bundle args = new Bundle(1);
    args.putParcelable(ARG_LOGIN_CREDENTIALS, credentials);
    frag.setArguments(args);// w  w  w . jav  a  2 s  .c o m
    return frag;
}

From source file:com.battlelancer.seriesguide.ui.dialogs.AddDialogFragment.java

public static AddDialogFragment newInstance(SearchResult show) {
    AddDialogFragment f = new AddDialogFragment();
    Bundle args = new Bundle();
    args.putParcelable("show", show);
    f.setArguments(args);//from  www  . java2s  .c om
    return f;
}

From source file:com.bdenney.locl.fragment.VenuePostsFragment.java

public static VenuePostsFragment create(final Venue venue) {
    VenuePostsFragment fragment = new VenuePostsFragment();
    final Bundle args = new Bundle();
    args.putParcelable(ARGS_VENUE, venue);
    fragment.setArguments(args);/* ww  w. j  a v a  2  s.co  m*/
    return fragment;
}

From source file:aws.apps.usbDeviceEnumerator.ui.usbinfo.LinuxUsbInfoFragment.java

public static Fragment create(final SysBusUsbDevice usbDevice) {
    final Fragment fragment = new LinuxUsbInfoFragment();
    final Bundle bundle = new Bundle();
    bundle.putParcelable(EXTRA_DATA, usbDevice);
    fragment.setArguments(bundle);/*  ww w  .  j a v a2  s  .  c  o  m*/
    return fragment;
}

From source file:com.apptentive.android.sdk.module.messagecenter.view.AttachmentPreviewDialog.java

public static AttachmentPreviewDialog newInstance(ImageItem image) {
    AttachmentPreviewDialog dialog = new AttachmentPreviewDialog();
    Bundle args = new Bundle();
    args.putParcelable("image", image);
    dialog.setArguments(args);/*ww w.  j  av  a2 s. c  o  m*/
    return dialog;
}

From source file:com.bilibili.boxing_impl.ui.BoxingRawImageFragment.java

public static BoxingRawImageFragment newInstance(@NonNull ImageMedia image) {
    BoxingRawImageFragment fragment = new BoxingRawImageFragment();
    Bundle args = new Bundle();
    args.putParcelable(BUNDLE_IMAGE, image);
    fragment.setArguments(args);/*from w w w .  j a  va2 s . c  o m*/
    return fragment;
}

From source file:ch.berta.fabio.popularmovies.presentation.ui.fragments.MovieDetailsOnlFragment.java

/**
 * Returns a new instance of a {@link MovieDetailsOnlFragment}.
 *
 * @param viewModel the view model for the view
 * @return a new instance of a {@link MovieDetailsOnlFragment}
 *//*from  www  .  j a  v  a 2 s . c om*/
public static MovieDetailsOnlFragment newInstance(@NonNull MovieDetailsViewModel viewModel) {
    MovieDetailsOnlFragment fragment = new MovieDetailsOnlFragment();

    Bundle args = new Bundle();
    args.putParcelable(KEY_VIEW_MODEL, viewModel);
    fragment.setArguments(args);

    return fragment;
}

From source file:com.cerema.cloud2.ui.dialog.ShareLinkToDialog.java

public static ShareLinkToDialog newInstance(Intent intent, String[] packagesToExclude) {
    ShareLinkToDialog f = new ShareLinkToDialog();
    Bundle args = new Bundle();
    args.putParcelable(ARG_INTENT, intent);
    args.putStringArray(ARG_PACKAGES_TO_EXCLUDE, packagesToExclude);
    f.setArguments(args);/*from  w  w  w. j  av  a  2s  . com*/
    return f;
}

From source file:com.afg.MngProductContentProvider.Fragments.ManagePharmacy_Fragment.java

public static ManagePharmacy_Fragment newInstance(Pharmacy pharmacy, int mode) {

    Bundle args = new Bundle();
    args.putInt(ListPharmacy_Fragment.RECOVERY_MODE, mode);
    args.putParcelable(ListPharmacy_Fragment.RECOVERY_PHARMACY, pharmacy);
    ManagePharmacy_Fragment fragment = new ManagePharmacy_Fragment();
    fragment.setArguments(args);/*  w w w  .  j  av a  2s  . c o  m*/
    return fragment;
}