public final class KeyboardShortcutGroup extends Object implements Parcelable
KeyboardShortcutInfo
.Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<KeyboardShortcutGroup> |
CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_ELIDE_DUPLICATES, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description |
---|
KeyboardShortcutGroup(CharSequence label) |
KeyboardShortcutGroup(CharSequence label,
boolean isSystemGroup) |
KeyboardShortcutGroup(CharSequence label,
List<KeyboardShortcutInfo> items) |
KeyboardShortcutGroup(CharSequence label,
List<KeyboardShortcutInfo> items,
boolean isSystemGroup) |
Modifier and Type | Method and Description |
---|---|
void |
addItem(KeyboardShortcutInfo item)
Adds an item to the existing list.
|
int |
describeContents()
Describe the kinds of special objects contained in this Parcelable
instance's marshaled representation.
|
List<KeyboardShortcutInfo> |
getItems()
Returns the list of items included in this group.
|
CharSequence |
getLabel()
Returns the label to be used to describe this group.
|
boolean |
isSystemGroup() |
void |
writeToParcel(Parcel dest,
int flags)
Flatten this object in to a Parcel.
|
public static final Parcelable.Creator<KeyboardShortcutGroup> CREATOR
public KeyboardShortcutGroup(CharSequence label, List<KeyboardShortcutInfo> items)
label
- The title to be used for this group, or null if there is none.items
- The set of items to be included.public KeyboardShortcutGroup(CharSequence label)
label
- The title to be used for this group, or null if there is none.public KeyboardShortcutGroup(CharSequence label, List<KeyboardShortcutInfo> items, boolean isSystemGroup)
label
- The title to be used for this group, or null if there is none.items
- The set of items to be included.isSystemGroup
- Set this to true
if this is s system group.public KeyboardShortcutGroup(CharSequence label, boolean isSystemGroup)
label
- The title to be used for this group, or null if there is none.isSystemGroup
- Set this to true
if this is s system group.public CharSequence getLabel()
public List<KeyboardShortcutInfo> getItems()
public boolean isSystemGroup()
public void addItem(KeyboardShortcutInfo item)
item
- The item to be added.public int describeContents()
Parcelable
Parcelable.writeToParcel(Parcel, int)
,
the return value of this method must include the
Parcelable.CONTENTS_FILE_DESCRIPTOR
bit.describeContents
in interface Parcelable
Parcelable.CONTENTS_FILE_DESCRIPTOR
public void writeToParcel(Parcel dest, int flags)
Parcelable
writeToParcel
in interface Parcelable
dest
- The Parcel in which the object should be written.flags
- Additional flags about how the object should be written.
May be 0 or Parcelable.PARCELABLE_WRITE_RETURN_VALUE
.