public static interface KeyboardView.OnKeyboardActionListener
Modifier and Type | Method and Description |
---|---|
void |
onKey(int primaryCode,
int[] keyCodes)
Send a key press to the listener.
|
void |
onPress(int primaryCode)
Called when the user presses a key.
|
void |
onRelease(int primaryCode)
Called when the user releases a key.
|
void |
onText(CharSequence text)
Sends a sequence of characters to the listener.
|
void |
swipeDown()
Called when the user quickly moves the finger from up to down.
|
void |
swipeLeft()
Called when the user quickly moves the finger from right to left.
|
void |
swipeRight()
Called when the user quickly moves the finger from left to right.
|
void |
swipeUp()
Called when the user quickly moves the finger from down to up.
|
void onPress(int primaryCode)
onKey(int, int[])
is called.
For keys that repeat, this is only called once.primaryCode
- the unicode of the key being pressed. If the touch is not on a valid
key, the value will be zero.void onRelease(int primaryCode)
onKey(int, int[])
is called.
For keys that repeat, this is only called once.primaryCode
- the code of the key that was releasedvoid onKey(int primaryCode, int[] keyCodes)
primaryCode
- this is the key that was pressedkeyCodes
- 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.void onText(CharSequence text)
text
- the sequence of characters to be displayed.void swipeLeft()
void swipeRight()
void swipeDown()
void swipeUp()