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.MessageDialogFragment.java

public static MessageDialogFragment showMessage(FragmentManager fm, CharSequence message) {
    Bundle args = new Bundle(1);
    args.putCharSequence(ARG_MESSAGE, message);
    MessageDialogFragment frag = new MessageDialogFragment();
    frag.setArguments(args);//  w  ww.jav a 2  s . c  o m
    frag.show(fm, TAG);
    return frag;
}

From source file:it.gulch.linuxday.android.fragments.MessageDialogFragment.java

public static MessageDialogFragment newInstance(CharSequence title, CharSequence message) {
    MessageDialogFragment f = new MessageDialogFragment();
    Bundle args = new Bundle();
    args.putCharSequence("title", title);
    args.putCharSequence("message", message);
    f.setArguments(args);/*from w w  w .jav  a  2 s. c  om*/
    return f;
}

From source file:chrisrenke.drawerarrowdrawable.ContentFragment.java

/**
 * @return a new instance of {@link chrisrenke.drawerarrowdrawable.ContentFragment}, adding the parameters into a bundle and
 * setting them as arguments.//from  ww  w. jav  a 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);

    return fragment;
}

From source file:com.rishab.mangla.newsorp.ContentFragment.java

/**
 * @return a new instance of {@link ContentFragment}, adding the parameters into a bundle and
 * setting them as arguments.//from   ww  w.  j a v a  2  s.  co m
 */
public static ContentFragment newInstance(CharSequence title) {
    Bundle bundle = new Bundle();
    bundle.putCharSequence(KEY_TITLE, title);

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

    return fragment;
}

From source file:siarhei.luskanau.gps.tracker.free.ui.progress.AlertDialogFragment.java

private static AlertDialogFragment newInstance(CharSequence title, CharSequence message) {
    AlertDialogFragment fragment = new AlertDialogFragment();
    Bundle args = new Bundle();
    args.putCharSequence(TITLE_ARG, title);
    args.putCharSequence(MESSAGE_ARG, message);
    fragment.setArguments(args);/*from w  w  w  .j a v  a  2s.c o  m*/
    return fragment;
}

From source file:de.schildbach.wallet.ui.preference.ExtendedPublicKeyFragment.java

private static ExtendedPublicKeyFragment instance(final CharSequence xpub) {
    final ExtendedPublicKeyFragment fragment = new ExtendedPublicKeyFragment();

    final Bundle args = new Bundle();
    args.putCharSequence(KEY_XPUB, xpub);
    fragment.setArguments(args);/*from   w  w  w.j  a v  a2  s.  c o  m*/

    return fragment;
}

From source file:com.groksolutions.grok.mobile.dialog.AutoDismissDialog.java

/**
 * Create a new {@link Dialog} that will be dismissed after a period of time
 *
 * @param title The dialog title/*from w  ww  .  j a  v a2  s. c  om*/
 * @param message The dialog message to display
 * @param timeout Time in milliseconds to dismiss the dialog
 * @param manager The FragmentManager this fragment will be added to
 */
public static void show(CharSequence title, CharSequence message, long timeout, FragmentManager manager) {
    synchronized (_lock) {
        if (_dialog == null) {
            _dialog = new AutoDismissDialog();
        } else {
            return;
        }
    }
    final Bundle args = new Bundle();
    args.putCharSequence("title", title);
    args.putCharSequence("message", message);
    args.putLong("timeout", timeout);
    _dialog.setArguments(args);

    _dialog.show(manager, "AutoDismissDialog");
    _dialog = null;
}

From source file:com.iskrembilen.quasseldroid.gui.dialogs.TopicEditDialog.java

public static TopicEditDialog newInstance(CharSequence topic, String name, int id) {
    TopicEditDialog fragment = new TopicEditDialog();
    Bundle args = new Bundle();
    args.putCharSequence("topic", topic);
    args.putString("name", name);
    args.putInt("id", id);
    fragment.setArguments(args);// w w w.  ja v  a2s.  com

    return fragment;
}

From source file:com.rafaelsf80.d4w.hotels.ContentFragment.java

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

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

    return fragment;
}

From source file:it.gulch.linuxday.android.fragments.MessageDialogFragment.java

public static MessageDialogFragment newInstance(@StringRes int titleResId, CharSequence message) {
    MessageDialogFragment f = new MessageDialogFragment();
    Bundle args = new Bundle();
    args.putInt("titleResId", titleResId);
    args.putCharSequence("message", message);
    f.setArguments(args);/*  w w  w. j av  a 2 s  .c  o m*/
    return f;
}