Android Guides | Samples

Android.OS.Bundle Class

A mapping from String values to various Parcelable types.

See Also: Bundle

Syntax

[Android.Runtime.Register("android/os/Bundle", DoNotGenerateAcw=true)]
public sealed class Bundle : BaseBundle, IParcelable, ICloneable, IDisposable

Remarks

A mapping from String values to various Parcelable types.

[Android Documentation]

Requirements

Namespace: Android.OS
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1

The members of Android.OS.Bundle are listed below.

See Also: BaseBundle

Public Constructors

Constructs a new, empty Bundle.
Constructs a Bundle containing a copy of the mappings from the given Bundle.
Constructs a Bundle containing a copy of the mappings from the given PersistableBundle.
Constructs a new, empty Bundle that uses a specific ClassLoader for instantiating Parcelable and Serializable objects.
Constructs a new, empty Bundle sized to hold the given number of elements.

Public Properties

ClassLoaderClassLoader. Return the ClassLoader currently associated with this Bundle.
[read-only]
static
CreatorIParcelableCreator.
[read-only]
static
EmptyBundle.
[read-only]
HasFileDescriptorsBoolean. Reports whether the bundle contains any parcelled file descriptors.
[read-only]
override
IsEmptyBoolean. Returns true if the mapping of this Bundle is empty, false otherwise.

Protected Properties

[read-only]
override
ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
ThresholdTypeType. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Public Methods

override
Clear()
Removes all elements from the mapping of this Bundle.
Clone() : Object
Clones the current Bundle.
override
ContainsKey(String) : Boolean
Returns true if the given key is contained in the mapping of this Bundle.
DescribeContents() : Int32
Report the nature of this Parcelable's contents
override
Get(String) : Object
Returns the entry with the given key as an object.
GetBinder(String) : IBinder
Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.
GetBoolean(String) : Boolean
Returns the value associated with the given key, or false if no mapping of the desired type exists for the given key.
GetBoolean(String, Boolean) : Boolean
Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.
GetBooleanArray(String) : Boolean[]
Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.
GetBundle(String) : Bundle
Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.
GetByte(String) : SByte
Returns the value associated with the given key, or (byte) 0 if no mapping of the desired type exists for the given key.
GetByte(String, SByte) : Byte
Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.
GetByteArray(String) : Byte[]
Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.
GetChar(String) : Char
Returns the value associated with the given key, or (char) 0 if no mapping of the desired type exists for the given key.
GetChar(String, Char) : Char
Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.
GetCharArray(String) : Char[]
Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.
GetCharSequence(String) : String
GetCharSequence(String, String) : String
GetCharSequenceArray(String) : String[]
GetCharSequenceArrayFormatted(String) : ICharSequence[]
Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.
GetCharSequenceArrayList(String) : IList<Java.Lang.ICharSequence>
Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.
GetCharSequenceFormatted(String) : ICharSequence
Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.
GetCharSequenceFormatted(String, ICharSequence) : ICharSequence
Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key or if a null value is explicitly associatd with the given key.
override
GetDouble(String) : Double
Returns the value associated with the given key, or 0.0 if no mapping of the desired type exists for the given key.
override
GetDouble(String, Double) : Double
Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.
override
GetDoubleArray(String) : Double[]
Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.
GetFloat(String) : Single
Returns the value associated with the given key, or 0.0f if no mapping of the desired type exists for the given key.
GetFloat(String, Single) : Single
Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.
GetFloatArray(String) : Single[]
Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.
override
GetInt(String) : Int32
Returns the value associated with the given key, or 0 if no mapping of the desired type exists for the given key.
override
GetInt(String, Int32) : Int32
Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.
override
GetIntArray(String) : Int32[]
Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.
GetIntegerArrayList(String) : IList<Java.Lang.Integer>
Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.
override
GetLong(String) : Int64
Returns the value associated with the given key, or 0L if no mapping of the desired type exists for the given key.
override
GetLong(String, Int64) : Int64
Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.
override
GetLongArray(String) : Int64[]
Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.
GetParcelable(String) : Object
Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.
GetParcelableArray(String) : IParcelable[]
Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.
GetParcelableArrayList(String) : IList
Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.
GetSerializable(String) : ISerializable
Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.
GetShort(String) : Int16
Returns the value associated with the given key, or (short) 0 if no mapping of the desired type exists for the given key.
GetShort(String, Int16) : Int16
Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.
GetShortArray(String) : Int16[]
Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.
GetSize(String) : Size
Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.
GetSizeF(String) : SizeF
Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.
GetSparseParcelableArray(String) : SparseArray
Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.
override
GetString(String) : String
Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.
override
GetString(String, String) : String
Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.
override
GetStringArray(String) : String[]
Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.
GetStringArrayList(String) : IList<string>
Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.
override
KeySet() : ICollection<string>
Returns a Set containing the Strings used as keys in this Bundle.
PutAll(Bundle)
Inserts all mappings from the given Bundle into this Bundle.
PutBinder(String, IBinder)
Inserts an BinderConsts value into the mapping of this Bundle, replacing any existing value for the given key.
PutBoolean(String, Boolean)
Inserts a Boolean value into the mapping of this Bundle, replacing any existing value for the given key.
PutBooleanArray(String, Boolean[])
Inserts a boolean array value into the mapping of this Bundle, replacing any existing value for the given key.
PutBundle(String, Bundle)
Inserts a Bundle value into the mapping of this Bundle, replacing any existing value for the given key.
PutByte(String, SByte)
Inserts a byte value into the mapping of this Bundle, replacing any existing value for the given key.
PutByteArray(String, Byte[])
Inserts a byte array value into the mapping of this Bundle, replacing any existing value for the given key.
PutChar(String, Char)
Inserts a char value into the mapping of this Bundle, replacing any existing value for the given key.
PutCharArray(String, Char[])
Inserts a char array value into the mapping of this Bundle, replacing any existing value for the given key.
PutCharSequence(String, ICharSequence)
Inserts a CharSequence value into the mapping of this Bundle, replacing any existing value for the given key.
PutCharSequence(String, String)
PutCharSequenceArray(String, ICharSequence[])
Inserts a CharSequence array value into the mapping of this Bundle, replacing any existing value for the given key.
PutCharSequenceArray(String, String[])
PutCharSequenceArrayList(String, IList<Java.Lang.ICharSequence>)
override
PutDouble(String, Double)
Inserts a double value into the mapping of this Bundle, replacing any existing value for the given key.
override
PutDoubleArray(String, Double[])
Inserts a double array value into the mapping of this Bundle, replacing any existing value for the given key.
PutFloat(String, Single)
Inserts a float value into the mapping of this Bundle, replacing any existing value for the given key.
PutFloatArray(String, Single[])
Inserts a float array value into the mapping of this Bundle, replacing any existing value for the given key.
override
PutInt(String, Int32)
Inserts an int value into the mapping of this Bundle, replacing any existing value for the given key.
override
PutIntArray(String, Int32[])
Inserts an int array value into the mapping of this Bundle, replacing any existing value for the given key.
PutIntegerArrayList(String, IList<Java.Lang.Integer>)
override
PutLong(String, Int64)
Inserts a long value into the mapping of this Bundle, replacing any existing value for the given key.
override
PutLongArray(String, Int64[])
Inserts a long array value into the mapping of this Bundle, replacing any existing value for the given key.
PutParcelable(String, IParcelable)
Inserts a Parcelable value into the mapping of this Bundle, replacing any existing value for the given key.
PutParcelableArray(String, IParcelable[])
Inserts an array of Parcelable values into the mapping of this Bundle, replacing any existing value for the given key.
PutParcelableArrayList(String, IList<IParcelable>)
PutSerializable(String, ISerializable)
Inserts a Serializable value into the mapping of this Bundle, replacing any existing value for the given key.
PutShort(String, Int16)
Inserts a short value into the mapping of this Bundle, replacing any existing value for the given key.
PutShortArray(String, Int16[])
Inserts a short array value into the mapping of this Bundle, replacing any existing value for the given key.
PutSize(String, Size)
Inserts a Size value into the mapping of this Bundle, replacing any existing value for the given key.
PutSizeF(String, SizeF)
Inserts a SizeF value into the mapping of this Bundle, replacing any existing value for the given key.
PutSparseParcelableArray(String, SparseArray)
override
PutString(String, String)
Inserts a String value into the mapping of this Bundle, replacing any existing value for the given key.
override
PutStringArray(String, String[])
Inserts a String array value into the mapping of this Bundle, replacing any existing value for the given key.
PutStringArrayList(String, IList<string>)
ReadFromParcel(Parcel)
Reads the Parcel contents into this Bundle, typically in order for it to be passed through an IBinder connection.
override
Remove(String)
Removes any entry with the given key from the mapping of this Bundle.
SetClassLoader(ClassLoader)
Changes the ClassLoader this Bundle uses when instantiating objects.
override
Size() : Int32
Returns the number of mappings contained in this Bundle.
WriteToParcel(Parcel, ParcelableWriteFlags)
Writes the Bundle contents to a Parcel, typically in order for it to be passed through an IBinder connection.