mirror of
https://github.com/yuliskov/LeanKeyboard.git
synced 2026-05-02 12:52:37 -04:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0ed1761b8e | ||
|
|
e9cc575c31 | ||
|
|
4262862a1b | ||
|
|
1313101d70 |
@@ -1,4 +1,4 @@
|
||||
 LeanKeyKeyboard
|
||||
 LeanKeyKeyboard
|
||||
=========
|
||||
|
||||
[](https://www.mozilla.org/MPL/2.0/)
|
||||
@@ -37,8 +37,9 @@ __Standard installation via ADB__
|
||||
|
||||
### Screenshots:
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
### Why using it:
|
||||
* LeanKeyKeyboard provides possibility to enter text with any length.
|
||||
|
||||
BIN
img/leankeykeyboard_logo_small.png
Normal file
BIN
img/leankeykeyboard_logo_small.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.6 KiB |
BIN
img/leankeykeyboard_screenshot_01.png
Normal file
BIN
img/leankeykeyboard_screenshot_01.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 62 KiB |
BIN
img/leankeykeyboard_screenshot_02.png
Normal file
BIN
img/leankeykeyboard_screenshot_02.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 59 KiB |
BIN
img/leankeykeyboard_screenshot_03.png
Normal file
BIN
img/leankeykeyboard_screenshot_03.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 68 KiB |
@@ -8,8 +8,8 @@ android {
|
||||
applicationId "org.liskovsoft.leankeykeyboard.pro"
|
||||
minSdkVersion project.properties.minSdkVersion
|
||||
targetSdkVersion project.properties.targetSdkVersion
|
||||
versionCode 56
|
||||
versionName "4.3.6"
|
||||
versionCode 58
|
||||
versionName "4.3.8"
|
||||
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
|
||||
|
||||
@@ -49,6 +49,7 @@ public class LeanbackKeyboardController implements LeanbackKeyboardContainer.Voi
|
||||
private PointF mTempPoint;
|
||||
private LeanbackKeyboardController.TouchEventListener mTouchEventListener;
|
||||
private long prevTime;
|
||||
private boolean mShowInput;
|
||||
|
||||
public LeanbackKeyboardController(final InputMethodService context, final LeanbackKeyboardController.InputListener listener) {
|
||||
this(context, listener, new TouchNavSpaceTracker(), new LeanbackKeyboardContainer(context));
|
||||
@@ -681,23 +682,37 @@ public class LeanbackKeyboardController implements LeanbackKeyboardContainer.Voi
|
||||
}
|
||||
}
|
||||
|
||||
public void onStartInput(EditorInfo var1) {
|
||||
if (this.mContainer != null) {
|
||||
this.mContainer.onStartInput(var1);
|
||||
this.initInputView();
|
||||
public void onStartInput(EditorInfo info) {
|
||||
if (mContainer != null) {
|
||||
mContainer.onStartInput(info);
|
||||
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() {
|
||||
this.mKeyDownReceived = false;
|
||||
if (this.mContainer != null) {
|
||||
this.mContainer.onStartInputView();
|
||||
mKeyDownReceived = false;
|
||||
|
||||
if (mContainer != null) {
|
||||
mContainer.onStartInputView();
|
||||
}
|
||||
|
||||
this.mDoubleClickDetector.reset();
|
||||
mDoubleClickDetector.reset();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onTouch(View view, MotionEvent event) {
|
||||
Object tag = view.getTag();
|
||||
if (tag != null && "Go".equals(tag)) {
|
||||
|
||||
@@ -224,15 +224,19 @@ public class LeanbackImeService extends InputMethodService {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* At this point, decision whether to show kbd taking place
|
||||
* @return whether to show kbd
|
||||
*/
|
||||
@SuppressLint("MissingSuperCall")
|
||||
@Override
|
||||
public boolean onEvaluateInputViewShown() {
|
||||
return true;
|
||||
return mKeyboardController.showInputView();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFinishInputView(boolean var1) {
|
||||
super.onFinishInputView(var1);
|
||||
public void onFinishInputView(boolean finishingInput) {
|
||||
super.onFinishInputView(finishingInput);
|
||||
this.sendBroadcast(new Intent(IME_CLOSE));
|
||||
this.mSuggestionsFactory.clearSuggestions();
|
||||
}
|
||||
@@ -246,7 +250,7 @@ public class LeanbackImeService extends InputMethodService {
|
||||
}
|
||||
|
||||
public void onHideIme() {
|
||||
this.requestHideSelf(0);
|
||||
requestHideSelf(InputMethodService.BACK_DISPOSITION_DEFAULT);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -266,10 +270,11 @@ public class LeanbackImeService extends InputMethodService {
|
||||
return isInputViewShown() && mKeyboardController.onKeyUp(keyCode, event) || super.onKeyUp(keyCode, event);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onShowInputRequested(int flags, boolean configChange) {
|
||||
return true;
|
||||
}
|
||||
// FireTV fix
|
||||
//@Override
|
||||
//public boolean onShowInputRequested(int flags, boolean configChange) {
|
||||
// return true;
|
||||
//}
|
||||
|
||||
@Override
|
||||
public int onStartCommand(final Intent intent, final int flags, final int startId) {
|
||||
@@ -298,6 +303,15 @@ public class LeanbackImeService extends InputMethodService {
|
||||
@Override
|
||||
public void onStartInputView(EditorInfo info, boolean 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();
|
||||
sendBroadcast(new Intent(IME_OPEN));
|
||||
if (mKeyboardController.areSuggestionsEnabled()) {
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
<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_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>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user