Best code examples for Android Bundle class (android.os.Bundle)

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android Bundle class.
You can now enable Codota on your own code to easily search and navigate your Java codebase.

Android Bundle examples from Open Source projects
This code example shows how to use the following methods: putInt, putString, putStringArrayList
56:	Bundle args = new Bundle(); 
57:	args.putInt("currentState", currentState); 
58:	args.putStringArrayList("feedIds", feedIds); 
59:	args.putString("folderName", folderName); 
60:	feedItemFragment.setArguments(args); 
Full Snippet Info
9
CodeRank
This code example shows how to use the following methods: putCharSequence, putSerializable
74:	Bundle args = new Bundle(); 
75:	args.putCharSequence(ARG_TEXT, raw); 
-
77:	args.putSerializable(ARG_REPO, (Serializable) repo); 
78:	getLoaderManager().restartLoader(0, args, this); 
Full Snippet Info
9
CodeRank
This code example shows how to use the following methods: putInt, putString
54:	Bundle args = new Bundle(); 
55:	args.putInt("currentState", currentState); 
56:	args.putString("feedId", feedId); 
57:	feedItemFragment.setArguments(args); 
Full Snippet Info
9
CodeRank
This code example shows how to use the following methods: getString
45:	androidPrivate = extras.getString("androidPrivate"); 
-
47:	androidArgument = extras.getString("androidArgument") + "/service"; 
48:	pythonHome = extras.getString("pythonHome"); 
49:	pythonPath = extras.getString("pythonPath"); 
50:	pythonServiceArgument = extras.getString("pythonServiceArgument"); 
51:	String serviceTitle = extras.getString("serviceTitle"); 
52:	String serviceDescription = extras.getString("serviceDescription"); 
Full Snippet Info
9
CodeRank
This code example shows how to use the following methods: putInt
96:	Bundle args = new Bundle(); 
97:	args.putInt("num", num); 
98:	f.setArguments(args); 
Full Snippet Info
9
CodeRank
This code example shows how to use the following methods: containsKey, putFloat, remove
113:	bundle.putFloat("foo", 5f); 
114:	bundle.putFloat("foo2", 5f); 
-
116:	bundle.remove("foo"); 
-
118:	assertFalse(bundle.containsKey("foo")); 
119:	assertTrue(bundle.containsKey("foo2")); 
Full Snippet Info
9
CodeRank
This code example shows how to use the following methods: getString
49:	String title = args.getString(ARG_TITLE); 
50:	String message = args.getString(ARG_MESSAGE); 
51:	String confirmText = args.getString(ARG_CONFIRM_TEXT); 
52:	String cancelText = args.getString(ARG_CANCEL_TEXT); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: putInt
105:	Bundle arguments = new Bundle(); 
106:	arguments.putInt("currentState", currentState); 
107:	everythingFragment.setArguments(arguments); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: putInt, putString
80:	Bundle arguments = new Bundle(); 
81:	arguments.putInt(ARG_REQUEST_CODE, requestCode); 
82:	arguments.putString(ARG_TITLE, title); 
83:	arguments.putString(ARG_MESSAGE, message); 
Full Snippet Info
9
CodeRank
This code example shows how to use the following methods: putCharSequence, putInt
32:	Bundle args=new Bundle(); 
-
34:	args.putInt(KEY_POSITION, position); 
35:	args.putCharSequence(KEY_TEXT, text); 
36:	frag.setArguments(args); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: putString
16:	Bundle args = new Bundle(); 
17:	args.putString(ARG_TITLE, title); 
18:	fragment.setArguments(args); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: get
68:	String recipientPhoneNumber = (String) icicle.get("recipient"); 
-
72:	String numMsgStr = (String) icicle.get("messages"); 
-
76:	String msgFileNameStr = (String) icicle.get("messagefile"); 
-
80:	String recpFileNameStr = (String) icicle.get("recipientfile"); 
-
85:	String receiveTimerStr = (String) icicle.get("receivetimer"); 
-
90:	String sendIntervalStr = (String) icicle.get("sendinterval"); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: putBoolean, putDouble, putFloat, putInt, putLong
147:	final Bundle extras2 = new Bundle(); 
148:	extras2.putString("a", "2"); 
149:	extras2.putLong("b", 2); 
150:	extras2.putInt("c", 1); 
151:	extras2.putBoolean("d", true); 
152:	extras2.putDouble("e", 1.2); 
153:	extras2.putFloat("f", 4.5f); 
154:	extras2.putParcelable("g", account1); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: getString
104:	mReportFile = arguments.getString(ARG_REPORT_FILE); 
105:	mReportDir = arguments.getString(ARG_REPORT_DIR); 
-
119:	String value = arguments.getString(name); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: putCharSequence
63:	Bundle b = new Bundle(); 
64:	b.putCharSequence("label", label); 
65:	f.setArguments(b); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: putInt, putParcelable
80:	Bundle state=new Bundle(); 
-
82:	state.putParcelable(SUPERSTATE, super.onSaveInstanceState()); 
83:	state.putInt(COLOR, getColor()); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: putInt
111:	Bundle arguments = new Bundle(); 
112:	arguments.putInt("currentState", currentState); 
113:	everythingFragment.setArguments(arguments); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: getString
47:	b.setTitle(args.getString(BUNDLE_TITLE)); 
48:	b.setMessage(args.getString(BUNDLE_MESSAGE)); 
-
51:	b.setPositiveButton(args.getString(BUNDLE_POSITIVE_BUTTON_TEXT), mPositiveOnClickListener); 
52:	b.setNegativeButton(args.getString(BUNDLE_NEGATIVE_BUTTON_TEXT), mNegativeOnClickListener); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: getByteArray, getInt, getString
210:	return b.getByteArray("out"); 
-
214:	switch (b.getInt("e")) { 
-
216:	throw new EeNfcDisabledException(b.getString("m")); 
-
218:	throw new EeIOException(b.getString("m")); 
-
220:	throw new EeInitializationException(b.getString("m")); 
-
222:	throw new EeExternalFieldException(b.getString("m")); 
-
224:	throw new EeListenModeException(b.getString("m")); 
-
226:	throw new EeAlreadyOpenException(b.getString("m")); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: putInt
117:	if (itemizedOverlay.getFocus() != null) outState.putInt("focused_1", itemizedOverlay.getLastFocusedIndex()); 
118:	if (itemizedOverlay2.getFocus() != null) outState.putInt("focused_2", itemizedOverlay2.getLastFocusedIndex()); 
119:	super.onSaveInstanceState(outState); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: containsKey, putFloat, remove
113:	bundle.putFloat("foo", 5f); 
114:	bundle.putFloat("foo2", 5f); 
-
116:	bundle.remove("foo"); 
-
118:	assertFalse(bundle.containsKey("foo")); 
119:	assertTrue(bundle.containsKey("foo2")); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: get, getString
51:	this.mTestPath = (String) icicle.get("path"); 
52:	String timeout_str = (String) icicle.get("timeout"); 
-
61:	String r = icicle.getString("rebaseline"); 
-
64:	mJsEngine = icicle.getString("jsengine"); 
-
66:	mPageCyclerSuite = icicle.getString("suite"); 
67:	mPageCyclerForwardHost = icicle.getString("forward"); 
68:	mPageCyclerIteration = icicle.getString("iteration", "5"); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: putInt, putString
60:	Bundle temp = new Bundle(); 
61:	temp.putString("title", name); 
-
63:	temp.putInt("texture", textureRes); 
-
65:	temp.putInt("bgcolor", bgColor); 
66:	temp.putInt("text", textColor); 
67:	data.add(temp); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: putInt
96:	Bundle args = new Bundle(); 
97:	args.putInt("num", num); 
98:	f.setArguments(args); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: putBoolean, putInt, putString
270:	super.onSaveInstanceState(outState); 
-
272:	outState.putBoolean(EXTRA_HAS_NEXT, mHasNext); 
-
274:	outState.putInt(EXTRA_HAS_NEXT, mNextPage); 
-
278:	outState.putString(EXTRA_LIST_ITEMS, GsonUtils.toJson(items)); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: putInt
99:	Bundle args = new Bundle(); 
100:	args.putInt("num", num); 
101:	f.setArguments(args); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: get
63:	String valueStr = (String) icicle.get("softap_iterations"); 
-
71:	String scanIterationStr = (String) icicle.get("scan_iterations"); 
-
79:	String ssidStr= (String) icicle.get("reconnect_ssid"); 
-
84:	String passwordStr = (String) icicle.get("reconnect_password"); 
-
89:	String reconnectStr = (String) icicle.get("reconnect_iterations"); 
-
97:	String sleepTimeStr = (String) icicle.get("sleep_time"); 
-
105:	String wifiOnlyFlag = (String) icicle.get("wifi-only"); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: putBooleanArray, putSerializable
122:	arguments.putSerializable(ARG_CHOICES, choices); 
123:	arguments.putBooleanArray(ARG_SELECTED_CHOICES, selectedChoices); 
124:	show(activity, new LabelsDialogFragment(), arguments, TAG); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: putInt
113:	Bundle args = new Bundle(); 
114:	args.putInt("num", num); 
115:	f.setArguments(args); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: putInt
113:	Bundle args = new Bundle(); 
114:	args.putInt("num", num); 
115:	f.setArguments(args); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: putString
86:	outState.putString(EXTRA_WORD, mWordEditText.getText().toString()); 
87:	outState.putString(EXTRA_ORIGINAL_WORD, mOldWord); 
-
89:	outState.putString(EXTRA_SHORTCUT, mShortcutEditText.getText().toString()); 
-
92:	outState.putString(EXTRA_ORIGINAL_SHORTCUT, mOldShortcut); 
-
94:	outState.putString(EXTRA_LOCALE, mLocale); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: putLong, putParcelable
36:	final Bundle args = new Bundle(); 
37:	args.putParcelable(KEY_TEMPLATE, template); 
38:	args.putLong(KEY_START, start); 
39:	args.putLong(KEY_END, end); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: putInt, putString
60:	Bundle temp = new Bundle(); 
61:	temp.putString("title", name); 
62:	temp.putString("font", fontName); 
63:	temp.putInt("style", style); 
64:	data.add(temp); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: putInt, putSerializable
65:	arguments.putSerializable(ARG_CHOICES, choices); 
66:	arguments.putInt(ARG_SELECTED_CHOICE, selectedChoice); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: putAll
63:	arguments.putAll(bundle); 
64:	show(activity, new ConfirmDialogFragment(), arguments, TAG); 
Full Snippet Info
8
CodeRank
Related Android Bundle Questions & Answers:
Other Android Bundle Examples
1:	protected void onCreate(Bundle savedInstanceState) {
2:	  super.onCreate(savedInstanceState);
3:

Read More

6:	  /** Called when the activity is first created. */
7:	  @Override
8:	  public void onCreate(Bundle savedInstanceState) {
9:	    super.onCreate(savedInstanceState);
10:	    setContentView(new ImageViewWithZoom(this));

Read More

7:	public class ScrollViewActivity extends Activity {
8:	    @Override
9:	    public void onCreate(Bundle savedInstanceState) {
10:	        super.onCreate(savedInstanceState);
11:	        setContentView(R.layout.activity_main);

Read More

3:		 */
4:		@Override
5:		protected void onSaveInstanceState(Bundle outState) {
6:			super.onSaveInstanceState(outState);
7:	
-
15:		 */
16:		@Override
17:		protected void onRestoreInstanceState(Bundle savedInstanceState) {
18:			super.onRestoreInstanceState(savedInstanceState);
19:

Read More

7:		 /** Called when the activity is first created. */
8:	    @Override
9:	    public void onCreate(Bundle savedInstanceState) {
10:	        super.onCreate(savedInstanceState);
11:	        setContentView(R.layout.news_feed_layout);

Read More

4:	
5:	public class VideosActivity extends Activity {
6:	    public void onCreate(Bundle savedInstanceState) {
7:	        super.onCreate(savedInstanceState);
8:	        setContentView(R.layout.videos_layout);

Read More

1:	public void onCreate(Bundle savedInstanceState) {
2:	    super.onCreate(savedInstanceState);
3:	    setContentView(R.layout.main_layout);

Read More

1:	public class ExampleActivity extends Activity implements OnClickListener {
2:	    protected void onCreate(Bundle savedValues) {
3:	        ...
4:	        Button button = (Button)findViewById(R.id.corky);

Read More

6:	};
7:	
8:	protected void onCreate(Bundle savedValues) {
9:	    ...
10:	    // Capture our button from layout

Read More

See Code Examples for Android Bundle Methods: