Compare commits

..

1 Commits

Author SHA1 Message Date
Yuriy Liskov
e53316842c fix2: remember selected kbd 2018-07-18 17:34:47 +03:00
3 changed files with 12 additions and 8 deletions

View File

@@ -8,8 +8,8 @@ android {
applicationId "org.liskovsoft.leankeykeyboard.pro"
minSdkVersion project.properties.minSdkVersion
targetSdkVersion project.properties.targetSdkVersion
versionCode 65
versionName "4.3.15"
versionCode 67
versionName "4.3.17"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

View File

@@ -868,7 +868,7 @@ public class LeanbackKeyboardContainer {
setTouchState(LeanbackKeyboardContainer.TOUCH_STATE_NO_TOUCH);
return true;
} else if (keyCode == LeanbackKeyboardView.ASCII_SPACE) {
switchToNextKeyboard();
onLangKeyPress();
setTouchState(LeanbackKeyboardContainer.TOUCH_STATE_NO_TOUCH);
return true;
} else if (keyCode == LeanbackKeyboardView.KEYCODE_LANG_TOGGLE) {
@@ -1117,14 +1117,18 @@ public class LeanbackKeyboardContainer {
* Switch to next keyboard (looped).
* {@link KeyboardManager KeyboardManager} is the source behind all keyboard implementations
*/
public void switchToNextKeyboard() {
public void onLangKeyPress() {
switchToNextKeyboard();
showRunOnceDialog();
}
private void switchToNextKeyboard() {
LeanbackKeyboardView keyboardView = mMainKeyboardView;
Keyboard keyboard = mKeyboardManager.getNextKeyboard();
mInitialMainKeyboard = keyboard;
mAbcKeyboard = keyboard;
keyboardView.setKeyboard(keyboard);
showRunOnceDialog();
}
public void updateAddonKeyboard() {
@@ -1157,7 +1161,7 @@ public class LeanbackKeyboardContainer {
}
public void onLangKeyClick() {
switchToNextKeyboard();
onLangKeyPress();
// setTouchState(LeanbackKeyboardContainer.TOUCH_STATE_NO_TOUCH);
}

View File

@@ -108,7 +108,7 @@ public class LeanbackKeyboardController implements LeanbackKeyboardContainer.Voi
private boolean applyLETVFixesUp(int keyCode) {
switch (keyCode) {
case KeyEvent.KEYCODE_MENU:
this.mContainer.switchToNextKeyboard();
this.mContainer.onLangKeyPress();
break;
case KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE:
this.fakeKeyIndex(0, 2);