KeyboardShortcutInfo | API reference | Android Developers
public
final
class
KeyboardShortcutInfo
extends Object
implements
Parcelable
Information about a Keyboard Shortcut.
Summary
Inherited constants | ||||
|---|---|---|---|---|
|
From interface
|
Fields | |
|---|---|
public
static
final
Creator<KeyboardShortcutInfo> |
CREATOR
|
Public constructors | |
|---|---|
KeyboardShortcutInfo(CharSequence label, char baseCharacter, int modifiers)
|
|
KeyboardShortcutInfo(CharSequence label, int keycode, int modifiers)
|
|
Public methods | |
|---|---|
int
|
describeContents()
Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. |
char
|
getBaseCharacter()
Returns the base character that, combined with the modifiers, triggers this shortcut. |
int
|
getKeycode()
Returns the base keycode that, combined with the modifiers, triggers this shortcut. |
CharSequence
|
getLabel()
Returns the label to be used to describe this shortcut. |
int
|
getModifiers()
Returns the set of modifiers that, combined with the key, trigger this shortcut. |
void
|
writeToParcel(Parcel dest, int flags)
Flatten this object in to a Parcel. |
Inherited methods | |||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
From class
| |||||||||||||||||||||||
|
From interface
| |||||||||||||||||||||||
Fields
Public constructors
Public methods
describeContents
public int describeContents ()
Describe the kinds of special objects contained in this Parcelable
instance's marshaled representation. For example, if the object will
include a file descriptor in the output of writeToParcel(Parcel,int),
the return value of this method must include the
CONTENTS_FILE_DESCRIPTOR bit.
| Returns | |
|---|---|
int |
a bitmask indicating the set of special object types marshaled
by this Parcelable object instance.
Value is either 0 or
|
getBaseCharacter
public char getBaseCharacter ()
Returns the base character that, combined with the modifiers, triggers this shortcut. If the
keycode was set instead, returns Character.MIN_VALUE.
| Returns | |
|---|---|
char |
|
getKeycode
public int getKeycode ()
Returns the base keycode that, combined with the modifiers, triggers this shortcut. If the
base character was set instead, returns KeyEvent.KEYCODE_UNKNOWN. Valid keycodes are
defined as constants in KeyEvent.
| Returns | |
|---|---|
int |
|
getLabel
public CharSequence getLabel ()
Returns the label to be used to describe this shortcut.
| Returns | |
|---|---|
CharSequence |
This value may be null. |