Example usage for Java android.os Bundle fields, constructors, methods, implement or subclass
The text is from its open source code.
Bundle() Constructs a new, empty Bundle. | |
Bundle(Parcel parcelledData) Constructs a Bundle whose data is stored as a Parcel. | |
Bundle(ClassLoader loader) Constructs a new, empty Bundle that uses a specific ClassLoader for instantiating Parcelable and Serializable objects. | |
Bundle(int capacity) Constructs a new, empty Bundle sized to hold the given number of elements. | |
Bundle(Bundle b) Constructs a Bundle containing a copy of the mappings from the given Bundle. | |
Bundle(PersistableBundle b) Constructs a Bundle containing a copy of the mappings from the given PersistableBundle. | |
Bundle(boolean doInit) Constructs a Bundle without initializing it. |
void | clear() Removes all elements from the mapping of this Bundle. |
Object | clone() Clones the current Bundle. |
boolean | containsKey(String key) Returns true if the given key is contained in the mapping of this Bundle. |
Bundle | deepCopy() Make a deep copy of the given bundle. |
boolean | equals(Object obj) Indicates whether some other object is "equal to" this one. |
Object | get(String key) Returns the entry with the given key as an object. |
IBinder | getBinder(@Nullable String key) 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. |
boolean | getBoolean(String key) Returns the value associated with the given key, or false if no mapping of the desired type exists for the given key. |
boolean | getBoolean(String key, boolean defaultValue) Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key. |
boolean[] | getBooleanArray(@Nullable String key) 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. |
Bundle | getBundle(@Nullable String key) 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. |
Byte | getByte(String key, byte defaultValue) Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key. |
byte | getByte(String key) Returns the value associated with the given key, or (byte) 0 if no mapping of the desired type exists for the given key. |
byte[] | getByteArray(@Nullable String key) 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. |
char | getChar(String key, char defaultValue) Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key. |
char | getChar(String key) Returns the value associated with the given key, or (char) 0 if no mapping of the desired type exists for the given key. |
char[] | getCharArray(@Nullable String key) 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. |
CharSequence | getCharSequence(@Nullable String key) 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. |
CharSequence | getCharSequence(@Nullable String key, CharSequence defaultValue) 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. |
CharSequence[] | getCharSequenceArray(@Nullable String key) 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. |
double | getDouble(String key, double defaultValue) Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key. |
double | getDouble(String key) Returns the value associated with the given key, or 0.0 if no mapping of the desired type exists for the given key. |
double[] | getDoubleArray(@Nullable String key) 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. |
float | getFloat(String key, float defaultValue) Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key. |
float | getFloat(String key) Returns the value associated with the given key, or 0.0f if no mapping of the desired type exists for the given key. |
float[] | getFloatArray(@Nullable String key) 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. |
int | getInt(String key, int defaultValue) Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key. |
int | getInt(String key) Returns the value associated with the given key, or 0 if no mapping of the desired type exists for the given key. |
int[] | getIntArray(@Nullable String key) 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. |
ArrayList | getIntegerArrayList(@Nullable String key) 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. |
long | getLong(String key) Returns the value associated with the given key, or 0L if no mapping of the desired type exists for the given key. |
long | getLong(String key, long defaultValue) Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key. |
long[] | getLongArray(@Nullable String key) 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. |
T | getParcelable(@Nullable String key) 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. |
Parcelable[] | getParcelableArray(@Nullable String key) 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. |
ArrayList | getParcelableArrayList(@Nullable String key) 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. |
Serializable | getSerializable(@Nullable String key) 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. |
short | getShort(String key) Returns the value associated with the given key, or (short) 0 if no mapping of the desired type exists for the given key. |
short | getShort(String key, short defaultValue) Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key. |
short[] | getShortArray(@Nullable String key) 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. |
SparseArray | getSparseParcelableArray(@Nullable String key) 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. |
String | getString(@Nullable String key) 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. |
String | getString(@Nullable String key, String defaultValue) 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 associated with the given key. |
String[] | getStringArray(@Nullable String key) 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. |
ArrayList | getStringArrayList(@Nullable String key) 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. |
int | hashCode() Returns a hash code value for the object. |
boolean | isEmpty() Returns true if the mapping of this Bundle is empty, false otherwise. |
Set | keySet() Returns a Set containing the Strings used as keys in this Bundle. |
void | putAll(Bundle bundle) Inserts all mappings from the given Bundle into this Bundle. |
void | putBinder(@Nullable String key, @Nullable IBinder value) Inserts an IBinder value into the mapping of this Bundle, replacing any existing value for the given key. |
void | putBoolean(@Nullable String key, boolean value) Inserts a Boolean value into the mapping of this Bundle, replacing any existing value for the given key. |
void | putBooleanArray(@Nullable String key, @Nullable boolean[] value) Inserts a boolean array value into the mapping of this Bundle, replacing any existing value for the given key. |
void | putBundle(@Nullable String key, @Nullable Bundle value) Inserts a Bundle value into the mapping of this Bundle, replacing any existing value for the given key. |
void | putByte(@Nullable String key, byte value) Inserts a byte value into the mapping of this Bundle, replacing any existing value for the given key. |
void | putByteArray(@Nullable String key, @Nullable byte[] value) Inserts a byte array value into the mapping of this Bundle, replacing any existing value for the given key. |
void | putChar(@Nullable String key, char value) Inserts a char value into the mapping of this Bundle, replacing any existing value for the given key. |
void | putCharArray(@Nullable String key, @Nullable char[] value) Inserts a char array value into the mapping of this Bundle, replacing any existing value for the given key. |
void | putCharSequence(@Nullable String key, @Nullable CharSequence value) Inserts a CharSequence value into the mapping of this Bundle, replacing any existing value for the given key. |
void | putCharSequenceArray(@Nullable String key, @Nullable CharSequence[] value) Inserts a CharSequence array value into the mapping of this Bundle, replacing any existing value for the given key. |
void | putCharSequenceArrayList(@Nullable String key, @Nullable ArrayList Inserts an ArrayList |
void | putDouble(@Nullable String key, double value) Inserts a double value into the mapping of this Bundle, replacing any existing value for the given key. |
void | putDoubleArray(@Nullable String key, @Nullable double[] value) Inserts a double array value into the mapping of this Bundle, replacing any existing value for the given key. |
void | putFloat(@Nullable String key, float value) Inserts a float value into the mapping of this Bundle, replacing any existing value for the given key. |
void | putFloatArray(@Nullable String key, @Nullable float[] value) Inserts a float array value into the mapping of this Bundle, replacing any existing value for the given key. |
void | putInt(@Nullable String key, int value) Inserts an int value into the mapping of this Bundle, replacing any existing value for the given key. |
void | putIntArray(@Nullable String key, @Nullable int[] value) Inserts an int array value into the mapping of this Bundle, replacing any existing value for the given key. |
void | putIntegerArrayList(@Nullable String key, @Nullable ArrayList Inserts an ArrayList |
void | putLong(@Nullable String key, long value) Inserts a long value into the mapping of this Bundle, replacing any existing value for the given key. |
void | putLongArray(@Nullable String key, @Nullable long[] value) Inserts a long array value into the mapping of this Bundle, replacing any existing value for the given key. |
void | putParcelable(@Nullable String key, @Nullable Parcelable value) Inserts a Parcelable value into the mapping of this Bundle, replacing any existing value for the given key. |
void | putParcelableArray(@Nullable String key, @Nullable Parcelable[] value) Inserts an array of Parcelable values into the mapping of this Bundle, replacing any existing value for the given key. |
void | putParcelableArrayList(@Nullable String key, @Nullable ArrayList extends Parcelable> value) Inserts a List of Parcelable values into the mapping of this Bundle, replacing any existing value for the given key. |
void | putSerializable(@Nullable String key, @Nullable Serializable value) Inserts a Serializable value into the mapping of this Bundle, replacing any existing value for the given key. |
void | putShort(@Nullable String key, short value) Inserts a short value into the mapping of this Bundle, replacing any existing value for the given key. |
void | putShortArray(@Nullable String key, @Nullable short[] value) Inserts a short array value into the mapping of this Bundle, replacing any existing value for the given key. |
void | putSparseParcelableArray(@Nullable String key, @Nullable SparseArray extends Parcelable> value) Inserts a SparceArray of Parcelable values into the mapping of this Bundle, replacing any existing value for the given key. |
void | putString(@Nullable String key, @Nullable String value) Inserts a String value into the mapping of this Bundle, replacing any existing value for the given key. |
void | putStringArray(@Nullable String key, @Nullable String[] value) Inserts a String array value into the mapping of this Bundle, replacing any existing value for the given key. |
void | putStringArrayList(@Nullable String key, @Nullable ArrayList Inserts an ArrayList |
void | readFromParcel(Parcel parcel) Reads the Parcel contents into this Bundle, typically in order for it to be passed through an IBinder connection. |
void | remove(String key) Removes any entry with the given key from the mapping of this Bundle. |
void | setClassLoader(ClassLoader loader) Changes the ClassLoader this Bundle uses when instantiating objects. |
int | size() Returns the number of mappings contained in this Bundle. |
String | toString() |
void | writeToParcel(Parcel parcel, int flags) Writes the Bundle contents to a Parcel, typically in order for it to be passed through an IBinder connection. |