Go Back   Android Forums > Android Development > Application Development
Application Development Dev lounge for our application developers.

test: Reply
 
LinkBack Thread Tools
Old January 17th, 2012, 06:48 PM   #1 (permalink)
New Member
Thread Author (OP)
 
super_nova's Avatar
 
Join Date: Aug 2011
Posts: 2
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default Bundle

Do anybody know what is Bundle class and why used in android program ?

Advertisements
super_nova is offline  
Reply With Quote
sponsored links
Old January 18th, 2012, 04:46 AM   #2 (permalink)
Member
 
Join Date: Oct 2011
Location: Sydney, Australia
Posts: 191
 
Device(s): Galaxy Nexus GSM
Carrier: Not Provided

Thanks: 2
Thanked 37 Times in 33 Posts
Default

You can think of bundles as persistable dictionaries.

The primary use of a bundle is to save the state of an activity in onSaveInstanceState(Bundle) so you can restore the activity again in onCreate(Bundle).

The secondary use of a bundle (when put inside a message) is in asynchronous and/or inter-process communication.
jiminaus is offline  
Reply With Quote
Old January 21st, 2012, 05:31 AM   #3 (permalink)
Junior Member
 
jonathanrz's Avatar
 
Join Date: Jan 2012
Location: Brazil - Blumenau, SC
Posts: 75
 
Device(s): Motorola Defy - Gingerbread(2.3.5)
Carrier: Not Provided

Thanks: 14
Thanked 6 Times in 5 Posts
Send a message via MSN to jonathanrz jonathanrafaelz
Default

A Bundle is a HashTable or Map, if you know the terms from other languagens.

Is basically a array, where you define something to be the index (could be a string) and something to be the data.

If you set two datas on the same index, the second will overwrite the first.

Do the notepad tutorial( Notepad Tutorial | Android Developers ), there you will learn how to work with bundles.
jonathanrz is offline  
Reply With Quote
Reply


Go Back   Android Forums > Android Development > Application Development
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 11:32 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.