Example usage for android.os Bundle putStringArray

List of usage examples for android.os Bundle putStringArray

Introduction

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

Prototype

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

Source Link

Document

Inserts a String array value into the mapping of this Bundle, replacing any existing value for the given key.

Usage

From source file:com.inter.trade.ui.fragment.gamerecharge.dialog.FavoriteCharacterDialogFragment.java

public static void show(Fragment fragment, FragmentActivity activity, String title, String[] items) {
    FavoriteCharacterDialogFragment dialog = new FavoriteCharacterDialogFragment();
    dialog.setTargetFragment(fragment, 0);
    dialog.setStyle(android.R.style.Theme_Light, 0);
    Bundle args = new Bundle();
    args.putString(ARG_TITLE, title);/*from   w  w w  .j  a v  a  2s .co m*/
    args.putStringArray(ARG_ITEMS, items);
    dialog.setArguments(args);
    dialog.show(activity.getSupportFragmentManager(), TAG);
}

From source file:com.achep.base.ui.fragments.dialogs.PermissionsDialog.java

public static PermissionsDialog newInstance(@NonNull Permission[] permissions) {
    String[] p = new String[permissions.length];
    for (int i = 0; i < p.length; i++) {
        p[i] = permissions[i].getClass().getSimpleName();
    }//ww w .  j  ava  2s.  c o m

    Bundle bundle = new Bundle();
    bundle.putStringArray(KEY_PERMISSIONS, p);

    PermissionsDialog fragment = new PermissionsDialog();
    fragment.setArguments(bundle);
    return fragment;
}

From source file:com.sarltokyo.customstyleddialogssample.CustomDoDialogFragment.java

public static CustomDoDialogFragment newInstance(String title, String[] items) {
    CustomDoDialogFragment frag = new CustomDoDialogFragment();
    Bundle bundle = new Bundle();
    bundle.putString(ARG_TITLE, title);//  w  w w.j  av  a 2s  .  c  o m
    bundle.putStringArray(ARG_ITEMS, items);
    frag.setArguments(bundle);
    return frag;
}

From source file:com.sshine.huochexing.model.FavoriteCharacterDialogFragment.java

private static void show(FragmentManager fm, int requestCode, String title, String[] items) {
    FavoriteCharacterDialogFragment dialog = new FavoriteCharacterDialogFragment();
    Bundle args = new Bundle();
    args.putString(ARG_TITLE, title);/*from   www.ja va2s.com*/
    args.putStringArray(ARG_ITEMS, items);
    args.putInt(ARG_REQUEST_CODE, requestCode);
    dialog.setArguments(args);
    dialog.show(fm, TAG);
}

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

/**
 * Public factory method to create new ConfirmationDialogFragment instances.
 * // w  w w  .  ja  v  a2 s  . com
 * @param string_id         Resource id for a message to show in the dialog.
 * @param arguments         Arguments to complete the message, if it's a format string.
 * @param posBtn            Resource id for the text of the positive button.
 * @param neuBtn            Resource id for the text of the neutral button.
 * @param negBtn            Resource id for the text of the negative button.
 * @return                  Dialog ready to show.
 */
public static ConfirmationDialogFragment newInstance(int string_id, String[] arguments, int posBtn, int neuBtn,
        int negBtn) {
    ConfirmationDialogFragment frag = new ConfirmationDialogFragment();
    Bundle args = new Bundle();
    args.putInt(ARG_CONF_RESOURCE_ID, string_id);
    args.putStringArray(ARG_CONF_ARGUMENTS, arguments);
    args.putInt(ARG_POSITIVE_BTN_RES, posBtn);
    args.putInt(ARG_NEUTRAL_BTN_RES, neuBtn);
    args.putInt(ARG_NEGATIVE_BTN_RES, negBtn);
    frag.setArguments(args);
    return frag;
}

From source file:butter.droid.base.fragments.dialog.StringArraySelectorDialogFragment.java

private static void show(FragmentManager fm, String title, String[] items, int defaultPosition, int mode,
        DialogInterface.OnClickListener dialogClickListener) {
    Bundle args = new Bundle();
    args.putString(TITLE, title);/*w ww  .j  av  a2  s  . c  om*/
    args.putStringArray(ARRAY, items);
    args.putInt(MODE, mode);
    args.putInt(POSITION, defaultPosition);

    StringArraySelectorDialogFragment dialogFragment = new StringArraySelectorDialogFragment();
    dialogFragment.setArguments(args);
    dialogFragment.setDialogClickListener(dialogClickListener);
    dialogFragment.show(fm, "overlay_fragment");
}

From source file:com.btmura.android.reddit.app.AddSubredditFragment.java

public static AddSubredditFragment newInstance(String[] subreddits) {
    Bundle args = new Bundle(1);
    args.putStringArray(ARG_MULTIPLE_SUBREDDITS, subreddits);
    return newFragment(args);
}

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);/*  w w w . j av  a  2  s .  c  om*/
    return f;
}

From source file:me.philio.disqus.AuthorizeFragment.java

/**
 * Get a new instance of this fragment/*  w  w w .  jav a2  s. co  m*/
 *
 * @param apiKey
 * @param redirectUri
 * @return
 */
public static AuthorizeFragment newInstance(String apiKey, String[] scopes, String redirectUri) {
    AuthorizeFragment fragment = new AuthorizeFragment();
    Bundle args = new Bundle();
    args.putString(ARG_API_KEY, apiKey);
    args.putStringArray(ARG_SCOPES, scopes);
    args.putString(ARG_REDIRECT_URI, redirectUri);
    fragment.setArguments(args);
    return fragment;
}

From source file:org.droid2droid.ui.connect.ConnectDialogFragment.java

public static final ConnectDialogFragment newTryConnectFragment(int flags, String[] uris, Bundle params) {
    ConnectDialogFragment fragment = new ConnectDialogFragment();
    Bundle bundle = new Bundle();
    bundle.putStringArray(KEY_URIS, uris);
    bundle.putBundle(KEY_BUNDLE, params);
    bundle.putInt(KEY_FLAGS, flags);//  w  w  w .  j  a v  a 2 s  .  co m
    fragment.setArguments(bundle);
    return fragment;
}