Example usage for android.os Bundle putParcelableArray

List of usage examples for android.os Bundle putParcelableArray

Introduction

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

Prototype

public void putParcelableArray(@Nullable String key, @Nullable Parcelable[] value) 

Source Link

Document

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

Usage

From source file:io.v.android.apps.syncslides.QuestionDialogFragment.java

public static QuestionDialogFragment newInstance(List<Question> questions) {
    QuestionDialogFragment fragment = new QuestionDialogFragment();
    Bundle args = new Bundle();
    args.putParcelableArray(QUESTIONER_LIST_KEY, questions.toArray(new Question[0]));
    fragment.setArguments(args);//from ww w .j  a va 2 s  .com
    return fragment;
}

From source file:com.google.android.apps.gutenberg.AccountSelectionDialogFragment.java

public static AccountSelectionDialogFragment newInstance(Account[] accounts) {
    AccountSelectionDialogFragment fragment = new AccountSelectionDialogFragment();
    Bundle args = new Bundle();
    args.putParcelableArray(ARG_ACCOUNTS, accounts);
    fragment.setArguments(args);//from   w  ww . j a va2s.  c  o m
    return fragment;
}

From source file:view.EmojiconGridFragment.java

protected static EmojiconGridFragment newInstance(Emojicon[] emojicons, EmojiconRecents recents,
        boolean useSystemDefault) {
    EmojiconGridFragment emojiGridFragment = new EmojiconGridFragment();
    Bundle args = new Bundle();
    args.putParcelableArray(EMOJICONS_KEY, emojicons);
    args.putBoolean(USE_SYSTEM_DEFAULT_KEY, useSystemDefault);
    emojiGridFragment.setArguments(args);
    //  emojiGridFragment.setRecents(recents);
    return emojiGridFragment;
}

From source file:com.liu.Account.view.emojicon.EmojiconGridFragment.java

protected static EmojiconGridFragment newInstance(Emojicon[] emojicons, EmojiconRecents recents,
        boolean useSystemDefault) {
    EmojiconGridFragment emojiGridFragment = new EmojiconGridFragment();
    Bundle args = new Bundle();
    args.putParcelableArray(EMOJICONS_KEY, emojicons);
    args.putBoolean(USE_SYSTEM_DEFAULT_KEY, useSystemDefault);
    emojiGridFragment.setArguments(args);
    emojiGridFragment.setRecents(recents);
    return emojiGridFragment;
}

From source file:org.schabi.newpipe.about.LicenseFragment.java

public static LicenseFragment newInstance(SoftwareComponent[] softwareComponents) {
    if (softwareComponents == null) {
        throw new NullPointerException("softwareComponents is null");
    }//from  w w w .j  a  v  a 2  s. com
    LicenseFragment fragment = new LicenseFragment();
    Bundle bundle = new Bundle();
    bundle.putParcelableArray(ARG_COMPONENTS, softwareComponents);
    fragment.setArguments(bundle);
    return fragment;
}

From source file:com.arrata.user.cameratest.AspectRatioFragment.java

public static AspectRatioFragment newInstance(Set<AspectRatio> ratios, AspectRatio currentRatio) {
    final AspectRatioFragment fragment = new AspectRatioFragment();
    final Bundle args = new Bundle();
    args.putParcelableArray(ARG_ASPECT_RATIOS, ratios.toArray(new AspectRatio[ratios.size()]));
    args.putParcelable(ARG_CURRENT_ASPECT_RATIO, currentRatio);
    fragment.setArguments(args);/* w ww  .  j  av  a  2  s. co  m*/
    return fragment;
}

From source file:de.vanita5.twittnuker.fragment.support.DeleteUserListMembersDialogFragment.java

public static DeleteUserListMembersDialogFragment show(final FragmentManager fm,
        final ParcelableUserList userList, final ParcelableUser... users) {
    final Bundle args = new Bundle();
    args.putParcelable(EXTRA_USER_LIST, userList);
    args.putParcelableArray(EXTRA_USERS, users);
    final DeleteUserListMembersDialogFragment f = new DeleteUserListMembersDialogFragment();
    f.setArguments(args);//w  ww.  ja  v  a  2s.c o  m
    f.show(fm, FRAGMENT_TAG);
    return f;
}

From source file:com.shoutin.emojicons.EmojiconGridFragment.java

protected static EmojiconGridFragment newInstance(@Emojicon.Type int type, Emojicon[] emojicons,
        EmojiconRecents recents, boolean useSystemDefault) {
    EmojiconGridFragment emojiGridFragment = new EmojiconGridFragment();
    Bundle args = new Bundle();
    args.putInt(ARG_EMOJICON_TYPE, type);
    args.putParcelableArray(ARG_EMOJICONS, emojicons);
    args.putBoolean(ARG_USE_SYSTEM_DEFAULTS, useSystemDefault);
    emojiGridFragment.setArguments(args);
    emojiGridFragment.setRecents(recents);
    return emojiGridFragment;
}

From source file:Main.java

public static Bundle[] getBundleArrayFromBundle(Bundle bundle, String key) {
    Parcelable[] array = bundle.getParcelableArray(key);
    if ((array instanceof Bundle[]) || array == null) {
        return (Bundle[]) array;
    }//from w  w  w  . j a v a  2  s.c o  m
    Bundle[] typedArray = (Bundle[]) Arrays.copyOf(array, array.length, Bundle[].class);
    bundle.putParcelableArray(key, typedArray);
    return typedArray;
}

From source file:com.linkedin.android.eventsapp.EventFragment.java

public static final EventFragment newInstance(Event event) {
    EventFragment f = new EventFragment();
    Bundle bdl = new Bundle();
    bdl.putString(EXTRA_EVENT_NAME, event.getEventName());
    bdl.putInt(EXTRA_PICTURE_ID, event.getImageResourceId());
    bdl.putString(EXTRA_EVENT_LOCATION, event.getEventLocation());
    bdl.putLong(EXTRA_EVENT_DATE, event.getEventDate());
    bdl.putBoolean(EXTRA_EVENT_ATTENDING, event.getIsAttending());
    bdl.putParcelableArray(EXTRA_EVENT_ATTENDEES, event.getEventAttendees());
    f.setArguments(bdl);//from ww w  . j  a  v a  2s.co  m
    return f;
}