Example usage for android.os Bundle putStringArrayList

List of usage examples for android.os Bundle putStringArrayList

Introduction

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

Prototype

@Override
public void putStringArrayList(@Nullable String key, @Nullable ArrayList<String> value) 

Source Link

Document

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

Usage

From source file:com.seregil13.literarytracker.lightnovel.LightNovelEditFragment.java

/**
 * Creates a new instance of the fragment in edit mode with all the pertinent data passed in as
 * parameters.//from  www  .  j a  va  2s  .  c  o m
 *
 * @return An instance of LightNovelEditFragment.
 */
public static LightNovelEditFragment newEditInstance(int id, String title, String author, String description,
        String completed, String translatorSite, ArrayList<String> genres) {
    LightNovelEditFragment fragment = new LightNovelEditFragment();
    Bundle arguments = new Bundle();
    arguments.putInt(JsonKeys.ID.toString(), id);
    arguments.putString(JsonKeys.TITLE.toString(), title);
    arguments.putString(JsonKeys.AUTHOR.toString(), author);
    arguments.putString(JsonKeys.DESCRIPTION.toString(), description);
    arguments.putString(JsonKeys.COMPLETED.toString(), completed);
    arguments.putString(JsonKeys.TRANSLATOR_SITE.toString(), translatorSite);
    arguments.putStringArrayList(JsonKeys.GENRES.toString(), genres);
    arguments.putSerializable(CREATE_OR_EDIT_KEY, Mode.EDIT);

    fragment.setArguments(arguments);
    return fragment;
}

From source file:org.shaastra.helper.SuperAwesomeCardFragment2.java

public static SuperAwesomeCardFragment2 newInstance(int position, ArrayList<String> cNames,
        ArrayList<String> cNumber, ArrayList<String> cEvents, ArrayList<String> cEventsSub) {
    SuperAwesomeCardFragment2 f = new SuperAwesomeCardFragment2();

    //Collections.copy(cNames, con);
    Bundle b = new Bundle();
    b.putInt(ARG_POSITION, position);/*  www  . j a v  a 2  s.co  m*/
    b.putStringArrayList("cname", cNames);
    b.putStringArrayList("cphone", cNumber);
    b.putStringArrayList("cevent", cEvents);
    b.putStringArrayList("ceventsub", cEventsSub);

    f.setArguments(b);
    return f;
}

From source file:se.tmeit.app.ui.members.MemberInfoFragment.java

public static MemberInfoFragment createInstance(Context context, Member member,
        Member.RepositoryData memberRepository) {
    Bundle bundle = new Bundle();
    bundle.putString(Member.Keys.USERNAME, member.username());
    bundle.putString(Member.Keys.REAL_NAME, member.realName());
    bundle.putString(Member.Keys.TITLE_TEXT, member.titleText(context, memberRepository));
    bundle.putString(Member.Keys.TEAM_TEXT, member.teamText(context, memberRepository));
    bundle.putString(Member.Keys.PHONE, member.phone());
    bundle.putString(Member.Keys.EMAIL, member.email());
    bundle.putStringArrayList(Member.Keys.FACES, new ArrayList<>(member.faces()));
    bundle.putString(Member.Keys.FLAGS, getDescriptionOfFlags(context, member));
    bundle.putString(Member.Keys.DATE_PRAO, member.datePrao());
    bundle.putString(Member.Keys.DATE_MARSKALK, member.dateMarskalk());
    bundle.putString(Member.Keys.DATE_VRAQ, member.dateVraq());
    bundle.putInt(Member.Keys.EXPERIENCE_POINTS, member.experiencePoints());
    bundle.putParcelableArrayList(Member.Keys.EXPERIENCE_BADGES, new ArrayList<>(member.experienceBadges()));

    MemberInfoFragment instance = new MemberInfoFragment();
    instance.setArguments(bundle);/*  w ww.ja v a 2s .  c  o m*/
    return instance;
}

From source file:org.cyanogenmod.theme.chooser.ChooserDetailFragment.java

public static ChooserDetailFragment newInstance(String pkgName, ArrayList<String> componentFilters) {
    ChooserDetailFragment fragment = new ChooserDetailFragment();
    Bundle args = new Bundle();
    args.putString("pkgName", pkgName);
    args.putStringArrayList(ChooserActivity.EXTRA_COMPONENT_FILTER, componentFilters);
    fragment.setArguments(args);/*  w w w  .  j  a  v  a2 s. c o m*/
    return fragment;
}

From source file:com.google.android.apps.forscience.whistlepunk.metadata.EditTriggerFragment.java

public static EditTriggerFragment newInstance(String sensorId, String experimentId, String triggerId,
        byte[] triggerInfoBlob, byte[] sensorLayoutBlob, int position, ArrayList<String> triggerOrder) {
    EditTriggerFragment result = new EditTriggerFragment();
    Bundle args = new Bundle();
    args.putString(ARG_SENSOR_ID, sensorId);
    args.putString(ARG_EXPERIMENT_ID, experimentId);
    args.putString(ARG_TRIGGER_ID, triggerId);
    args.putByteArray(ARG_SENSOR_LAYOUT, sensorLayoutBlob);
    args.putByteArray(ARG_TRIGGER_INFO, triggerInfoBlob);
    args.putInt(ARG_LAYOUT_POSITION, position);
    args.putStringArrayList(TriggerListFragment.ARG_TRIGGER_ORDER, triggerOrder);
    result.setArguments(args);/*from  www.ja  va  2s.com*/
    return result;
}

From source file:org.connectbot.HostEditorFragment.java

public static HostEditorFragment newInstance(HostBean existingHost, ArrayList<String> pubkeyNames,
        ArrayList<String> pubkeyValues) {
    HostEditorFragment fragment = new HostEditorFragment();
    Bundle args = new Bundle();
    if (existingHost != null) {
        args.putLong(ARG_EXISTING_HOST_ID, existingHost.getId());
        args.putParcelable(ARG_EXISTING_HOST, existingHost.getValues());
    }//www . jav a 2 s.c  om
    args.putStringArrayList(ARG_PUBKEY_NAMES, pubkeyNames);
    args.putStringArrayList(ARG_PUBKEY_VALUES, pubkeyValues);
    fragment.setArguments(args);
    return fragment;
}

From source file:com.pax.pay.trans.action.activity.SelectAcqActivity.java

public void setContent(Fragment fragment) {
    FragmentManager fm = getSupportFragmentManager();
    FragmentTransaction ft = fm.beginTransaction();
    Bundle bundle = new Bundle();
    bundle.putStringArrayList(Constants.ACQUIRER_NAME, checkedAcqs);
    fragment.setArguments(bundle);//  w ww  .j a v  a  2  s  .  co  m
    ft.replace(mContent.getId(), fragment);
    ft.commit();
}

From source file:jp.alessandro.android.iab.ItemGetter.java

private Bundle createBundleItemListFromArray(ArrayList<String> itemIds) {
    Bundle bundle = new Bundle();
    bundle.putStringArrayList(Constants.RESPONSE_ITEM_ID_LIST, itemIds);
    return bundle;
}

From source file:com.commonsware.android.anim.threepane.MainActivity.java

@Override
protected void onSaveInstanceState(Bundle outState) {
    super.onSaveInstanceState(outState);

    outState.putStringArrayList(KEY_MIDDLE_CONTENTS, middleContents);
}

From source file:me.tabak.fragmentswitcher.sample.SampleFragment.java

@Override
public void onSaveInstanceState(Bundle outState) {
    super.onSaveInstanceState(outState);
    outState.putStringArrayList(KEY_RANDOM_STRINGS, mRandomStrings);
}