mirror of
https://github.com/yuliskov/LeanKeyboard.git
synced 2026-05-03 13:22: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/)
|
[](https://www.mozilla.org/MPL/2.0/)
|
||||||
@@ -37,8 +37,9 @@ __Standard installation via ADB__
|
|||||||
|
|
||||||
### Screenshots:
|
### Screenshots:
|
||||||
|
|
||||||

|

|
||||||

|

|
||||||
|

|
||||||
|
|
||||||
### Why using it:
|
### Why using it:
|
||||||
* LeanKeyKeyboard provides possibility to enter text with any length.
|
* 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"
|
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"
|
||||||
|
|
||||||
|
|||||||
@@ -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)) {
|
||||||
|
|||||||
@@ -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()) {
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
Reference in New Issue
Block a user