OnKeyboardActionListener
interfaceOnKeyboardActionListener
android.inputmethodservice.KeyboardView.OnKeyboardActionListener |
Listener for virtual keyboard events.
Summary
Public methods | |
---|---|
abstract Unit |
Send a key press to the listener. |
abstract Unit |
Called when the user presses a key. |
abstract Unit |
Called when the user releases a key. |
abstract Unit |
onText(text: CharSequence!) Sends a sequence of characters to the listener. |
abstract Unit |
Called when the user quickly moves the finger from up to down. |
abstract Unit |
Called when the user quickly moves the finger from right to left. |
abstract Unit |
Called when the user quickly moves the finger from left to right. |
abstract Unit |
swipeUp() Called when the user quickly moves the finger from down to up. |
Public methods
onKey
abstract funonKey(
primaryCode: Int,
keyCodes: IntArray!
): Unit
Deprecated: Deprecated in Java.
Send a key press to the listener.
Parameters | |
---|---|
primaryCode |
Int: this is the key that was pressed |
keyCodes |
IntArray!: the codes for all the possible alternative keys with the primary code being the first. If the primary key code is a single character such as an alphabet or number or symbol, the alternatives will include other characters that may be on the same key or adjacent keys. These codes are useful to correct for accidental presses of a key adjacent to the intended key. |
onPress
abstract funonPress(primaryCode: Int): Unit
Deprecated: Deprecated in Java.
Called when the user presses a key. This is sent before the onKey
is called. For keys that repeat, this is only called once.
Parameters | |
---|---|
primaryCode |
Int: the unicode of the key being pressed. If the touch is not on a valid key, the value will be zero. |
onRelease
abstract funonRelease(primaryCode: Int): Unit
Deprecated: Deprecated in Java.
Called when the user releases a key. This is sent after the onKey
is called. For keys that repeat, this is only called once.
Parameters | |
---|---|
primaryCode |
Int: the code of the key that was released |
onText
abstract funonText(text: CharSequence!): Unit
Deprecated: Deprecated in Java.
Sends a sequence of characters to the listener.
Parameters | |
---|---|
text |
CharSequence!: the sequence of characters to be displayed. |
swipeDown
abstract funswipeDown(): Unit
Deprecated: Deprecated in Java.
Called when the user quickly moves the finger from up to down.
swipeLeft
abstract funswipeLeft(): Unit
Deprecated: Deprecated in Java.
Called when the user quickly moves the finger from right to left.
swipeRight
abstract funswipeRight(): Unit
Deprecated: Deprecated in Java.
Called when the user quickly moves the finger from left to right.
swipeUp
abstract funswipeUp(): Unit
Deprecated: Deprecated in Java.
Called when the user quickly moves the finger from down to up.