Bundle putString - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Bundle putString method.

This code example shows how to use the following methods:putString
    /* package */ void updateLocale(final String locale) {
        mLocale = null == locale ? Locale.getDefault().toString() : locale;
    } 
 
    /* package */ void saveStateIntoBundle(final Bundle outState) {
        outState.putString(EXTRA_WORD, mWordEditText.getText().toString());
        outState.putString(EXTRA_ORIGINAL_WORD, mOldWord);
        if (null != mShortcutEditText) {
            outState.putString(EXTRA_SHORTCUT, mShortcutEditText.getText().toString());
        } 
        if (null != mOldShortcut) {
            outState.putString(EXTRA_ORIGINAL_SHORTCUT, mOldShortcut);
        } 
        outState.putString(EXTRA_LOCALE, mLocale);
    } 
 
    /* package */ void delete(final Context context) {
        if (MODE_EDIT == mMode && !TextUtils.isEmpty(mOldWord)) {
            // Mode edit: remove the old entry. 
            final ContentResolver resolver = context.getContentResolver();
8
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:putString
	} 
	 
	//----------------------------------------------------------------//	 
	public static void sendRequest ( String message ) {
 
		Bundle parameters = new Bundle ();
		 
		if ( message != null )	parameters.putString ( "message", message );
		 
		sFacebook.dialog ( sActivity, "apprequests", parameters, new DialogListener () {
			 
	        @Override 
	        public void onComplete ( Bundle values ) {
		 
				if ( values.containsKey ( "request" )) {
					 
					AKUNotifyFacebookDialogComplete ( DialogResultCode.RESULT_SUCCESS.ordinal() );
				} else { 
				 
					AKUNotifyFacebookDialogComplete ( DialogResultCode.RESULT_CANCEL.ordinal() );

8
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:putString
     * @return              New dialog instance, ready to show. 
     */ 
    public static SamlWebViewDialog newInstance(String url, String targetUrl) {
        Log_OC.d(TAG, "New instance");
        SamlWebViewDialog fragment = new SamlWebViewDialog();
        Bundle args = new Bundle();
        args.putString(ARG_INITIAL_URL, url);
        args.putString(ARG_TARGET_URL, targetUrl);
        fragment.setArguments(args);
        return fragment;
    } 
     
     
    public SamlWebViewDialog() { 
        super(); 
        Log_OC.d(TAG, "constructor");
    } 
     
     
    @Override 
7
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:putInt, putString
    private static void addEditorInfoToBundle(EditorInfo info, Bundle bundle) {
        if (info == null) {
            return; 
        } 
 
        bundle.putString(LABEL, safeToString(info.label));
        bundle.putString(HINT, safeToString(info.hintText));
        bundle.putString(PACKAGE_NAME, safeToString(info.packageName));
        bundle.putInt(FIELD_ID, info.fieldId);
        bundle.putString(FIELD_NAME, safeToString(info.fieldName));
        bundle.putInt(INPUT_TYPE, info.inputType);
        bundle.putInt(IME_OPTIONS, info.imeOptions);
    } 
 
    @SuppressWarnings("static-access") 
    private static void addInputConnectionToBundle( 
        InputConnection conn, Bundle bundle) {
        if (conn == null) {
            return; 
        } 
8
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:putString
    private OnClickListener mOnGetSessionKey = new OnClickListener() {
		public void onClick(View v) { 
	        AccountManager am = AccountManager.get(AuthTestActivity.this); 
	        Account[] accounts = am.getAccountsByType("fm.last.android.account"); 
	        if(accounts.length > 0) { 
	        	Bundle options = new Bundle(); 
	        	//This is a test key. Register your own at http://www.last.fm/api 
	        	options.putString("api_key", "8a733e4c0a9f0df84cc745446b6b2f10"); 
	        	options.putString("api_secret", "750d8398452da9ac008ade1015404f96"); 
	        	am.getAuthToken(accounts[0], "", options, AuthTestActivity.this, new AccountManagerCallback<Bundle>() { 
					public void run(AccountManagerFuture<Bundle> arg0) { 
						try { 
							String key = arg0.getResult().getString(AccountManager.KEY_AUTHTOKEN); 
							mSessionKey.setText("Session key: " + key); 
						} catch (Exception e) { 
							e.printStackTrace(); 
						} 
					} 
	        	}, null); 
	        } 
7
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:putInt, putString, putStringArrayList
 
 
	public static FolderItemListFragment newInstance(ArrayList<String> feedIds, String folderName, int currentState) {
		FolderItemListFragment feedItemFragment = new FolderItemListFragment();
 
		Bundle args = new Bundle();
		args.putInt("currentState", currentState);
		args.putStringArrayList("feedIds", feedIds);
		args.putString("folderName", folderName);
		feedItemFragment.setArguments(args);
 
		return feedItemFragment;
	} 
 
	@Override 
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		currentState = getArguments().getInt("currentState");
		folderName = getArguments().getString("folderName");
		ArrayList<String> feedIdArrayList = getArguments().getStringArrayList("feedIds");
9
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:putInt, putString
     * @param requestCode 
     * @return bundle 
     */ 
    protected static Bundle createArguments(final String title,
            final String message, final int requestCode) {
        Bundle arguments = new Bundle();
        arguments.putInt(ARG_REQUEST_CODE, requestCode);
        arguments.putString(ARG_TITLE, title);
        arguments.putString(ARG_MESSAGE, message);
        return arguments;
    } 
 
    /** 
     * Call back to the activity with the dialog result 
     * 
     * @param resultCode 
     */ 
    protected void onResult(final int resultCode) {
        final DialogFragmentActivity activity = (DialogFragmentActivity) getActivity();
        if (activity != null) {
9
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:putString
    private static final String ARG_TITLE = "title";
 
    public static ProgressDialogFragment newInstance(String title) {
        ProgressDialogFragment fragment = new ProgressDialogFragment();
 
        Bundle args = new Bundle();
        args.putString(ARG_TITLE, title);
        fragment.setArguments(args);
 
        return fragment;
    } 
 
 
    @Override 
    public Dialog onCreateDialog(Bundle savedInstanceState) {
        Bundle args = getArguments();
        String title = args.getString(ARG_TITLE);
 
        ProgressDialog dialog = new ProgressDialog(getActivity());
        dialog.setIndeterminate(true);
8
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:putInt, putString
     * Creates new instance of this delete file dialog fragment 
     */ 
    public static ActivityNotFoundDialogFragment newInstance(int title, int message,
            String appGooglePlayUri, String appFDroidQuery) {
        ActivityNotFoundDialogFragment frag = new ActivityNotFoundDialogFragment();
        Bundle args = new Bundle();
 
        args.putInt(ARG_TITLE, title);
        args.putInt(ARG_MESSAGE, message);
        args.putString(ARG_APP_GOOGLE_PLAY_URI, appGooglePlayUri);
        args.putString(ARG_APP_FDROID_QUERY, appFDroidQuery);
 
        frag.setArguments(args);
 
        return frag;
    } 
 
    /** 
     * Creates dialog 
     */ 
8
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:putString

Related Bundle putString Questions & Answers:

putString Method Overview
Inserts a String value into the mapping of this Bundle, replacing any existing value for the given key.
See Code Examples for other Android Bundle Methods: