mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-28 11:17:45 +00:00
fix(oem): Back button to dismiss FV Android system keyboard
Bring in the changes from #2950 and #3093 to the FV Android app
This commit is contained in:
parent
2ff9cde7d3
commit
4e39e6c560
2 changed files with 13 additions and 0 deletions
1
oem/firstvoices/android/.gitignore
vendored
1
oem/firstvoices/android/.gitignore
vendored
|
|
@ -21,6 +21,7 @@
|
|||
# Files generated as part of the build
|
||||
app/src/main/assets/packages
|
||||
app/src/main/assets/keyboards.csv
|
||||
app/src/main/assets/fv_all.kmp
|
||||
|
||||
# Legacy Eclipse IDE files
|
||||
.classpath
|
||||
|
|
|
|||
|
|
@ -185,6 +185,18 @@ public class SystemKeyboard extends InputMethodService implements KeyboardEventH
|
|||
|
||||
@Override
|
||||
public boolean onKeyDown(int keyCode, KeyEvent event) {
|
||||
if (event.getAction() == KeyEvent.ACTION_DOWN) {
|
||||
switch (keyCode) {
|
||||
case KeyEvent.KEYCODE_BACK:
|
||||
// Dismiss the keyboard if currently shown
|
||||
if (isInputViewShown()) {
|
||||
KMManager.hideSystemKeyboard();
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return interpreter.onKeyDown(keyCode, event); // if false, will revert to default handling.
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue