mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-18 22:37:43 +00:00
fix(android/engine): Dismiss key preview and subkeys on globe action
This commit is contained in:
parent
24d1e4b384
commit
aa09bee50e
1 changed files with 9 additions and 0 deletions
|
|
@ -2177,6 +2177,15 @@ public final class KMManager {
|
|||
* @param keyboardType KeyboardType KEYBOARD_TYPE_INAPP or KEYBOARD_TYPE_SYSTEM
|
||||
*/
|
||||
public static void handleGlobeKeyAction(Context context, boolean globeKeyDown, KeyboardType keyboardType) {
|
||||
// Clear preview and subkeys
|
||||
if (keyboardType == KeyboardType.KEYBOARD_TYPE_INAPP) {
|
||||
InAppKeyboard.dismissKeyPreview(0);
|
||||
InAppKeyboard.dismissSubKeysWindow();
|
||||
} else if (keyboardType == KeyboardType.KEYBOARD_TYPE_SYSTEM) {
|
||||
SystemKeyboard.dismissKeyPreview(0);
|
||||
SystemKeyboard.dismissSubKeysWindow();
|
||||
}
|
||||
|
||||
// Update globeKeyState
|
||||
if (globeKeyState != GlobeKeyState.GLOBE_KEY_STATE_LONGPRESS) {
|
||||
globeKeyState = globeKeyDown ? GlobeKeyState.GLOBE_KEY_STATE_DOWN : GlobeKeyState.GLOBE_KEY_STATE_UP;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue