Compare commits

...

4 Commits
4.3.6 ... 4.3.8

Author SHA1 Message Date
Yuriy Liskov
0ed1761b8e FireTV fix (update1) 2018-03-25 18:28:27 +03:00
Yuriy Liskov
e9cc575c31 FireTV fix (possible) 2018-03-25 16:46:58 +03:00
Yuriy Liskov
4262862a1b spell fix 2018-03-24 21:07:14 +02:00
Yuriy Liskov
1313101d70 img fix 2018-03-24 21:04:31 +02:00
9 changed files with 52 additions and 22 deletions

View File

@@ -1,4 +1,4 @@
![Logo of LeanKeyKeyboard](screenshots/leankeykeyboard-logo_small.png "Logo of LeanKeyKeyboard") LeanKeyKeyboard ![Logo of LeanKeyKeyboard](img/leankeykeyboard_logo_small.png "Logo of LeanKeyKeyboard") LeanKeyKeyboard
========= =========
[![MPLv2 License](http://img.shields.io/badge/license-MPLv2-blue.svg?style=flat-square)](https://www.mozilla.org/MPL/2.0/) [![MPLv2 License](http://img.shields.io/badge/license-MPLv2-blue.svg?style=flat-square)](https://www.mozilla.org/MPL/2.0/)
@@ -37,8 +37,9 @@ __Standard installation via ADB__
### Screenshots: ### Screenshots:
![Screenshot of LeanKeyKeyboard](screenshots/leankeykeyboard_screenshot_01.png "Screenshot of LeanKeyKeyboard") ![Screenshot of LeanKeyKeyboard](img/leankeykeyboard_screenshot_01.png "Screenshot of LeanKeyKeyboard")
![Screenshot of LeanKeyKeyboard](screenshots/leankeykeyboard_screenshot_02.png "Screenshot of LeanKeyKeyboard") ![Screenshot of LeanKeyKeyboard](img/leankeykeyboard_screenshot_02.png "Screenshot of LeanKeyKeyboard")
![Screenshot of LeanKeyKeyboard](img/leankeykeyboard_screenshot_03.png "Screenshot of LeanKeyKeyboard")
### Why using it: ### Why using it:
* LeanKeyKeyboard provides possibility to enter text with any length. * LeanKeyKeyboard provides possibility to enter text with any length.

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

View File

@@ -8,8 +8,8 @@ android {
applicationId "org.liskovsoft.leankeykeyboard.pro" applicationId "org.liskovsoft.leankeykeyboard.pro"
minSdkVersion project.properties.minSdkVersion minSdkVersion project.properties.minSdkVersion
targetSdkVersion project.properties.targetSdkVersion targetSdkVersion project.properties.targetSdkVersion
versionCode 56 versionCode 58
versionName "4.3.6" versionName "4.3.8"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

View File

@@ -49,6 +49,7 @@ public class LeanbackKeyboardController implements LeanbackKeyboardContainer.Voi
private PointF mTempPoint; private PointF mTempPoint;
private LeanbackKeyboardController.TouchEventListener mTouchEventListener; private LeanbackKeyboardController.TouchEventListener mTouchEventListener;
private long prevTime; private long prevTime;
private boolean mShowInput;
public LeanbackKeyboardController(final InputMethodService context, final LeanbackKeyboardController.InputListener listener) { public LeanbackKeyboardController(final InputMethodService context, final LeanbackKeyboardController.InputListener listener) {
this(context, listener, new TouchNavSpaceTracker(), new LeanbackKeyboardContainer(context)); this(context, listener, new TouchNavSpaceTracker(), new LeanbackKeyboardContainer(context));
@@ -681,23 +682,37 @@ public class LeanbackKeyboardController implements LeanbackKeyboardContainer.Voi
} }
} }
public void onStartInput(EditorInfo var1) { public void onStartInput(EditorInfo info) {
if (this.mContainer != null) { if (mContainer != null) {
this.mContainer.onStartInput(var1); mContainer.onStartInput(info);
this.initInputView(); initInputView();
} }
// prevent accidental kbd pop-up on FireTV devices
// more info: https://forum.xda-developers.com/fire-tv/general/guide-change-screen-keyboard-to-leankey-t3527675/page2
int maskAction = info.imeOptions & EditorInfo.IME_MASK_ACTION;
mShowInput = maskAction != 0;
}
public boolean showInputView() {
return mShowInput;
}
private void onHideIme() {
mContext.requestHideSelf(InputMethodService.BACK_DISPOSITION_DEFAULT);
} }
public void onStartInputView() { public void onStartInputView() {
this.mKeyDownReceived = false; mKeyDownReceived = false;
if (this.mContainer != null) {
this.mContainer.onStartInputView(); if (mContainer != null) {
mContainer.onStartInputView();
} }
this.mDoubleClickDetector.reset(); mDoubleClickDetector.reset();
} }
@Override
public boolean onTouch(View view, MotionEvent event) { public boolean onTouch(View view, MotionEvent event) {
Object tag = view.getTag(); Object tag = view.getTag();
if (tag != null && "Go".equals(tag)) { if (tag != null && "Go".equals(tag)) {

View File

@@ -224,15 +224,19 @@ public class LeanbackImeService extends InputMethodService {
return false; return false;
} }
/**
* At this point, decision whether to show kbd taking place
* @return whether to show kbd
*/
@SuppressLint("MissingSuperCall") @SuppressLint("MissingSuperCall")
@Override @Override
public boolean onEvaluateInputViewShown() { public boolean onEvaluateInputViewShown() {
return true; return mKeyboardController.showInputView();
} }
@Override @Override
public void onFinishInputView(boolean var1) { public void onFinishInputView(boolean finishingInput) {
super.onFinishInputView(var1); super.onFinishInputView(finishingInput);
this.sendBroadcast(new Intent(IME_CLOSE)); this.sendBroadcast(new Intent(IME_CLOSE));
this.mSuggestionsFactory.clearSuggestions(); this.mSuggestionsFactory.clearSuggestions();
} }
@@ -246,7 +250,7 @@ public class LeanbackImeService extends InputMethodService {
} }
public void onHideIme() { public void onHideIme() {
this.requestHideSelf(0); requestHideSelf(InputMethodService.BACK_DISPOSITION_DEFAULT);
} }
@Override @Override
@@ -266,10 +270,11 @@ public class LeanbackImeService extends InputMethodService {
return isInputViewShown() && mKeyboardController.onKeyUp(keyCode, event) || super.onKeyUp(keyCode, event); return isInputViewShown() && mKeyboardController.onKeyUp(keyCode, event) || super.onKeyUp(keyCode, event);
} }
@Override // FireTV fix
public boolean onShowInputRequested(int flags, boolean configChange) { //@Override
return true; //public boolean onShowInputRequested(int flags, boolean configChange) {
} // return true;
//}
@Override @Override
public int onStartCommand(final Intent intent, final int flags, final int startId) { public int onStartCommand(final Intent intent, final int flags, final int startId) {
@@ -298,6 +303,15 @@ public class LeanbackImeService extends InputMethodService {
@Override @Override
public void onStartInputView(EditorInfo info, boolean restarting) { public void onStartInputView(EditorInfo info, boolean restarting) {
super.onStartInputView(info, restarting); super.onStartInputView(info, restarting);
// FireTV: fix accidental kbd pop-ups
// more info: https://forum.xda-developers.com/fire-tv/general/guide-change-screen-keyboard-to-leankey-t3527675/page2
updateInputViewShown();
if (!mKeyboardController.showInputView()) {
onHideIme();
return;
}
mKeyboardController.onStartInputView(); mKeyboardController.onStartInputView();
sendBroadcast(new Intent(IME_OPEN)); sendBroadcast(new Intent(IME_OPEN));
if (mKeyboardController.areSuggestionsEnabled()) { if (mKeyboardController.areSuggestionsEnabled()) {

View File

@@ -24,6 +24,6 @@
<string name="keyboardview_keycode_right">Right</string> <string name="keyboardview_keycode_right">Right</string>
<string name="keyboard_headset_required_to_hear_password">Plug in a headset to hear password keys spoken.</string> <string name="keyboard_headset_required_to_hear_password">Plug in a headset to hear password keys spoken.</string>
<string name="keyboard_password_character_no_headset">Dot.</string> <string name="keyboard_password_character_no_headset">Dot.</string>
<string name="language_dialog_title">Select desired keyboards</string> <string name="language_dialog_title">Select additional keyboards</string>
<string name="language_dialog_subtitle">To open dialog next time, long press on \'world\' button</string> <string name="language_dialog_subtitle">To open dialog next time, long press on \'world\' button</string>
</resources> </resources>