Example usage for android.os Bundle Bundle

List of usage examples for android.os Bundle Bundle

Introduction

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

Prototype

public Bundle() 

Source Link

Document

Constructs a new, empty Bundle.

Usage

From source file:com.wareninja.opensource.gravatar4android.GravatarTask.java

@Override
protected void onPreExecute() {
    super.onPreExecute();

    resultParams = new Bundle();
    gravatarResponseData = new GravatarResponseData();
}

From source file:com.paramedic.mobshaman.fragments.AccionesDetalleServicioFragment.java

/**
 * Static factory method/* www . j  a  v  a  2s.c o m*/
 *
 * @param sectionNumber
 * @return
 */
public static AccionesDetalleServicioFragment newInstance(int sectionNumber) {
    AccionesDetalleServicioFragment fragment = new AccionesDetalleServicioFragment();
    Bundle args = new Bundle();
    args.putInt(ARG_SECTION_NUMBER, sectionNumber);
    fragment.setArguments(args);
    return fragment;

}

From source file:edu.mit.mobile.android.locast.accounts.Authenticator.java

/**
 * {@inheritDoc}//w w  w .j  a va2  s .co  m
 */
@Override
public Bundle addAccount(AccountAuthenticatorResponse response, String accountType, String authTokenType,
        String[] requiredFeatures, Bundle options) {
    final Intent intent = new Intent(mContext, AuthenticatorActivity.class);
    intent.putExtra(AuthenticatorActivity.EXTRA_AUTHTOKEN_TYPE, authTokenType);
    intent.putExtra(AccountManager.KEY_ACCOUNT_AUTHENTICATOR_RESPONSE, response);
    final Bundle bundle = new Bundle();
    bundle.putParcelable(AccountManager.KEY_INTENT, intent);
    return bundle;
}

From source file:com.adithya321.sharesanalysis.fragments.DetailFragment.java

public DetailFragment newInstance(String shareName) {
    DetailFragment fragment = new DetailFragment();
    Bundle args = new Bundle();
    args.putString(ARG_SHARE_NAME, shareName);
    fragment.setArguments(args);/*from w w  w . j  a  va 2s. co m*/
    return fragment;
}

From source file:com.versobit.kmark.clarity.DbProcessorFragment.java

public static DbProcessorFragment newInstance(String reportsTo, boolean dryRun, boolean backups,
        boolean reboot) {
    DbProcessorFragment frag = new DbProcessorFragment();
    Bundle args = new Bundle();
    args.putString(ARG_REPORTS_TO, reportsTo);
    args.putBoolean(ARG_DRY_RUN, dryRun);
    args.putBoolean(ARG_RETAIN_BACKUPS, backups);
    args.putBoolean(ARG_SOFT_REBOOT, reboot);
    frag.setArguments(args);/*from   www.  jav a2s  .  co  m*/
    return frag;
}

From source file:com.ritul.truckshare.Fragments.UpdateProfile.java

public static UpdateProfile newInstance(String text) {
    UpdateProfile updateProfile = new UpdateProfile();
    Bundle bundle = new Bundle();
    bundle.putString("TabName", text);
    updateProfile.setArguments(bundle);// w w  w  . ja v a2 s  . c o m
    return updateProfile;
}

From source file:com.rubika.aotalk.aou.FragmentGuides.java

public static FragmentGuides newInstance(AOU a, String search) {
    FragmentGuides f = new FragmentGuides();

    Bundle args = new Bundle();
    args.putString("search", search);
    f.setArguments(args);//from w ww .j  a  va  2 s  . c  o  m

    aou = a;
    return f;
}

From source file:com.cloudbees.gasp.fragment.TwitterResponderFragment.java

private void setTweets() {
    TwitterStreamActivity activity = (TwitterStreamActivity) getActivity();

    try {//from   w ww  .  j  a  v  a 2s .com
        // Get Twitter search keyword from Shared Preferences
        SharedPreferences gaspSharedPreferences = PreferenceManager.getDefaultSharedPreferences(getActivity());
        String keyword = gaspSharedPreferences.getString(getString(R.string.gasp_twitter_preferences), "");

        if (mTweets == null && activity != null) {
            Intent intent = new Intent(activity, RESTIntentService.class);
            intent.setData(Uri.parse(TwitterAPI.getTwitterApiSearch()));

            Bundle params = new Bundle();
            params.putString("q", keyword);
            params.putString("count", "10");

            Bundle headers = new Bundle();
            headers.putString("Authorization", "Bearer " + TwitterStreamActivity.getTwitterOAuthToken());

            intent.putExtra(RESTIntentService.EXTRA_PARAMS, params);
            intent.putExtra(RESTIntentService.EXTRA_HEADERS, headers);
            intent.putExtra(RESTIntentService.EXTRA_RESULT_RECEIVER, getResultReceiver());

            activity.startService(intent);
        } else if (activity != null) {
            ArrayAdapter<String> adapter = activity.getArrayAdapter();

            adapter.clear();
            for (String tweet : mTweets) {
                adapter.add(tweet);
            }
        }
    } catch (Exception e) {
        e.printStackTrace();
    }
}

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

/**
 * Recreates a Key based on a existing Password
 * // w w  w  . java2  s. c  o m
 * @param userName
 * @param pwdSalt
 * @param authtoken
 * @return invisible Dialog
 */
public static CreatePwdProgressDialog newInstance(String userName, String pwd, byte[] currPwdSalt,
        byte[] pwdCheck) {
    CreatePwdProgressDialog dlg = new CreatePwdProgressDialog();

    Bundle args = new Bundle();
    args.putString(KeyPasswordActivity.PARAM_USERNAME, userName);
    args.putString(PARAM_PWD, pwd);
    args.putByteArray(KeyPasswordActivity.PARAM_SALT, currPwdSalt);
    args.putByteArray(KeyPasswordActivity.PARAM_CHECK, pwdCheck);
    if (pwd == null) {
        throw new IllegalArgumentException("pwd is null");
    }

    dlg.setArguments(args);
    return dlg;
}