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:org.cyanogenmod.theme.chooser.ChooserBrowseFragment.java

public static ChooserBrowseFragment newInstance(ArrayList<String> componentFilters) {
    ChooserBrowseFragment fragment = new ChooserBrowseFragment();
    Bundle args = new Bundle();
    args.putStringArrayList(ChooserActivity.EXTRA_COMPONENT_FILTER, componentFilters);
    fragment.setArguments(args);/*from w w w.  j  av a 2s .c om*/
    return fragment;
}

From source file:com.facebook.share.internal.NativeDialogParameters.java

private static Bundle createBaseParameters(ShareContent content, boolean dataErrorsFatal) {
    Bundle params = new Bundle();

    Utility.putUri(params, ShareConstants.CONTENT_URL, content.getContentUrl());
    Utility.putNonEmptyString(params, ShareConstants.PLACE_ID, content.getPlaceId());
    Utility.putNonEmptyString(params, ShareConstants.REF, content.getRef());

    params.putBoolean(ShareConstants.DATA_FAILURES_FATAL, dataErrorsFatal);

    List<String> peopleIds = content.getPeopleIds();
    if (!Utility.isNullOrEmpty(peopleIds)) {
        params.putStringArrayList(ShareConstants.PEOPLE_IDS, new ArrayList<String>(peopleIds));
    }//  ww w .j  a  v  a  2s  .  com

    return params;
}

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

public static TriggerListFragment newInstance(String sensorId, String experimentId, int position,
        ArrayList<String> triggerOrder) {
    TriggerListFragment fragment = new TriggerListFragment();
    Bundle args = new Bundle();
    args.putString(ARG_SENSOR_ID, sensorId);
    args.putString(ARG_EXPERIMENT_ID, experimentId);
    args.putInt(ARG_LAYOUT_POSITION, position);
    args.putStringArrayList(ARG_TRIGGER_ORDER, triggerOrder);
    fragment.setArguments(args);//from   www .  ja va2  s.c o m
    return fragment;
}

From source file:com.facebook.share.internal.LegacyNativeDialogParameters.java

private static Bundle createBaseParameters(ShareContent content, boolean dataErrorsFatal) {
    Bundle params = new Bundle();

    Utility.putUri(params, ShareConstants.LEGACY_LINK, content.getContentUrl());
    Utility.putNonEmptyString(params, ShareConstants.LEGACY_PLACE_TAG, content.getPlaceId());
    Utility.putNonEmptyString(params, ShareConstants.LEGACY_REF, content.getRef());

    params.putBoolean(ShareConstants.LEGACY_DATA_FAILURES_FATAL, dataErrorsFatal);

    List<String> peopleIds = content.getPeopleIds();
    if (!Utility.isNullOrEmpty(peopleIds)) {
        params.putStringArrayList(ShareConstants.LEGACY_FRIEND_TAGS, new ArrayList<>(peopleIds));
    }//ww w. j a va 2s . c o  m

    return params;
}

From source file:com.amazon.android.ui.fragments.ErrorDialogFragment.java

/**
 * Creates a new instance of the dialog fragment.
 *
 * @param context                     The relevant context.
 * @param errorCategory               To help determine the error specific parameters.
 * @param errorDialogFragmentListener The fragment listener.
 * @return The ErrorDialogFragment instance.
 *//*from  www .  j a v  a  2  s  .c o m*/
public static ErrorDialogFragment newInstance(Context context, ErrorUtils.ERROR_CATEGORY errorCategory,
        ErrorDialogFragmentListener errorDialogFragmentListener) {

    ErrorDialogFragment errorDialogFragment = new ErrorDialogFragment();
    errorDialogFragment.mListener = errorDialogFragmentListener;
    errorDialogFragment.setStyle(DialogFragment.STYLE_NO_TITLE, R.style.error_dialog);
    // Setting it as non-cancelable prevents back button press issues.
    errorDialogFragment.setCancelable(false);
    Bundle args = new Bundle();
    // Set the error category.
    args.putSerializable(ARG_ERROR_CATEGORY, errorCategory);
    // Get the error message.
    args.putString(ARG_ERROR_MESSAGE, ErrorUtils.getErrorMessage(context, errorCategory));
    // Get the button details.
    args.putStringArrayList(ARG_ACTION_LABELS,
            (ArrayList<String>) ErrorUtils.getButtonLabelsList(context, errorCategory));
    // Get the button behavior.
    errorDialogFragment.setArguments(args);
    return errorDialogFragment;
}

From source file:com.miz.mizuu.fragments.IdentifyTvShowEpisodeFragment.java

public static IdentifyTvShowEpisodeFragment newInstance(ArrayList<String> filepaths, String showTitle,
        String showId) {/*w w w. j av  a2  s  .co m*/
    IdentifyTvShowEpisodeFragment frag = new IdentifyTvShowEpisodeFragment();
    Bundle args = new Bundle();
    args.putStringArrayList("filepaths", filepaths);
    args.putString("showTitle", showTitle);
    args.putString("showId", showId);
    frag.setArguments(args);
    return frag;
}

From source file:com.facebook.LegacyTokenHelper.java

public static void putPermissions(Bundle bundle, Collection<String> value) {
    Validate.notNull(bundle, "bundle");
    Validate.notNull(value, "value");

    bundle.putStringArrayList(PERMISSIONS_KEY, new ArrayList<String>(value));
}

From source file:com.facebook.LegacyTokenHelper.java

public static void putDeclinedPermissions(Bundle bundle, Collection<String> value) {
    Validate.notNull(bundle, "bundle");
    Validate.notNull(value, "value");

    bundle.putStringArrayList(DECLINED_PERMISSIONS_KEY, new ArrayList<String>(value));
}

From source file:com.facebook.LegacyTokenCacheTest.java

private static void putStringList(String key, Bundle bundle) {
    int length = random.nextInt(50);
    ArrayList<String> stringList = new ArrayList<String>(length);
    while (0 < length--) {
        if (length == 0) {
            stringList.add(null);//w  ww  .j  a v  a  2  s  .c o m
        } else {
            stringList.add(new String(getCharArray()));
        }
    }

    bundle.putStringArrayList(key, stringList);
}

From source file:com.android.tv.dvr.ui.DvrUiHelper.java

/**
 * Shows DVR insufficient space error dialog.
 *///from   w w w  .  j  a v a  2 s.c o m
public static void showDvrInsufficientSpaceErrorDialog(MainActivity activity,
        Set<String> failedScheduledRecordingInfoSet) {
    Bundle args = new Bundle();
    ArrayList<String> failedScheduledRecordingInfoArray = new ArrayList<>(failedScheduledRecordingInfoSet);
    args.putStringArrayList(DvrInsufficientSpaceErrorFragment.FAILED_SCHEDULED_RECORDING_INFOS,
            failedScheduledRecordingInfoArray);
    showDialogFragment(activity, new DvrInsufficientSpaceErrorDialogFragment(), args);
    Utils.clearRecordingFailedReason(activity, TvInputManager.RECORDING_ERROR_INSUFFICIENT_SPACE);
    Utils.clearFailedScheduledRecordingInfoSet(activity);
}