Example usage for android.os Bundle putCharSequence

List of usage examples for android.os Bundle putCharSequence

Introduction

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

Prototype

@Override
public void putCharSequence(@Nullable String key, @Nullable CharSequence value) 

Source Link

Document

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

Usage

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

public static LinkFragment newInstance(CharSequence url) {
    Bundle b = new Bundle(1);
    b.putCharSequence(ARG_URL, url);
    LinkFragment frag = new LinkFragment();
    frag.setArguments(b);/*from   w ww . j av  a  2  s  .co m*/
    return frag;
}

From source file:com.ntsync.android.sync.activities.MessageDialog.java

/**
 * Creates a Message Dialog and shows a Text-Message.
 * /*from  w  ww . j  a  v  a 2 s . c  om*/
 * @param text
 * @param fragmentManager
 * 
 * @return visible Dialog
 */
public static MessageDialog show(CharSequence text, FragmentManager fragmentManager) {
    Bundle args = new Bundle();
    args.putCharSequence(PARAM_TEXT, text);
    return showDialog(args, fragmentManager, String.valueOf(text.hashCode()));
}

From source file:jsettlers.main.android.core.ui.dialogs.EditTextDialog.java

public static EditTextDialog create(int requestCode, int titleResId, int hintResId, CharSequence text) {
    EditTextDialog dialog = new EditTextDialog();

    Bundle bundle = new Bundle();
    bundle.putInt(ARG_REQUEST_CODE, requestCode);
    bundle.putInt(ARG_TITLE_RES_ID, titleResId);
    bundle.putInt(ARG_HINT_RES_ID, hintResId);
    bundle.putCharSequence(ARG_TEXT, text);
    dialog.setArguments(bundle);/* w  w w .  j  a  v  a2 s  .  com*/

    return dialog;
}

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

public static LoginFragment newInstance(String accountName, CharSequence expectedStateToken) {
    Bundle args = new Bundle(2);
    args.putString(ARG_ACCOUNT_NAME, accountName);
    args.putCharSequence(ARG_EXPECTED_STATE_TOKEN, expectedStateToken);
    LoginFragment frag = new LoginFragment();
    frag.setArguments(args);/*from   w  ww.  j a v  a  2  s.  c  o  m*/
    return frag;
}

From source file:com.ntsync.android.sync.activities.MessageDialog.java

/**
 * Creates a Message Dialog and shows a Text-Message.
 * /*w w  w  .ja va  2s. c  om*/
 * @param resId
 * @param activity
 * 
 * @return visible Dialog
 */
public static MessageDialog showConfirmation(CharSequence msgText, CharSequence title,
        CharSequence positiveButtonText, FragmentActivity activity) {
    Bundle args = new Bundle();
    args.putCharSequence(PARAM_TEXT, msgText);
    args.putCharSequence(PARAM_TITLE, title);
    args.putCharSequence(PARAM_POSITIVEBUTTONTEXT, positiveButtonText);
    return showDialog(args, activity, String.valueOf(title.hashCode()));
}

From source file:com.silentcircle.silenttext.activity.AccountCreationActivity.java

private static Bundle copyCharSequence(Intent from, Bundle to, String extra) {
    to.putCharSequence(extra, from.getCharSequenceExtra(extra));
    return to;/*from www .j av a2  s.  c o m*/
}

From source file:com.nbossard.packlist.gui.NewTripFragment.java

/**
 * Create a new instance of MyFragment that will be initialized
 * with the given arguments.// www  . j a  v a  2s .com
 * @param parTripId identifier of trip to be displayed
 */
public static NewTripFragment newInstance(final UUID parTripId) {
    NewTripFragment f = new NewTripFragment();
    if (parTripId != null) {
        Bundle b = new Bundle();
        b.putCharSequence(BUNDLE_PAR_TRIP_ID, parTripId.toString());
        f.setArguments(b);
    }
    return f;
}

From source file:qauth.djd.qauthclient.login.ContentFragment.java

/**
 * @return a new instance of {@link ContentFragment}, adding the parameters into a bundle and
 * setting them as arguments./*from w ww .  j a  va 2  s. c o  m*/
 */
public static ContentFragment newInstance(CharSequence title, int indicatorColor, int dividerColor) {
    Bundle bundle = new Bundle();
    bundle.putCharSequence(KEY_TITLE, title);
    bundle.putInt(KEY_INDICATOR_COLOR, indicatorColor);
    bundle.putInt(KEY_DIVIDER_COLOR, dividerColor);

    ContentFragment fragment = new ContentFragment();
    fragment.setArguments(bundle);

    initDataset();

    return fragment;
}

From source file:org.rm3l.ddwrt.fragments.DDWRTBaseFragment.java

@Nullable
public static DDWRTBaseFragment newInstance(PageSlidingTabStripFragment parentFragment,
        @NotNull final Class<? extends DDWRTBaseFragment> clazz, @NotNull final CharSequence parentSectionTitle,
        @NotNull final CharSequence tabTitle, @Nullable final String router) {
    try {//  ww  w .j a  va 2  s.co m
        @NotNull
        final DDWRTBaseFragment fragment = clazz.newInstance().setTabTitle(tabTitle)
                .setParentSectionTitle(parentSectionTitle);
        fragment.mClazz = clazz;
        fragment.parentFragment = parentFragment;

        @NotNull
        Bundle args = new Bundle();
        args.putCharSequence(TAB_TITLE, tabTitle);
        args.putCharSequence(PARENT_SECTION_TITLE, parentSectionTitle);
        args.putString(FRAGMENT_CLASS, clazz.getCanonicalName());
        args.putString(ROUTER_CONNECTION_INFO, router);
        fragment.setArguments(args);

        return fragment;

    } catch (java.lang.InstantiationException | IllegalAccessException e) {
        e.printStackTrace();
    }
    return null;
}

From source file:com.ofalvai.bpinfo.ui.alertlist.NoticeFragment.java

@Override
public void onSaveInstanceState(Bundle outState) {
    outState.putCharSequence(KEY_NOTICE_TEXT, mNoticeText);
    super.onSaveInstanceState(outState);
}