KeyboardShortcutInfo
class KeyboardShortcutInfo : Parcelable
kotlin.Any | |
↳ | android.view.KeyboardShortcutInfo |
Information about a Keyboard Shortcut.
Summary
Inherited constants | |
---|---|
Public constructors | |
---|---|
KeyboardShortcutInfo(label: CharSequence!, baseCharacter: Char, modifiers: Int) |
|
KeyboardShortcutInfo(label: CharSequence!, keycode: Int, modifiers: Int) |
Public methods | |
---|---|
Int | |
Char |
Returns the base character that, combined with the modifiers, triggers this shortcut. |
Int |
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 |
Returns the set of modifiers that, combined with the key, trigger this shortcut. |
Unit |
writeToParcel(dest: Parcel, flags: Int) |
Properties | |
---|---|
static Parcelable.Creator<KeyboardShortcutInfo!> |
Public constructors
KeyboardShortcutInfo
KeyboardShortcutInfo(
label: CharSequence!,
baseCharacter: Char,
modifiers: Int)
Parameters | |
---|---|
label |
CharSequence!: The label that identifies the action performed by this shortcut. |
baseCharacter |
Char: The character that triggers the shortcut. |
modifiers |
Int: The set of modifiers that, combined with the key, trigger the shortcut. These should be a combination of KeyEvent.META_CTRL_ON , KeyEvent.META_SHIFT_ON , KeyEvent.META_META_ON , KeyEvent.META_ALT_ON , KeyEvent.META_FUNCTION_ON and KeyEvent.META_SYM_ON . |
KeyboardShortcutInfo
KeyboardShortcutInfo(
label: CharSequence!,
keycode: Int,
modifiers: Int)
Parameters | |
---|---|
label |
CharSequence!: The label that identifies the action performed by this shortcut. |
keycode |
Int: The keycode that triggers the shortcut. This should be a valid constant defined in KeyEvent . |
modifiers |
Int: The set of modifiers that, combined with the key, trigger the shortcut. These should be a combination of KeyEvent.META_CTRL_ON , KeyEvent.META_SHIFT_ON , KeyEvent.META_META_ON , KeyEvent.META_ALT_ON , KeyEvent.META_FUNCTION_ON and KeyEvent.META_SYM_ON . |
Public methods
describeContents
fun describeContents(): Int
Return | |
---|---|
Int |
a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR |
getBaseCharacter
fun getBaseCharacter(): Char
Returns the base character that, combined with the modifiers, triggers this shortcut. If the keycode was set instead, returns Character.MIN_VALUE
.
getKeycode
fun getKeycode(): Int
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
.
getLabel
fun getLabel(): CharSequence?
Returns the label to be used to describe this shortcut.
Return | |
---|---|
CharSequence? |
This value may be null . |
getModifiers
fun getModifiers(): Int
Returns the set of modifiers that, combined with the key, trigger this shortcut. These can be a combination of KeyEvent.META_CTRL_ON
, KeyEvent.META_SHIFT_ON
, KeyEvent.META_META_ON
, KeyEvent.META_ALT_ON
, KeyEvent.META_FUNCTION_ON
and KeyEvent.META_SYM_ON
.
writeToParcel
fun writeToParcel(
dest: Parcel,
flags: Int
): Unit
Parameters | |
---|---|
dest |
Parcel: The Parcel in which the object should be written. This value cannot be null . |
flags |
Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE . Value is either 0 or a combination of android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE , and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES |