Football Fans: Download the 2012 Schedule App from Google Play!


Go Back   Android Forums > Android Development > Application Development > Developer 101

Developer 101 101 Tutorials



Reply
 
LinkBack Thread Tools
Old January 17th, 2012, 06:48 PM   #1 (permalink)
New Member
 
super_nova's Avatar
 
Join Date: Aug 2011
Posts: 2
 
Device(s):
Thanks: 0
Thanked 0 Times in 0 Posts
Default Bundle

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

super_nova is offline  
Reply With Quote
Sponsors
Old January 18th, 2012, 04:46 AM   #2 (permalink)
Premium Member
 
Join Date: Oct 2011
Location: Sydney, Australia
Posts: 193
 
Device(s): Galaxy Nexus GSM
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: 69
 
Device(s): Motorola Defy - Gingerbread(2.3.3)
Thanks: 12
Thanked 5 Times in 4 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

Bookmarks


Go Back   Android Forums > Android Development > Application Development > Developer 101 User CP
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 08:23 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Custom vBulletin Skins by: Relivo