abouttreesummaryrefslogcommitdiff
path: root/srcs/juloo.keyboard2/Keyboard2.java
diff options
context:
space:
mode:
Diffstat (limited to 'srcs/juloo.keyboard2/Keyboard2.java')
-rw-r--r--srcs/juloo.keyboard2/Keyboard2.java16
1 files changed, 13 insertions, 3 deletions
diff --git a/srcs/juloo.keyboard2/Keyboard2.java b/srcs/juloo.keyboard2/Keyboard2.java
index 0065e0d..54caf3c 100644
--- a/srcs/juloo.keyboard2/Keyboard2.java
+++ b/srcs/juloo.keyboard2/Keyboard2.java
@@ -329,11 +329,21 @@ public class Keyboard2 extends InputMethodService
/** Not static */
public class Receiver implements KeyEventHandler.IReceiver
{
- public void switchToNextInputMethod() {
+ public void switchInputMethod()
+ {
InputMethodManager imm = (InputMethodManager)getSystemService(INPUT_METHOD_SERVICE);
imm.showInputMethodPicker();
- // deprecated in version 28: imm.switchToNextInputMethod(getConnectionToken(), false);
- // added in version 28: switchToNextInputMethod(false);
+ }
+
+ public void switchToPrevInputMethod()
+ {
+ if (VERSION.SDK_INT < 28)
+ {
+ InputMethodManager imm = (InputMethodManager)getSystemService(INPUT_METHOD_SERVICE);
+ imm.switchToLastInputMethod(getConnectionToken());
+ }
+ else
+ Keyboard2.this.switchToPreviousInputMethod();
}
public void setPane_emoji()