Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0ed1761b8e | ||
|
|
e9cc575c31 | ||
|
|
4262862a1b | ||
|
|
1313101d70 | ||
|
|
643b7e5443 | ||
|
|
524b371c63 | ||
|
|
aebdadb0fa | ||
|
|
f54ec3e5b0 | ||
|
|
231c384db3 | ||
|
|
0d8a86cadd | ||
|
|
f948ba3bd4 | ||
|
|
1c65d017fb | ||
|
|
a7598c27eb | ||
|
|
ce62e91626 | ||
|
|
171d314230 |
1
.gitignore
vendored
@@ -1,4 +1,5 @@
|
||||
notes.txt
|
||||
/other
|
||||
/files
|
||||
/misc
|
||||
tmp/
|
||||
|
||||
11
README.md
@@ -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.
|
||||
@@ -46,4 +47,6 @@ __Standard installation via ADB__
|
||||
|
||||
### Donation:
|
||||
If you want to support my developments you are welcome to buy me a cup of coffee :)
|
||||
* coming soon
|
||||
* BTC: 1JAT5VVWarVBkpVbNDn8UA8HXNdrukuBSx
|
||||
* WMZ: Z375157140784
|
||||
* WMU: U449339012933
|
||||
|
||||
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 62 KiB |
|
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 59 KiB |
BIN
img/leankeykeyboard_screenshot_03.png
Normal file
|
After Width: | Height: | Size: 68 KiB |
@@ -5,11 +5,11 @@ android {
|
||||
buildToolsVersion project.properties.buildToolsVersion
|
||||
|
||||
defaultConfig {
|
||||
applicationId "org.liskovsoft.androidtv.rukeyboard"
|
||||
applicationId "org.liskovsoft.leankeykeyboard.pro"
|
||||
minSdkVersion project.properties.minSdkVersion
|
||||
targetSdkVersion project.properties.targetSdkVersion
|
||||
versionCode 52
|
||||
versionName "3.2.0"
|
||||
versionCode 58
|
||||
versionName "4.3.8"
|
||||
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
|
||||
@@ -20,6 +20,20 @@ android {
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
|
||||
// naming example: SmartYouTubeTV_Xwalk_v6.8.12_r.apk
|
||||
// https://stackoverflow.com/questions/18332474/how-to-set-versionname-in-apk-filename-using-gradle
|
||||
applicationVariants.all { variant ->
|
||||
variant.outputs.each { output ->
|
||||
def project = "LeanKeyKeyboardPro"
|
||||
def buildType = variant.variantData.variantConfiguration.buildType.name.take(1)
|
||||
def version = variant.versionName
|
||||
|
||||
def newApkName = sprintf("%s_v%s_%s.apk", [project, version, buildType])
|
||||
|
||||
output.outputFile = new File(output.outputFile.parent, newApkName)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<uses-feature android:name="android.hardware.microphone" android:required="false"/>
|
||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
|
||||
<uses-permission android:name="android.permission.KILL_BACKGROUND_PROCESSES"/>
|
||||
<application android:banner="@drawable/banner_app" android:label="LeanKey Keyboard" android:icon="@drawable/ic_launcher" tools:targetApi="21">
|
||||
<application android:banner="@drawable/banner_app" android:label="@string/ime_name" android:icon="@drawable/ic_launcher" tools:targetApi="21">
|
||||
<activity android:launchMode="singleTop" android:name="com.liskovsoft.inputchooser.SettingsActivity">
|
||||
<meta-data android:name="package" android:value="com.android.settings"/>
|
||||
<meta-data android:name="class" android:value="com.android.settings.Settings"/>
|
||||
@@ -15,7 +15,7 @@
|
||||
<category android:name="android.intent.category.LEANBACK_LAUNCHER"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<service android:label="LeanKey Keyboard" android:name="com.google.leanback.ime.LeanbackImeService" android:permission="android.permission.BIND_INPUT_METHOD">
|
||||
<service android:label="@string/ime_service_name" android:name="com.google.leanback.ime.LeanbackImeService" android:permission="android.permission.BIND_INPUT_METHOD">
|
||||
<intent-filter>
|
||||
<action android:name="android.view.InputMethod"/>
|
||||
</intent-filter>
|
||||
|
||||
@@ -36,6 +36,8 @@ import android.widget.RelativeLayout.LayoutParams;
|
||||
import com.google.android.leanback.ime.voice.RecognizerView;
|
||||
import com.google.android.leanback.ime.voice.SpeechLevelSource;
|
||||
import com.google.leanback.ime.LeanbackImeService;
|
||||
import com.liskovsoft.inputchooser.ChooseKeyboardDialog;
|
||||
import com.liskovsoft.inputchooser.LeanKeyPreferences;
|
||||
import com.liskovsoft.keyboardaddons.KeyboardManager;
|
||||
import com.liskovsoft.leankeykeyboard.R;
|
||||
|
||||
@@ -59,8 +61,11 @@ public class LeanbackKeyboardContainer {
|
||||
public static final int TOUCH_STATE_TOUCH_SNAP = 1;
|
||||
private static final boolean VOICE_SUPPORTED = true;
|
||||
public static final Interpolator sMovementInterpolator = new DecelerateInterpolator(1.5F);
|
||||
public static final int DIRECTION_UP = 8;
|
||||
public static final int DIRECTION_DOWN = 2;
|
||||
public static final int DIRECTION_LEFT = 1;
|
||||
public static final int DIRECTION_RIGHT = 4;
|
||||
private Keyboard mAbcKeyboard;
|
||||
private Keyboard mAbcKeyboardRU;
|
||||
private Button mActionButtonView;
|
||||
private final float mAlphaIn;
|
||||
private final float mAlphaOut;
|
||||
@@ -204,7 +209,7 @@ public class LeanbackKeyboardContainer {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private void configureFocus(LeanbackKeyboardContainer.KeyFocus focus, Rect rect, int index, int type) {
|
||||
focus.type = type;
|
||||
focus.index = index;
|
||||
@@ -267,10 +272,10 @@ public class LeanbackKeyboardContainer {
|
||||
}
|
||||
|
||||
private void initKeyboards() {
|
||||
this.mAbcKeyboard = new Keyboard(this.mContext, R.xml.qwerty_us);
|
||||
this.mSymKeyboard = new Keyboard(this.mContext, R.xml.sym_us);
|
||||
this.updateAddonKeyboard();
|
||||
this.mNumKeyboard = new Keyboard(this.mContext, R.xml.number);
|
||||
mAbcKeyboard = new Keyboard(mContext, R.xml.qwerty_us);
|
||||
mSymKeyboard = new Keyboard(mContext, R.xml.sym_us);
|
||||
updateAddonKeyboard();
|
||||
mNumKeyboard = new Keyboard(mContext, R.xml.number);
|
||||
}
|
||||
|
||||
private boolean isMatch(Locale var1, Locale[] var2) {
|
||||
@@ -312,7 +317,9 @@ public class LeanbackKeyboardContainer {
|
||||
}
|
||||
|
||||
/**
|
||||
* All keyboard settings applied here
|
||||
* Init currently displayed keyboard<br/>
|
||||
* Note: all keyboard settings applied here<br/>
|
||||
* Note: this method is called constantly on new field
|
||||
* @param resources resources (not used)
|
||||
* @param info current ime attributes
|
||||
*/
|
||||
@@ -614,51 +621,58 @@ public class LeanbackKeyboardContainer {
|
||||
return mAutoEnterSpaceEnabled;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize {@link KeyFocus focus} variable based on supplied coordinates
|
||||
* @param x x coordinates
|
||||
* @param y y coordinates
|
||||
* @param focus result focus
|
||||
* @return whether focus is found or not
|
||||
*/
|
||||
public boolean getBestFocus(final Float x, final Float y, final LeanbackKeyboardContainer.KeyFocus focus) {
|
||||
this.offsetRect(this.mRect, this.mActionButtonView);
|
||||
int actionLeft = this.mRect.left;
|
||||
this.offsetRect(this.mRect, this.mMainKeyboardView);
|
||||
int keyboardTop = this.mRect.top;
|
||||
offsetRect(mRect, mActionButtonView);
|
||||
int actionLeft = mRect.left;
|
||||
offsetRect(mRect, mMainKeyboardView);
|
||||
int keyboardTop = mRect.top;
|
||||
Float newX = x;
|
||||
if (x == null) {
|
||||
newX = this.mX;
|
||||
newX = mX;
|
||||
}
|
||||
|
||||
Float newY = y;
|
||||
if (y == null) {
|
||||
newY = this.mY;
|
||||
newY = mY;
|
||||
}
|
||||
|
||||
int count = this.mSuggestions.getChildCount();
|
||||
if (newY < (float) keyboardTop && count > 0 && this.mSuggestionsEnabled) {
|
||||
int count = mSuggestions.getChildCount();
|
||||
if (newY < (float) keyboardTop && count > 0 && mSuggestionsEnabled) {
|
||||
for (actionLeft = 0; actionLeft < count; ++actionLeft) {
|
||||
View view = this.mSuggestions.getChildAt(actionLeft);
|
||||
this.offsetRect(this.mRect, view);
|
||||
if (newX < (float) this.mRect.right || actionLeft + 1 == count) {
|
||||
View view = mSuggestions.getChildAt(actionLeft);
|
||||
offsetRect(mRect, view);
|
||||
if (newX < (float) mRect.right || actionLeft + 1 == count) {
|
||||
view.requestFocus();
|
||||
LeanbackUtils.sendAccessibilityEvent(view.findViewById(R.id.text), true);
|
||||
this.configureFocus(focus, this.mRect, actionLeft, 3);
|
||||
configureFocus(focus, mRect, actionLeft, KeyFocus.TYPE_SUGGESTION);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
} else if (newY < (float) keyboardTop && this.mEscapeNorthEnabled) {
|
||||
this.escapeNorth();
|
||||
} else if (newY < (float) keyboardTop && mEscapeNorthEnabled) {
|
||||
escapeNorth();
|
||||
return false;
|
||||
} else if (newX > (float) actionLeft) {
|
||||
this.offsetRect(this.mRect, this.mActionButtonView);
|
||||
this.configureFocus(focus, this.mRect, 0, 2);
|
||||
offsetRect(mRect, mActionButtonView);
|
||||
configureFocus(focus, mRect, 0, KeyFocus.TYPE_ACTION);
|
||||
return true;
|
||||
} else {
|
||||
this.mX = newX;
|
||||
this.mY = newY;
|
||||
this.offsetRect(this.mRect, this.mMainKeyboardView);
|
||||
final float left = (float) this.mRect.left;
|
||||
final float top = (float) this.mRect.top;
|
||||
actionLeft = this.mMainKeyboardView.getNearestIndex(Float.valueOf(newX - left), Float.valueOf(newY - top));
|
||||
Key key = this.mMainKeyboardView.getKey(actionLeft);
|
||||
this.configureFocus(focus, this.mRect, actionLeft, key, 0);
|
||||
mX = newX;
|
||||
mY = newY;
|
||||
offsetRect(mRect, mMainKeyboardView);
|
||||
final float left = (float) mRect.left;
|
||||
final float top = (float) mRect.top;
|
||||
actionLeft = mMainKeyboardView.getNearestIndex(Float.valueOf(newX - left), Float.valueOf(newY - top));
|
||||
Key key = mMainKeyboardView.getKey(actionLeft);
|
||||
configureFocus(focus, mRect, actionLeft, key, 0);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -688,109 +702,109 @@ public class LeanbackKeyboardContainer {
|
||||
public boolean getNextFocusInDirection(int direction, LeanbackKeyboardContainer.KeyFocus startFocus, LeanbackKeyboardContainer.KeyFocus nextFocus) {
|
||||
switch (startFocus.type) {
|
||||
case KeyFocus.TYPE_MAIN:
|
||||
Key key = this.getKey(startFocus.type, startFocus.index);
|
||||
float var5 = (float) startFocus.rect.height() / 2.0F;
|
||||
float var4 = (float) startFocus.rect.centerX();
|
||||
float var6 = (float) startFocus.rect.centerY();
|
||||
Key key = getKey(startFocus.type, startFocus.index);
|
||||
float centerDelta = (float) startFocus.rect.height() / 2.0F;
|
||||
float centerX = (float) startFocus.rect.centerX();
|
||||
float centerY = (float) startFocus.rect.centerY();
|
||||
if (startFocus.code == 32) {
|
||||
var4 = this.mX;
|
||||
centerX = mX;
|
||||
}
|
||||
|
||||
if ((direction & 1) != 0) {
|
||||
if ((direction & DIRECTION_LEFT) != 0) {
|
||||
if ((key.edgeFlags & 1) == 0) {
|
||||
var4 = (float) startFocus.rect.left - var5;
|
||||
centerX = (float) startFocus.rect.left - centerDelta;
|
||||
}
|
||||
} else if ((direction & 4) != 0) {
|
||||
} else if ((direction & DIRECTION_RIGHT) != 0) {
|
||||
if ((key.edgeFlags & 2) != 0) {
|
||||
this.offsetRect(this.mRect, this.mActionButtonView);
|
||||
var4 = (float) this.mRect.centerX();
|
||||
offsetRect(mRect, mActionButtonView);
|
||||
centerX = (float) mRect.centerX();
|
||||
} else {
|
||||
var4 = (float) startFocus.rect.right + var5;
|
||||
centerX = (float) startFocus.rect.right + centerDelta;
|
||||
}
|
||||
}
|
||||
|
||||
if ((direction & 8) != 0) {
|
||||
var5 = (float) ((double) var6 - (double) startFocus.rect.height() * DIRECTION_STEP_MULTIPLIER);
|
||||
if ((direction & DIRECTION_UP) != 0) {
|
||||
centerDelta = (float) ((double) centerY - (double) startFocus.rect.height() * DIRECTION_STEP_MULTIPLIER);
|
||||
} else {
|
||||
var5 = var6;
|
||||
if ((direction & 2) != 0) {
|
||||
var5 = (float) ((double) var6 + (double) startFocus.rect.height() * DIRECTION_STEP_MULTIPLIER);
|
||||
centerDelta = centerY;
|
||||
if ((direction & DIRECTION_DOWN) != 0) {
|
||||
centerDelta = (float) ((double) centerY + (double) startFocus.rect.height() * DIRECTION_STEP_MULTIPLIER);
|
||||
}
|
||||
}
|
||||
|
||||
this.getPhysicalPosition(var4, var5, this.mTempPoint);
|
||||
return this.getBestFocus(var4, var5, nextFocus);
|
||||
getPhysicalPosition(centerX, centerDelta, mTempPoint);
|
||||
return getBestFocus(centerX, centerDelta, nextFocus);
|
||||
case KeyFocus.TYPE_VOICE:
|
||||
default:
|
||||
break;
|
||||
case KeyFocus.TYPE_ACTION:
|
||||
this.offsetRect(this.mRect, this.mMainKeyboardView);
|
||||
if ((direction & 1) != 0) {
|
||||
return this.getBestFocus((float) this.mRect.right, null, nextFocus);
|
||||
offsetRect(mRect, mMainKeyboardView);
|
||||
if ((direction & DIRECTION_LEFT) != 0) {
|
||||
return getBestFocus((float) mRect.right, null, nextFocus);
|
||||
}
|
||||
|
||||
if ((direction & 8) != 0) {
|
||||
this.offsetRect(this.mRect, this.mSuggestions);
|
||||
return this.getBestFocus((float) startFocus.rect.centerX(), (float) this.mRect.centerY(), nextFocus);
|
||||
if ((direction & DIRECTION_UP) != 0) {
|
||||
offsetRect(mRect, mSuggestions);
|
||||
return getBestFocus((float) startFocus.rect.centerX(), (float) mRect.centerY(), nextFocus);
|
||||
}
|
||||
break;
|
||||
case KeyFocus.TYPE_SUGGESTION:
|
||||
if ((direction & 2) != 0) {
|
||||
this.offsetRect(this.mRect, this.mMainKeyboardView);
|
||||
return this.getBestFocus((float) startFocus.rect.centerX(), (float) this.mRect.top, nextFocus);
|
||||
if ((direction & DIRECTION_DOWN) != 0) {
|
||||
offsetRect(mRect, mMainKeyboardView);
|
||||
return getBestFocus((float) startFocus.rect.centerX(), (float) mRect.top, nextFocus);
|
||||
}
|
||||
|
||||
if ((direction & 8) != 0) {
|
||||
if (this.mEscapeNorthEnabled) {
|
||||
this.escapeNorth();
|
||||
if ((direction & DIRECTION_UP) != 0) {
|
||||
if (mEscapeNorthEnabled) {
|
||||
escapeNorth();
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
boolean var7;
|
||||
if ((direction & 1) != 0) {
|
||||
var7 = true;
|
||||
boolean left;
|
||||
if ((direction & DIRECTION_LEFT) != 0) {
|
||||
left = true;
|
||||
} else {
|
||||
var7 = false;
|
||||
left = false;
|
||||
}
|
||||
|
||||
boolean var12;
|
||||
if ((direction & 4) != 0) {
|
||||
var12 = true;
|
||||
boolean right;
|
||||
if ((direction & DIRECTION_RIGHT) != 0) {
|
||||
right = true;
|
||||
} else {
|
||||
var12 = false;
|
||||
right = false;
|
||||
}
|
||||
|
||||
if (var7 || var12) {
|
||||
this.offsetRect(this.mRect, this.mRootView);
|
||||
MarginLayoutParams var11 = (MarginLayoutParams) this.mSuggestionsContainer.getLayoutParams();
|
||||
int var8 = this.mRect.left + var11.leftMargin;
|
||||
int var9 = this.mRect.right - var11.rightMargin;
|
||||
int var10 = startFocus.index;
|
||||
byte var13;
|
||||
if (var7) {
|
||||
var13 = -1;
|
||||
if (left || right) {
|
||||
offsetRect(mRect, mRootView);
|
||||
MarginLayoutParams params = (MarginLayoutParams) mSuggestionsContainer.getLayoutParams();
|
||||
int leftCalc = mRect.left + params.leftMargin;
|
||||
int rightCalc = mRect.right - params.rightMargin;
|
||||
int focusIdx = startFocus.index;
|
||||
byte delta;
|
||||
if (left) {
|
||||
delta = -1;
|
||||
} else {
|
||||
var13 = 1;
|
||||
delta = 1;
|
||||
}
|
||||
|
||||
direction = var10 + var13;
|
||||
View var14 = this.mSuggestions.getChildAt(direction);
|
||||
if (var14 != null) {
|
||||
this.offsetRect(this.mRect, var14);
|
||||
if (this.mRect.left < var8 && this.mRect.right > var9) {
|
||||
this.mRect.left = var8;
|
||||
this.mRect.right = var9;
|
||||
} else if (this.mRect.left < var8) {
|
||||
this.mRect.right = this.mRect.width() + var8;
|
||||
this.mRect.left = var8;
|
||||
} else if (this.mRect.right > var9) {
|
||||
this.mRect.left = var9 - this.mRect.width();
|
||||
this.mRect.right = var9;
|
||||
int suggestIdx = focusIdx + delta;
|
||||
View suggestion = mSuggestions.getChildAt(suggestIdx);
|
||||
if (suggestion != null) {
|
||||
offsetRect(mRect, suggestion);
|
||||
if (mRect.left < leftCalc && mRect.right > rightCalc) {
|
||||
mRect.left = leftCalc;
|
||||
mRect.right = rightCalc;
|
||||
} else if (mRect.left < leftCalc) {
|
||||
mRect.right = mRect.width() + leftCalc;
|
||||
mRect.left = leftCalc;
|
||||
} else if (mRect.right > rightCalc) {
|
||||
mRect.left = rightCalc - mRect.width();
|
||||
mRect.right = rightCalc;
|
||||
}
|
||||
|
||||
var14.requestFocus();
|
||||
LeanbackUtils.sendAccessibilityEvent(var14.findViewById(R.id.text), true);
|
||||
this.configureFocus(nextFocus, this.mRect, direction, 3);
|
||||
suggestion.requestFocus();
|
||||
LeanbackUtils.sendAccessibilityEvent(suggestion.findViewById(R.id.text), true);
|
||||
configureFocus(nextFocus, mRect, suggestIdx, KeyFocus.TYPE_SUGGESTION);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -800,72 +814,73 @@ public class LeanbackKeyboardContainer {
|
||||
return true;
|
||||
}
|
||||
|
||||
public CharSequence getSuggestionText(int var1) {
|
||||
Object var3 = null;
|
||||
CharSequence var2 = (CharSequence) var3;
|
||||
if (var1 >= 0) {
|
||||
var2 = (CharSequence) var3;
|
||||
if (var1 < this.mSuggestions.getChildCount()) {
|
||||
Button var4 = (Button) this.mSuggestions.getChildAt(var1).findViewById(R.id.text);
|
||||
var2 = (CharSequence) var3;
|
||||
if (var4 != null) {
|
||||
var2 = var4.getText();
|
||||
public CharSequence getSuggestionText(int idx) {
|
||||
CharSequence result = null;
|
||||
if (idx >= 0) {
|
||||
if (idx < this.mSuggestions.getChildCount()) {
|
||||
Button btn = (Button) this.mSuggestions.getChildAt(idx).findViewById(R.id.text);
|
||||
if (btn != null) {
|
||||
result = btn.getText();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return var2;
|
||||
return result;
|
||||
}
|
||||
|
||||
public int getTouchState() {
|
||||
return this.mTouchState;
|
||||
return mTouchState;
|
||||
}
|
||||
|
||||
public RelativeLayout getView() {
|
||||
return this.mRootView;
|
||||
return mRootView;
|
||||
}
|
||||
|
||||
public boolean isCapsLockOn() {
|
||||
return this.mMainKeyboardView.getShiftState() == 2;
|
||||
return mMainKeyboardView.getShiftState() == 2;
|
||||
}
|
||||
|
||||
public boolean isCurrKeyShifted() {
|
||||
return this.mMainKeyboardView.isShifted();
|
||||
return mMainKeyboardView.isShifted();
|
||||
}
|
||||
|
||||
public boolean isMiniKeyboardOnScreen() {
|
||||
return this.mMainKeyboardView.isMiniKeyboardOnScreen();
|
||||
return mMainKeyboardView.isMiniKeyboardOnScreen();
|
||||
}
|
||||
|
||||
public boolean isVoiceEnabled() {
|
||||
return this.mVoiceEnabled;
|
||||
return mVoiceEnabled;
|
||||
}
|
||||
|
||||
public boolean isVoiceVisible() {
|
||||
return this.mVoiceButtonView.getVisibility() == 0;
|
||||
return mVoiceButtonView.getVisibility() == 0;
|
||||
}
|
||||
|
||||
public void onInitInputView() {
|
||||
this.resetFocusCursor();
|
||||
this.mSelector.setVisibility(View.VISIBLE);
|
||||
resetFocusCursor();
|
||||
mSelector.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
public boolean onKeyLongPress() {
|
||||
int var1 = this.mCurrKeyInfo.code;
|
||||
if (var1 == -1) {
|
||||
this.onToggleCapsLock();
|
||||
this.setTouchState(0);
|
||||
int keyCode = mCurrKeyInfo.code;
|
||||
if (keyCode == LeanbackKeyboardView.KEYCODE_SHIFT) {
|
||||
onToggleCapsLock();
|
||||
setTouchState(LeanbackKeyboardContainer.TOUCH_STATE_NO_TOUCH);
|
||||
return true;
|
||||
} else if (var1 == 32) {
|
||||
this.switchToNextKeyboard();
|
||||
this.setTouchState(0);
|
||||
} else if (keyCode == LeanbackKeyboardView.ASCII_SPACE) {
|
||||
switchToNextKeyboard();
|
||||
setTouchState(LeanbackKeyboardContainer.TOUCH_STATE_NO_TOUCH);
|
||||
return true;
|
||||
} else if (keyCode == LeanbackKeyboardView.KEYCODE_LANG_TOGGLE) {
|
||||
// NOTE: normal constructor cannot be applied here
|
||||
new ChooseKeyboardDialog(mContext, mMainKeyboardView).run();
|
||||
return true;
|
||||
} else {
|
||||
if (this.mCurrKeyInfo.type == 0) {
|
||||
this.mMainKeyboardView.onKeyLongPress();
|
||||
if (this.mMainKeyboardView.isMiniKeyboardOnScreen()) {
|
||||
this.mMiniKbKeyIndex = this.mCurrKeyInfo.index;
|
||||
this.moveFocusToIndex(this.mMainKeyboardView.getBaseMiniKbIndex(), 0);
|
||||
if (mCurrKeyInfo.type == KeyFocus.TYPE_MAIN) {
|
||||
mMainKeyboardView.onKeyLongPress();
|
||||
if (mMainKeyboardView.isMiniKeyboardOnScreen()) {
|
||||
mMiniKbKeyIndex = mCurrKeyInfo.index;
|
||||
moveFocusToIndex(mMainKeyboardView.getBaseMiniKbIndex(), KeyFocus.TYPE_MAIN);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -1106,7 +1121,10 @@ public class LeanbackKeyboardContainer {
|
||||
LeanbackKeyboardView keyboardView = mMainKeyboardView;
|
||||
Keyboard keyboard = mKeyboardManager.getNextKeyboard();
|
||||
mInitialMainKeyboard = keyboard;
|
||||
mAbcKeyboard = keyboard;
|
||||
keyboardView.setKeyboard(keyboard);
|
||||
|
||||
showRunOnceDialog();
|
||||
}
|
||||
|
||||
public void updateAddonKeyboard() {
|
||||
@@ -1139,6 +1157,25 @@ public class LeanbackKeyboardContainer {
|
||||
}
|
||||
}
|
||||
|
||||
public void onLangKeyClick() {
|
||||
switchToNextKeyboard();
|
||||
// setTouchState(LeanbackKeyboardContainer.TOUCH_STATE_NO_TOUCH);
|
||||
}
|
||||
|
||||
private void showRunOnceDialog() {
|
||||
LeanKeyPreferences prefs = LeanKeyPreferences.instance(mContext);
|
||||
boolean runOnce = prefs.isRunOnce();
|
||||
|
||||
if (runOnce) {
|
||||
return;
|
||||
}
|
||||
|
||||
prefs.setRunOnce(true);
|
||||
|
||||
// NOTE: normal constructor cannot be applied here
|
||||
new ChooseKeyboardDialog(mContext, mMainKeyboardView).run();
|
||||
}
|
||||
|
||||
public interface DismissListener {
|
||||
void onDismiss(boolean var1);
|
||||
}
|
||||
|
||||
@@ -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));
|
||||
@@ -284,50 +285,57 @@ public class LeanbackKeyboardController implements LeanbackKeyboardContainer.Voi
|
||||
private void handleCommitKeyboardKey(int keyCode, CharSequence text) {
|
||||
switch (keyCode) {
|
||||
case LeanbackKeyboardView.KEYCODE_DISMISS_MINI_KEYBOARD:
|
||||
this.mContainer.dismissMiniKeyboard();
|
||||
mContainer.dismissMiniKeyboard();
|
||||
return;
|
||||
case LeanbackKeyboardView.KEYCODE_VOICE:
|
||||
this.mContainer.startVoiceRecording();
|
||||
mContainer.startVoiceRecording();
|
||||
return;
|
||||
case LeanbackKeyboardView.KEYCODE_CAPS_LOCK:
|
||||
this.mContainer.onShiftDoubleClick(this.mContainer.isCapsLockOn());
|
||||
mContainer.onShiftDoubleClick(mContainer.isCapsLockOn());
|
||||
return;
|
||||
case LeanbackKeyboardView.KEYCODE_DELETE:
|
||||
this.mInputListener.onEntry(InputListener.ENTRY_TYPE_BACKSPACE, LeanbackKeyboardView.SHIFT_OFF, null);
|
||||
mInputListener.onEntry(InputListener.ENTRY_TYPE_BACKSPACE, LeanbackKeyboardView.SHIFT_OFF, null);
|
||||
return;
|
||||
case LeanbackKeyboardView.KEYCODE_RIGHT:
|
||||
this.mInputListener.onEntry(InputListener.ENTRY_TYPE_RIGHT, LeanbackKeyboardView.SHIFT_OFF, null);
|
||||
mInputListener.onEntry(InputListener.ENTRY_TYPE_RIGHT, LeanbackKeyboardView.SHIFT_OFF, null);
|
||||
return;
|
||||
case LeanbackKeyboardView.KEYCODE_LEFT:
|
||||
this.mInputListener.onEntry(InputListener.ENTRY_TYPE_LEFT, LeanbackKeyboardView.SHIFT_OFF, null);
|
||||
mInputListener.onEntry(InputListener.ENTRY_TYPE_LEFT, LeanbackKeyboardView.SHIFT_OFF, null);
|
||||
return;
|
||||
case LeanbackKeyboardView.KEYCODE_SYM_TOGGLE:
|
||||
if (Log.isLoggable("LbKbController", Log.DEBUG)) {
|
||||
Log.d("LbKbController", "mode change");
|
||||
}
|
||||
|
||||
this.mContainer.onModeChangeClick();
|
||||
mContainer.onModeChangeClick();
|
||||
return;
|
||||
case LeanbackKeyboardView.KEYCODE_SHIFT:
|
||||
if (Log.isLoggable("LbKbController", Log.DEBUG)) {
|
||||
Log.d("LbKbController", "shift");
|
||||
}
|
||||
|
||||
this.mContainer.onShiftClick();
|
||||
mContainer.onShiftClick();
|
||||
return;
|
||||
case LeanbackKeyboardView.ASCII_SPACE:
|
||||
this.mInputListener.onEntry(InputListener.ENTRY_TYPE_STRING, keyCode, " ");
|
||||
this.mContainer.onSpaceEntry();
|
||||
mInputListener.onEntry(InputListener.ENTRY_TYPE_STRING, keyCode, " ");
|
||||
mContainer.onSpaceEntry();
|
||||
return;
|
||||
case LeanbackKeyboardView.ASCII_PERIOD:
|
||||
this.mInputListener.onEntry(InputListener.ENTRY_TYPE_STRING, keyCode, text);
|
||||
this.mContainer.onPeriodEntry();
|
||||
mInputListener.onEntry(InputListener.ENTRY_TYPE_STRING, keyCode, text);
|
||||
mContainer.onPeriodEntry();
|
||||
return;
|
||||
case LeanbackKeyboardView.KEYCODE_LANG_TOGGLE:
|
||||
if (Log.isLoggable("LbKbController", Log.DEBUG)) {
|
||||
Log.d("LbKbController", "language change");
|
||||
}
|
||||
|
||||
mContainer.onLangKeyClick();
|
||||
return;
|
||||
default:
|
||||
this.mInputListener.onEntry(InputListener.ENTRY_TYPE_STRING, keyCode, text);
|
||||
this.mContainer.onTextEntry();
|
||||
if (this.mContainer.isMiniKeyboardOnScreen()) {
|
||||
this.mContainer.dismissMiniKeyboard();
|
||||
mInputListener.onEntry(InputListener.ENTRY_TYPE_STRING, keyCode, text);
|
||||
mContainer.onTextEntry();
|
||||
if (mContainer.isMiniKeyboardOnScreen()) {
|
||||
mContainer.dismissMiniKeyboard();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -349,16 +357,16 @@ public class LeanbackKeyboardController implements LeanbackKeyboardContainer.Voi
|
||||
handled = true;
|
||||
switch (keyCode) {
|
||||
case KeyEvent.KEYCODE_DPAD_UP:
|
||||
handled = onDirectionalMove(8);
|
||||
handled = onDirectionalMove(LeanbackKeyboardContainer.DIRECTION_UP);
|
||||
break;
|
||||
case KeyEvent.KEYCODE_DPAD_DOWN:
|
||||
handled = onDirectionalMove(2);
|
||||
handled = onDirectionalMove(LeanbackKeyboardContainer.DIRECTION_DOWN);
|
||||
break;
|
||||
case KeyEvent.KEYCODE_DPAD_LEFT:
|
||||
handled = onDirectionalMove(1);
|
||||
handled = onDirectionalMove(LeanbackKeyboardContainer.DIRECTION_LEFT);
|
||||
break;
|
||||
case KeyEvent.KEYCODE_DPAD_RIGHT:
|
||||
handled = onDirectionalMove(4);
|
||||
handled = onDirectionalMove(LeanbackKeyboardContainer.DIRECTION_RIGHT);
|
||||
break;
|
||||
case KeyEvent.KEYCODE_DPAD_CENTER:
|
||||
case KeyEvent.KEYCODE_ENTER:
|
||||
@@ -366,7 +374,7 @@ public class LeanbackKeyboardController implements LeanbackKeyboardContainer.Voi
|
||||
mMoveCount = 0;
|
||||
mKeyDownKeyFocus = new LeanbackKeyboardContainer.KeyFocus();
|
||||
mKeyDownKeyFocus.set(mContainer.getCurrFocus());
|
||||
} else if (eventRepeatCount == 1 && handleKeyLongPress(keyCode)) {
|
||||
} else if (eventRepeatCount == 1 && handleKeyLongPress(keyCode)) { // space long press handler and others
|
||||
mKeyDownKeyFocus = null;
|
||||
}
|
||||
|
||||
@@ -531,10 +539,10 @@ public class LeanbackKeyboardController implements LeanbackKeyboardContainer.Voi
|
||||
}
|
||||
|
||||
private boolean onDirectionalMove(int dir) {
|
||||
if (this.mContainer.getNextFocusInDirection(dir, this.mDownFocus, this.mTempFocus)) {
|
||||
this.mContainer.setFocus(this.mTempFocus);
|
||||
this.mDownFocus.set(this.mTempFocus);
|
||||
this.clearKeyIfNecessary();
|
||||
if (mContainer.getNextFocusInDirection(dir, mDownFocus, mTempFocus)) {
|
||||
mContainer.setFocus(mTempFocus);
|
||||
mDownFocus.set(mTempFocus);
|
||||
clearKeyIfNecessary();
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -609,7 +617,7 @@ public class LeanbackKeyboardController implements LeanbackKeyboardContainer.Voi
|
||||
mInputListener.onEntry(InputListener.ENTRY_TYPE_DISMISS, LeanbackKeyboardView.SHIFT_OFF, null);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public boolean onGenericMotionEvent(MotionEvent event) {
|
||||
return mSpaceTracker != null && mContext != null && mContext.isInputViewShown() && mSpaceTracker.onGenericMotionEvent(event);
|
||||
}
|
||||
@@ -639,58 +647,72 @@ public class LeanbackKeyboardController implements LeanbackKeyboardContainer.Voi
|
||||
* @return is event handled
|
||||
*/
|
||||
public boolean onKeyDown(int keyCode, KeyEvent event) {
|
||||
this.mDownFocus.set(this.mContainer.getCurrFocus());
|
||||
if (this.mSpaceTracker != null && this.mSpaceTracker.onKeyDown(keyCode, event)) {
|
||||
mDownFocus.set(mContainer.getCurrFocus());
|
||||
if (mSpaceTracker != null && mSpaceTracker.onKeyDown(keyCode, event)) {
|
||||
return true;
|
||||
} else {
|
||||
if (this.isEnterKey(keyCode)) {
|
||||
this.mKeyDownReceived = true;
|
||||
if (isEnterKey(keyCode)) {
|
||||
mKeyDownReceived = true;
|
||||
if (event.getRepeatCount() == 0) {
|
||||
this.mContainer.setTouchState(LeanbackKeyboardContainer.TOUCH_STATE_CLICK);
|
||||
mContainer.setTouchState(LeanbackKeyboardContainer.TOUCH_STATE_CLICK);
|
||||
}
|
||||
}
|
||||
|
||||
return this.handleKeyDownEvent(keyCode, event.getRepeatCount());
|
||||
return handleKeyDownEvent(keyCode, event.getRepeatCount());
|
||||
}
|
||||
}
|
||||
|
||||
public boolean onKeyUp(int var1, KeyEvent var2) {
|
||||
if (this.mSpaceTracker != null && this.mSpaceTracker.onKeyUp(var1, var2)) {
|
||||
public boolean onKeyUp(int keyCode, KeyEvent keyEvent) {
|
||||
if (mSpaceTracker != null && mSpaceTracker.onKeyUp(keyCode, keyEvent)) {
|
||||
return true;
|
||||
} else {
|
||||
if (this.isEnterKey(var1)) {
|
||||
if (!this.mKeyDownReceived || this.mLongPressHandled) {
|
||||
this.mLongPressHandled = false;
|
||||
if (isEnterKey(keyCode)) {
|
||||
if (!mKeyDownReceived || mLongPressHandled) {
|
||||
mLongPressHandled = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
this.mKeyDownReceived = false;
|
||||
if (this.mContainer.getTouchState() == 3) {
|
||||
this.mContainer.setTouchState(1);
|
||||
mKeyDownReceived = false;
|
||||
if (mContainer.getTouchState() == 3) {
|
||||
mContainer.setTouchState(1);
|
||||
}
|
||||
}
|
||||
|
||||
return this.handleKeyUpEvent(var1, var2.getEventTime());
|
||||
return handleKeyUpEvent(keyCode, keyEvent.getEventTime());
|
||||
}
|
||||
}
|
||||
|
||||
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)) {
|
||||
|
||||
@@ -24,7 +24,14 @@ import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
public class LeanbackKeyboardView extends FrameLayout {
|
||||
public static final int ASCII_PERIOD = 46;
|
||||
/**
|
||||
* space key index (important: wrong value will broke navigation)
|
||||
*/
|
||||
public static final int ASCII_PERIOD = 47;
|
||||
/**
|
||||
* keys count among which space key spans (important: wrong value will broke navigation)
|
||||
*/
|
||||
public static final int ASCII_PERIOD_LEN = 6;
|
||||
public static final int ASCII_SPACE = 32;
|
||||
private static final boolean DEBUG = false;
|
||||
public static final int KEYCODE_CAPS_LOCK = -6;
|
||||
@@ -35,6 +42,7 @@ public class LeanbackKeyboardView extends FrameLayout {
|
||||
public static final int KEYCODE_SHIFT = -1;
|
||||
public static final int KEYCODE_SYM_TOGGLE = -2;
|
||||
public static final int KEYCODE_VOICE = -7;
|
||||
public static final int KEYCODE_LANG_TOGGLE = -9;
|
||||
private static final int NOT_A_KEY = -1;
|
||||
public static final int SHIFT_LOCKED = 2;
|
||||
public static final int SHIFT_OFF = 0;
|
||||
@@ -260,6 +268,8 @@ public class LeanbackKeyboardView extends FrameLayout {
|
||||
|
||||
/**
|
||||
* Get index of the key under cursor
|
||||
* <br/>
|
||||
* Resulted index depends on the space key position
|
||||
* @param x x position
|
||||
* @param y y position
|
||||
* @return index of the key
|
||||
@@ -296,16 +306,16 @@ public class LeanbackKeyboardView extends FrameLayout {
|
||||
|
||||
indexFull += mColCount * result;
|
||||
result = indexFull;
|
||||
if (indexFull > ASCII_PERIOD) {
|
||||
if (indexFull > ASCII_PERIOD) { // key goes beyond space
|
||||
result = indexFull;
|
||||
if (indexFull < 53) {
|
||||
if (indexFull < (ASCII_PERIOD + ASCII_PERIOD_LEN)) { // key stays within space boundary
|
||||
result = ASCII_PERIOD;
|
||||
}
|
||||
}
|
||||
|
||||
indexFull = result;
|
||||
if (result >= 53) {
|
||||
indexFull = result - 6;
|
||||
if (result >= (ASCII_PERIOD + ASCII_PERIOD_LEN)) { // is key position after space?
|
||||
indexFull = result - ASCII_PERIOD_LEN + 1;
|
||||
}
|
||||
|
||||
if (indexFull < 0) {
|
||||
|
||||
@@ -56,7 +56,6 @@ public class LeanbackImeService extends InputMethodService {
|
||||
if (!this.enableHardwareAcceleration()) {
|
||||
Log.w("LbImeService", "Could not enable hardware acceleration");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void clearSuggestionsDelayed() {
|
||||
@@ -225,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();
|
||||
}
|
||||
@@ -247,7 +250,7 @@ public class LeanbackImeService extends InputMethodService {
|
||||
}
|
||||
|
||||
public void onHideIme() {
|
||||
this.requestHideSelf(0);
|
||||
requestHideSelf(InputMethodService.BACK_DISPOSITION_DEFAULT);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -267,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) {
|
||||
@@ -299,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()) {
|
||||
|
||||
@@ -0,0 +1,133 @@
|
||||
package com.liskovsoft.inputchooser;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.annotation.TargetApi;
|
||||
import android.app.AlertDialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.DialogInterface.OnDismissListener;
|
||||
import android.content.res.TypedArray;
|
||||
import android.util.TypedValue;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.CheckedTextView;
|
||||
import com.liskovsoft.keyboardaddons.KeyboardInfo;
|
||||
import com.liskovsoft.keyboardaddons.reslangfactory.ResKeyboardInfo;
|
||||
import com.liskovsoft.leankeykeyboard.R;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class ChooseKeyboardDialog implements OnClickListener {
|
||||
private final View mInputView;
|
||||
private final Context mContext;
|
||||
private final List<KeyboardInfo> mInfos;
|
||||
private AlertDialog alertDialog;
|
||||
private ArrayList<CheckedTextView> mLangViews;
|
||||
|
||||
/**
|
||||
* Main constructor. Use it in most of the cases.
|
||||
* @param ctx context
|
||||
*/
|
||||
public ChooseKeyboardDialog(Context ctx) {
|
||||
this(ctx, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Special constructor. Useful when others didn't work. E.g. when running dialog within input method.
|
||||
* @param ctx context
|
||||
* @param inputView view to get token
|
||||
*/
|
||||
public ChooseKeyboardDialog(Context ctx, View inputView) {
|
||||
mContext = ctx;
|
||||
mInfos = ResKeyboardInfo.getAllKeyboardInfos(ctx);
|
||||
mInputView = inputView;
|
||||
}
|
||||
|
||||
public void run() {
|
||||
showDialog();
|
||||
}
|
||||
|
||||
@TargetApi(17)
|
||||
private void showDialog() {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(mContext);
|
||||
View title = LayoutInflater.from(mContext).inflate(R.layout.lang_selection_dialog_title, null);
|
||||
alertDialog = builder
|
||||
//.setTitle(R.string.language_dialog_title)
|
||||
.setCustomTitle(title)
|
||||
.setView(buildView(builder.getContext()))
|
||||
.setOnDismissListener(new OnDismissListener() {
|
||||
@Override
|
||||
public void onDismiss(DialogInterface dialogInterface) {
|
||||
ResKeyboardInfo.updateAllKeyboardInfos(mContext, mInfos);
|
||||
}
|
||||
})
|
||||
.create();
|
||||
if (mInputView != null) {
|
||||
initDialog(); // prepare to run from IME
|
||||
}
|
||||
alertDialog.show();
|
||||
}
|
||||
|
||||
private void initDialog() {
|
||||
Window window = alertDialog.getWindow();
|
||||
WindowManager.LayoutParams lp = window.getAttributes();
|
||||
lp.token = mInputView.getWindowToken();
|
||||
lp.type = WindowManager.LayoutParams.TYPE_APPLICATION_ATTACHED_DIALOG;
|
||||
window.setAttributes(lp);
|
||||
window.addFlags(WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM);
|
||||
}
|
||||
|
||||
@SuppressLint("InflateParams")
|
||||
private View buildView(Context context) {
|
||||
LayoutInflater inflater = LayoutInflater.from(context);
|
||||
View view = inflater.inflate(R.layout.lang_selection_dialog, null);
|
||||
ViewGroup root = view.findViewById(R.id.root);
|
||||
|
||||
TypedArray attributeArray = context.getTheme().obtainStyledAttributes(new int[]{android.R.attr.selectableItemBackground});
|
||||
int selectableItemBackgroundResourceId = attributeArray.getResourceId(0, 0);
|
||||
attributeArray.recycle();
|
||||
|
||||
mLangViews = new ArrayList<>();
|
||||
|
||||
for (KeyboardInfo info : mInfos) {
|
||||
CheckedTextView langView = (CheckedTextView) inflater.inflate(android.R.layout.simple_list_item_multiple_choice, root, false);
|
||||
langView.setBackgroundResource(selectableItemBackgroundResourceId);
|
||||
langView.setText(info.getLangName());
|
||||
|
||||
langView.setFocusable(true);
|
||||
langView.setTag(info); // our TAG
|
||||
langView.setTextSize(TypedValue.COMPLEX_UNIT_PX, mContext.getResources().getDimension(R.dimen.text_size_dp));
|
||||
langView.setOnClickListener(this);
|
||||
mLangViews.add(langView);
|
||||
root.addView(langView);
|
||||
}
|
||||
|
||||
updateViews();
|
||||
|
||||
return view;
|
||||
}
|
||||
|
||||
private void updateViews() {
|
||||
for (CheckedTextView view : mLangViews) {
|
||||
KeyboardInfo kbd = (KeyboardInfo) view.getTag();
|
||||
if (kbd.isEnabled()) {
|
||||
view.setChecked(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
KeyboardInfo kbd = (KeyboardInfo) view.getTag();
|
||||
// todo
|
||||
CheckedTextView checkedView = (CheckedTextView) view;
|
||||
boolean checked = checkedView.isChecked();
|
||||
kbd.setEnabled(!checked);
|
||||
checkedView.setChecked(!checked);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.liskovsoft.inputchooser;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.preference.PreferenceManager;
|
||||
|
||||
public final class LeanKeyPreferences {
|
||||
private static final String APP_RUN_ONCE = "appRunOnce";
|
||||
private static LeanKeyPreferences sInstance;
|
||||
private final Context mContext;
|
||||
private SharedPreferences mPrefs;
|
||||
|
||||
public static LeanKeyPreferences instance(Context ctx) {
|
||||
if (sInstance == null)
|
||||
sInstance = new LeanKeyPreferences(ctx);
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
public LeanKeyPreferences(Context context) {
|
||||
mContext = context.getApplicationContext();
|
||||
mPrefs = PreferenceManager.getDefaultSharedPreferences(mContext);
|
||||
}
|
||||
|
||||
public boolean isRunOnce() {
|
||||
return mPrefs.getBoolean(APP_RUN_ONCE, false);
|
||||
}
|
||||
|
||||
public void setRunOnce(boolean runOnce) {
|
||||
mPrefs.edit()
|
||||
.putBoolean(APP_RUN_ONCE, runOnce)
|
||||
.apply();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
/*
|
||||
* Copyright (C) 2008 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
// Useful links:
|
||||
// https://android.googlesource.com/platform/frameworks/base/+/de47f1c358c8186ff3e14b887d5869f69b9a9d6c/core/java/com/android/internal/widget/DialogTitle.java
|
||||
// com.android.internal.widget.DialogTitle: https://android.googlesource.com/platform/frameworks/base/+/master/core/res/res/layout/alert_dialog.xml
|
||||
// https://android.googlesource.com/platform/frameworks/base.git/+/master/core/java/com/android/internal/app/AlertController.java
|
||||
// <declare-styleable name="TextAppearance">: https://github.com/aosp-mirror/platform_frameworks_base/blob/master/core/res/res/values/attrs.xml
|
||||
|
||||
|
||||
package com.liskovsoft.inputchooser.widgets;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.TypedArray;
|
||||
import android.text.Layout;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.TypedValue;
|
||||
import com.liskovsoft.leankeykeyboard.R;
|
||||
|
||||
/**
|
||||
* Used by dialogs to change the font size and number of lines to try to fit
|
||||
* the text to the available space.
|
||||
*/
|
||||
public class DialogTitle extends android.support.v7.widget.AppCompatTextView {
|
||||
|
||||
public DialogTitle(Context context, AttributeSet attrs,
|
||||
int defStyle) {
|
||||
super(context, attrs, defStyle);
|
||||
}
|
||||
public DialogTitle(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
}
|
||||
public DialogTitle(Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
||||
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
|
||||
final Layout layout = getLayout();
|
||||
if (layout != null) {
|
||||
final int lineCount = layout.getLineCount();
|
||||
if (lineCount > 0) {
|
||||
final int ellipsisCount = layout.getEllipsisCount(lineCount - 1);
|
||||
if (ellipsisCount > 0) {
|
||||
setSingleLine(false);
|
||||
|
||||
TypedArray a = getContext().obtainStyledAttributes(null,
|
||||
R.styleable.TextAppearance,
|
||||
android.R.attr.textAppearanceMedium,
|
||||
android.R.style.TextAppearance_Medium);
|
||||
final int textSize = a.getDimensionPixelSize(
|
||||
R.styleable.TextAppearance_textSize,
|
||||
(int) (20 * getResources().getDisplayMetrics().density));
|
||||
final int textColor = a.getColor(
|
||||
R.styleable.TextAppearance_textColor, 0xffffffff);
|
||||
// textSize is already expressed in pixels
|
||||
setTextSize(TypedValue.COMPLEX_UNIT_PX, textSize);
|
||||
setTextColor(textColor);
|
||||
setMaxLines(2);
|
||||
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.liskovsoft.keyboardaddons;
|
||||
|
||||
import android.inputmethodservice.Keyboard;
|
||||
import android.support.annotation.Nullable;
|
||||
|
||||
public interface KeyboardBuilder {
|
||||
@Nullable
|
||||
Keyboard createKeyboard();
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.liskovsoft.keyboardaddons;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface KeyboardFactory {
|
||||
List<? extends KeyboardBuilder> getAllAvailableKeyboards(Context context);
|
||||
boolean needUpdate();
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.liskovsoft.keyboardaddons;
|
||||
|
||||
public interface KeyboardInfo {
|
||||
boolean isEnabled();
|
||||
String getLangCode();
|
||||
String getLangName();
|
||||
void setLangName(String langName);
|
||||
void setLangCode(String langCode);
|
||||
void setEnabled(boolean enabled);
|
||||
}
|
||||
@@ -2,8 +2,7 @@ package com.liskovsoft.keyboardaddons;
|
||||
|
||||
import android.content.Context;
|
||||
import android.inputmethodservice.Keyboard;
|
||||
import com.liskovsoft.keyboardaddons.apklangfactory.keyboards.KeyboardAddOnAndBuilder;
|
||||
import com.liskovsoft.keyboardaddons.apklangfactory.keyboards.ApkLangKeyboardFactory;
|
||||
import com.liskovsoft.keyboardaddons.reslangfactory.ResKeyboardFactory;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -11,9 +10,9 @@ import java.util.List;
|
||||
public class KeyboardManager {
|
||||
private final Keyboard mEnglishKeyboard;
|
||||
private final Context mContext;
|
||||
private final List<KeyboardAddOnAndBuilder> mKeyboardBuilders;
|
||||
private final List<Keyboard> mAllKeyboards;
|
||||
private final ApkLangKeyboardFactory mKeyboardFactory;
|
||||
private List<? extends KeyboardBuilder> mKeyboardBuilders;
|
||||
private List<Keyboard> mAllKeyboards;
|
||||
private KeyboardFactory mKeyboardFactory;
|
||||
private int mKeyboardIndex = 0;
|
||||
|
||||
public KeyboardManager(Context ctx, int keyboardResId) {
|
||||
@@ -23,8 +22,11 @@ public class KeyboardManager {
|
||||
public KeyboardManager(Context ctx, Keyboard englishKeyboard) {
|
||||
mContext = ctx;
|
||||
mEnglishKeyboard = englishKeyboard;
|
||||
mKeyboardFactory = new ApkLangKeyboardFactory();
|
||||
init();
|
||||
}
|
||||
|
||||
private void init() {
|
||||
mKeyboardFactory = new ResKeyboardFactory(mContext);
|
||||
mKeyboardBuilders = mKeyboardFactory.getAllAvailableKeyboards(mContext);
|
||||
mAllKeyboards = buildAllKeyboards();
|
||||
}
|
||||
@@ -33,7 +35,7 @@ public class KeyboardManager {
|
||||
List<Keyboard> keyboards = new ArrayList<>();
|
||||
keyboards.add(mEnglishKeyboard);
|
||||
if (!mKeyboardBuilders.isEmpty()) {
|
||||
for (KeyboardAddOnAndBuilder builder : mKeyboardBuilders) {
|
||||
for (KeyboardBuilder builder : mKeyboardBuilders) {
|
||||
keyboards.add(builder.createKeyboard());
|
||||
}
|
||||
}
|
||||
@@ -45,7 +47,10 @@ public class KeyboardManager {
|
||||
* @return keyboard
|
||||
*/
|
||||
public Keyboard getNextKeyboard() {
|
||||
++mKeyboardIndex;
|
||||
if (mKeyboardFactory.needUpdate()) {
|
||||
init();
|
||||
}
|
||||
|
||||
mKeyboardIndex = mKeyboardIndex < mAllKeyboards.size() ? mKeyboardIndex : 0;
|
||||
|
||||
Keyboard kbd = mAllKeyboards.get(mKeyboardIndex);
|
||||
@@ -53,6 +58,8 @@ public class KeyboardManager {
|
||||
throw new IllegalStateException(String.format("Keyboard %s not initialized", mKeyboardIndex));
|
||||
}
|
||||
|
||||
++mKeyboardIndex;
|
||||
|
||||
return kbd;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,24 +67,6 @@ public abstract class AddOnsFactory<E extends AddOn> {
|
||||
|
||||
private static final String sTAG = "AddOnsFactory";
|
||||
|
||||
//public static void onPackageChanged(final Intent eventIntent, final AnySoftKeyboard ask) {
|
||||
// boolean cleared = false;
|
||||
// boolean recreateView = false;
|
||||
// for (AddOnsFactory<?> factory : mActiveInstances) {
|
||||
// try {
|
||||
// if (factory.isEventRequiresCacheRefresh(eventIntent, ask.getApplicationContext())) {
|
||||
// cleared = true;
|
||||
// if (factory.isEventRequiresViewReset(eventIntent, ask.getApplicationContext())) recreateView = true;
|
||||
// Logger.d(sTAG, factory.getClass().getName() + " will handle this package-changed event. Also recreate view? " + recreateView);
|
||||
// factory.clearAddOnList();
|
||||
// }
|
||||
// } catch (NameNotFoundException e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// }
|
||||
// if (cleared) ask.resetKeyboardView(recreateView);
|
||||
//}
|
||||
|
||||
public static AddOn locateAddOn(String id, Context askContext) {
|
||||
for (AddOnsFactory<?> factory : mActiveInstances) {
|
||||
AddOn addOn = factory.getAddOnById(id, askContext);
|
||||
|
||||
@@ -19,31 +19,31 @@ package com.liskovsoft.keyboardaddons.apklangfactory.keyboards;
|
||||
import android.content.Context;
|
||||
import android.support.annotation.Nullable;
|
||||
|
||||
import com.liskovsoft.keyboardaddons.KeyboardBuilder;
|
||||
import com.liskovsoft.keyboardaddons.apklangfactory.addons.AddOn;
|
||||
import com.liskovsoft.keyboardaddons.apklangfactory.addons.AddOnImpl;
|
||||
|
||||
public class KeyboardAddOnAndBuilder extends AddOnImpl {
|
||||
public class ApkKeyboardAddOnAndBuilder extends AddOnImpl implements KeyboardBuilder {
|
||||
|
||||
public static final String KEYBOARD_PREF_PREFIX = "keyboard_";
|
||||
|
||||
private final int mResId;
|
||||
private final int mLandscapeResId;
|
||||
//private final int mIconResId;
|
||||
private final String mDefaultDictionary;
|
||||
private final int mQwertyTranslationId;
|
||||
private final String mAdditionalIsLetterExceptions;
|
||||
private final String mSentenceSeparators;
|
||||
private final boolean mKeyboardDefaultEnabled;
|
||||
|
||||
public KeyboardAddOnAndBuilder(Context askContext, Context packageContext, String id, int nameResId,
|
||||
int layoutResId, int landscapeLayoutResId,
|
||||
String defaultDictionary, int iconResId,
|
||||
int physicalTranslationResId,
|
||||
String additionalIsLetterExceptions,
|
||||
String sentenceSeparators,
|
||||
String description,
|
||||
int keyboardIndex,
|
||||
boolean keyboardDefaultEnabled) {
|
||||
public ApkKeyboardAddOnAndBuilder(Context askContext, Context packageContext, String id, int nameResId,
|
||||
int layoutResId, int landscapeLayoutResId,
|
||||
String defaultDictionary, int iconResId,
|
||||
int physicalTranslationResId,
|
||||
String additionalIsLetterExceptions,
|
||||
String sentenceSeparators,
|
||||
String description,
|
||||
int keyboardIndex,
|
||||
boolean keyboardDefaultEnabled) {
|
||||
super(askContext, packageContext, KEYBOARD_PREF_PREFIX + id, nameResId, description, keyboardIndex);
|
||||
|
||||
mResId = layoutResId;
|
||||
@@ -74,16 +74,10 @@ public class KeyboardAddOnAndBuilder extends AddOnImpl {
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public android.inputmethodservice.Keyboard createKeyboard() {
|
||||
Context remoteContext = getPackageContext();
|
||||
if (remoteContext == null) return null;
|
||||
return new android.inputmethodservice.Keyboard(remoteContext, mLandscapeResId);
|
||||
}
|
||||
|
||||
//@Nullable
|
||||
//public android.inputmethodservice.Keyboard createKeyboard(Context askContext, @Keyboard.KeyboardRowModeId int mode) {
|
||||
// Context remoteContext = getPackageContext();
|
||||
// if (remoteContext == null) return null;
|
||||
// return new ExternalAnyKeyboard(this, askContext, remoteContext, mResId, mLandscapeResId, getId(), getName(), mIconResId, mQwertyTranslationId, mDefaultDictionary, mAdditionalIsLetterExceptions, mSentenceSeparators, mode);
|
||||
//}
|
||||
}
|
||||
@@ -23,6 +23,8 @@ import android.preference.PreferenceManager;
|
||||
import android.text.TextUtils;
|
||||
import android.util.AttributeSet;
|
||||
|
||||
import com.liskovsoft.keyboardaddons.KeyboardBuilder;
|
||||
import com.liskovsoft.keyboardaddons.KeyboardFactory;
|
||||
import com.liskovsoft.keyboardaddons.apklangfactory.addons.AddOn;
|
||||
import com.liskovsoft.keyboardaddons.apklangfactory.addons.AddOnsFactory;
|
||||
import com.liskovsoft.keyboardaddons.apklangfactory.utils.Logger;
|
||||
@@ -31,7 +33,7 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public class ApkLangKeyboardFactory extends AddOnsFactory<KeyboardAddOnAndBuilder> {
|
||||
public class ApkLangKeyboardFactory extends AddOnsFactory<ApkKeyboardAddOnAndBuilder> implements KeyboardFactory {
|
||||
private static final String TAG = "ASK_KF";
|
||||
|
||||
private static final String XML_LAYOUT_RES_ID_ATTRIBUTE = "layoutResId";
|
||||
@@ -50,20 +52,27 @@ public class ApkLangKeyboardFactory extends AddOnsFactory<KeyboardAddOnAndBuilde
|
||||
0, true);
|
||||
}
|
||||
|
||||
public List<KeyboardAddOnAndBuilder> getAllAvailableKeyboards(Context askContext) {
|
||||
return getAllAddOns(askContext);
|
||||
@Override
|
||||
public List<? extends KeyboardBuilder> getAllAvailableKeyboards(Context context) {
|
||||
return getAllAddOns(context);
|
||||
}
|
||||
|
||||
public List<KeyboardAddOnAndBuilder> getEnabledKeyboards(Context askContext) {
|
||||
final List<KeyboardAddOnAndBuilder> allAddOns = getAllAddOns(askContext);
|
||||
@Override
|
||||
public boolean needUpdate() {
|
||||
// TODO: implement need update
|
||||
return false;
|
||||
}
|
||||
|
||||
public List<ApkKeyboardAddOnAndBuilder> getEnabledKeyboards(Context askContext) {
|
||||
final List<ApkKeyboardAddOnAndBuilder> allAddOns = getAllAddOns(askContext);
|
||||
Logger.i(TAG, "Creating enabled addons list. I have a total of " + allAddOns.size() + " addons");
|
||||
|
||||
//getting shared prefs to determine which to create.
|
||||
final SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(askContext);
|
||||
|
||||
final ArrayList<KeyboardAddOnAndBuilder> enabledAddOns = new ArrayList<>();
|
||||
final ArrayList<ApkKeyboardAddOnAndBuilder> enabledAddOns = new ArrayList<>();
|
||||
for (int addOnIndex = 0; addOnIndex < allAddOns.size(); addOnIndex++) {
|
||||
final KeyboardAddOnAndBuilder addOn = allAddOns.get(addOnIndex);
|
||||
final ApkKeyboardAddOnAndBuilder addOn = allAddOns.get(addOnIndex);
|
||||
|
||||
final boolean addOnEnabled = sharedPreferences.getBoolean(addOn.getId(), addOn.getKeyboardDefaultEnabled());
|
||||
|
||||
@@ -76,13 +85,13 @@ public class ApkLangKeyboardFactory extends AddOnsFactory<KeyboardAddOnAndBuilde
|
||||
// Check if there is any keyboards created if not, lets create a default english keyboard
|
||||
if (enabledAddOns.size() == 0) {
|
||||
final SharedPreferences.Editor editor = sharedPreferences.edit();
|
||||
final KeyboardAddOnAndBuilder addOn = allAddOns.get(0);
|
||||
final ApkKeyboardAddOnAndBuilder addOn = allAddOns.get(0);
|
||||
editor.putBoolean(addOn.getId(), true);
|
||||
editor.commit();
|
||||
enabledAddOns.add(addOn);
|
||||
}
|
||||
|
||||
for (final KeyboardAddOnAndBuilder addOn : enabledAddOns) {
|
||||
for (final ApkKeyboardAddOnAndBuilder addOn : enabledAddOns) {
|
||||
Logger.d(TAG, "Factory provided addon: %s", addOn.getId());
|
||||
}
|
||||
|
||||
@@ -90,7 +99,7 @@ public class ApkLangKeyboardFactory extends AddOnsFactory<KeyboardAddOnAndBuilde
|
||||
}
|
||||
|
||||
@Override
|
||||
protected KeyboardAddOnAndBuilder createConcreteAddOn(Context askContext, Context context, String prefId, int nameId, String description, int sortIndex, AttributeSet attrs) {
|
||||
protected ApkKeyboardAddOnAndBuilder createConcreteAddOn(Context askContext, Context context, String prefId, int nameId, String description, int sortIndex, AttributeSet attrs) {
|
||||
final int layoutResId = attrs.getAttributeResourceValue(null, XML_LAYOUT_RES_ID_ATTRIBUTE, AddOn.INVALID_RES_ID);
|
||||
final int landscapeLayoutResId = attrs.getAttributeResourceValue(null, XML_LANDSCAPE_LAYOUT_RES_ID_ATTRIBUTE, AddOn.INVALID_RES_ID);
|
||||
//final int iconResId = attrs.getAttributeResourceValue(null, XML_ICON_RES_ID_ATTRIBUTE, R.drawable.sym_keyboard_notification_icon);
|
||||
@@ -114,7 +123,7 @@ public class ApkLangKeyboardFactory extends AddOnsFactory<KeyboardAddOnAndBuilde
|
||||
+ " landscapeResId:" + landscapeLayoutResId
|
||||
+ " iconResId:" + iconResId + " defaultDictionary:"
|
||||
+ defaultDictionary);
|
||||
return new KeyboardAddOnAndBuilder(askContext, context,
|
||||
return new ApkKeyboardAddOnAndBuilder(askContext, context,
|
||||
prefId, nameId, layoutResId, landscapeLayoutResId,
|
||||
defaultDictionary, iconResId, physicalTranslationResId,
|
||||
additionalIsLetterExceptions, sentenceSeparators,
|
||||
@@ -127,7 +136,7 @@ public class ApkLangKeyboardFactory extends AddOnsFactory<KeyboardAddOnAndBuilde
|
||||
}
|
||||
|
||||
public Keyboard createKeyboard(Context context) {
|
||||
List<KeyboardAddOnAndBuilder> keyboardBuilders = getAllAvailableKeyboards(context);
|
||||
List<? extends KeyboardBuilder> keyboardBuilders = getAllAvailableKeyboards(context);
|
||||
if (keyboardBuilders.size() == 0)
|
||||
return new Keyboard(context, 0x7f04000c); // ru keyboard resource id
|
||||
// remember, only one external keyboard supported
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.liskovsoft.keyboardaddons.reslangfactory;
|
||||
|
||||
import android.inputmethodservice.Keyboard;
|
||||
import android.support.annotation.Nullable;
|
||||
import com.liskovsoft.keyboardaddons.KeyboardBuilder;
|
||||
|
||||
public class ResKeyboardBuilder implements KeyboardBuilder {
|
||||
@Nullable
|
||||
@Override
|
||||
public Keyboard createKeyboard() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.liskovsoft.keyboardaddons.reslangfactory;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
import android.inputmethodservice.Keyboard;
|
||||
import android.support.annotation.Nullable;
|
||||
import com.liskovsoft.keyboardaddons.KeyboardBuilder;
|
||||
import com.liskovsoft.keyboardaddons.KeyboardFactory;
|
||||
import com.liskovsoft.keyboardaddons.KeyboardInfo;
|
||||
import com.liskovsoft.leankeykeyboard.R;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class ResKeyboardFactory implements KeyboardFactory {
|
||||
private final Context mContext;
|
||||
|
||||
public ResKeyboardFactory(Context ctx) {
|
||||
mContext = ctx;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends KeyboardBuilder> getAllAvailableKeyboards(Context context) {
|
||||
List<KeyboardBuilder> result = new ArrayList<>();
|
||||
|
||||
List<KeyboardInfo> infos = ResKeyboardInfo.getAllKeyboardInfos(context);
|
||||
final Resources resources = mContext.getResources();
|
||||
|
||||
for (final KeyboardInfo info : infos) {
|
||||
if (!info.isEnabled()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
result.add(new KeyboardBuilder() {
|
||||
@Nullable
|
||||
@Override
|
||||
public Keyboard createKeyboard() {
|
||||
return new Keyboard(mContext, resources.getIdentifier("qwerty_" + info.getLangCode(), "xml", mContext.getPackageName()));
|
||||
}
|
||||
});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean needUpdate() {
|
||||
return ResKeyboardInfo.needUpdate();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
package com.liskovsoft.keyboardaddons.reslangfactory;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.preference.PreferenceManager;
|
||||
import com.liskovsoft.keyboardaddons.KeyboardInfo;
|
||||
import com.liskovsoft.leankeykeyboard.R;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class ResKeyboardInfo implements KeyboardInfo {
|
||||
private static boolean sNeedUpdate;
|
||||
private boolean mEnabled;
|
||||
private String mLangCode;
|
||||
private String mLangName;
|
||||
|
||||
public static List<KeyboardInfo> getAllKeyboardInfos(Context ctx) {
|
||||
List<KeyboardInfo> result = new ArrayList<>();
|
||||
String[] langs = ctx.getResources().getStringArray(R.array.additional_languages);
|
||||
for (final String langPair : langs) {
|
||||
String[] pairs = langPair.split("\\|");
|
||||
final String langName = pairs[0];
|
||||
final String langCode = pairs[1];
|
||||
KeyboardInfo info = new ResKeyboardInfo();
|
||||
info.setLangName(langName);
|
||||
info.setLangCode(langCode);
|
||||
// sync with prefs
|
||||
syncWithPrefs(ctx, info);
|
||||
result.add(info);
|
||||
}
|
||||
sNeedUpdate = false;
|
||||
return result;
|
||||
}
|
||||
|
||||
public static void updateAllKeyboardInfos(Context ctx, List<KeyboardInfo> infos) {
|
||||
for (KeyboardInfo info : infos) {
|
||||
// update prefs
|
||||
updatePrefs(ctx, info);
|
||||
}
|
||||
sNeedUpdate = true;
|
||||
}
|
||||
|
||||
private static void syncWithPrefs(Context ctx, KeyboardInfo info) {
|
||||
final SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(ctx);
|
||||
final boolean kbdEnabled = sharedPreferences.getBoolean(info.getLangCode(), false);
|
||||
info.setEnabled(kbdEnabled);
|
||||
}
|
||||
|
||||
private static void updatePrefs(Context ctx, KeyboardInfo info) {
|
||||
final SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(ctx);
|
||||
|
||||
final SharedPreferences.Editor editor = sharedPreferences.edit();
|
||||
editor.putBoolean(info.getLangCode(), info.isEnabled());
|
||||
editor.apply();
|
||||
}
|
||||
|
||||
public static boolean needUpdate() {
|
||||
return sNeedUpdate;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEnabled() {
|
||||
return mEnabled;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getLangCode() {
|
||||
return mLangCode;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getLangName() {
|
||||
return mLangName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setLangName(String langName) {
|
||||
mLangName = langName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setLangCode(String langCode) {
|
||||
mLangCode = langCode;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setEnabled(boolean enabled) {
|
||||
mEnabled = enabled;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.liskovsoft.keyboardaddons.reslangfactory;
|
||||
|
||||
import com.liskovsoft.keyboardaddons.KeyboardInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ResKeyboardManager {
|
||||
public List<KeyboardInfo> getAllKeyboardInfos() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
BIN
leankeykeyboard/src/main/res/drawable-hdpi-v4/ic_ime_world.png
Normal file
|
After Width: | Height: | Size: 1010 B |
|
Before Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 2.3 KiB |
BIN
leankeykeyboard/src/main/res/drawable-mdpi-v4/ic_ime_world.png
Normal file
|
After Width: | Height: | Size: 555 B |
BIN
leankeykeyboard/src/main/res/drawable-nodpi-v4/ic_ime_space.png
Normal file
|
After Width: | Height: | Size: 371 B |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 2.5 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 2.3 KiB |
BIN
leankeykeyboard/src/main/res/drawable-xhdpi-v4/ic_ime_world.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 2.3 KiB |
BIN
leankeykeyboard/src/main/res/drawable-xxhdpi-v4/ic_ime_world.png
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Copyright (C) 2016 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout android:id="@+id/root"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
</ScrollView>
|
||||
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Useful links: -->
|
||||
<!-- com.android.internal.widget.DialogTitle: https://android.googlesource.com/platform/frameworks/base/+/master/core/res/res/layout/alert_dialog.xml -->
|
||||
<!-- <declare-styleable name="TextAppearance">: https://github.com/aosp-mirror/platform_frameworks_base/blob/master/core/res/res/values/attrs.xml -->
|
||||
<!-- https://android.googlesource.com/platform/frameworks/base/+/de47f1c358c8186ff3e14b887d5869f69b9a9d6c/core/java/com/android/internal/widget/DialogTitle.java -->
|
||||
<!-- https://android.googlesource.com/platform/frameworks/base.git/+/master/core/java/com/android/internal/app/AlertController.java -->
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/title_template"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="10dip">
|
||||
<!-- Use the same widget as used in AlertDialog -->
|
||||
<TextView android:id="@+id/alertTitle1"
|
||||
android:text="@string/language_dialog_title"
|
||||
style="?android:attr/textAppearanceLarge"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxLines="1"/>
|
||||
<TextView android:id="@+id/alertTitle2"
|
||||
android:text="@string/language_dialog_subtitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxLines="1"/>
|
||||
</LinearLayout>
|
||||
@@ -12,4 +12,19 @@
|
||||
<item>1.2</item>
|
||||
<item>1.4</item>
|
||||
</string-array>
|
||||
<string-array name="additional_languages">
|
||||
<item>Russian|ru</item>
|
||||
<item>Ukrainian|uk</item>
|
||||
<item>Thai|th</item>
|
||||
<item>Hebrew|he</item>
|
||||
<item>Arabic|ar</item>
|
||||
<item>Bulgarian|bg</item>
|
||||
<item>Dutch|nl</item>
|
||||
<item>French|fr</item>
|
||||
<item>German|de</item>
|
||||
<item>Greek|el</item>
|
||||
<item>Italian|it</item>
|
||||
<item>Persian|fa</item>
|
||||
<item>Turkish|tr</item>
|
||||
</string-array>
|
||||
</resources>
|
||||
|
||||
@@ -2,7 +2,12 @@
|
||||
<resources>
|
||||
<dimen name="key_height">28.0dip</dimen>
|
||||
<dimen name="key_width">28.0dip</dimen>
|
||||
<dimen name="space_key_width">268.0dip</dimen>
|
||||
<!--
|
||||
NOTE: don't change space size unless you've setup constants here:
|
||||
LeanbackKeyboardView.ASCII_PERIOD, LeanbackKeyboardView.ASCII_PERIOD_LEN
|
||||
Old space width: 268.0dip
|
||||
-->
|
||||
<dimen name="space_key_width">230.0dip</dimen>
|
||||
<dimen name="keyboard_horizontal_gap">12.0dip</dimen>
|
||||
<dimen name="keyboard_vertical_gap">8.0dip</dimen>
|
||||
<dimen name="recognizer_size">96.0dip</dimen>
|
||||
@@ -22,4 +27,6 @@
|
||||
<dimen name="key_font_size">18.0sp</dimen>
|
||||
<dimen name="function_key_mode_change_font_size">16.0sp</dimen>
|
||||
<dimen name="resize_move_distance">12.0dip</dimen>
|
||||
<dimen name="text_size_dp">15dp</dimen>
|
||||
<dimen name="text_size_big_dp">25dp</dimen>
|
||||
</resources>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="ime_name">LeanKey Keyboard</string>
|
||||
<string name="ime_service_name">LeanKey Keyboard</string>
|
||||
<string name="ime_name">LeanKey Keyboard Pro</string>
|
||||
<string name="ime_service_name">LeanKey Keyboard Pro</string>
|
||||
<string name="word_separators">" .,;:!?
|
||||
()[]*&@{}/<>_+=|"</string>
|
||||
<string name="label_go_key">Go</string>
|
||||
@@ -18,9 +18,12 @@
|
||||
<string name="keyboardview_keycode_delete">Delete</string>
|
||||
<string name="keyboardview_keycode_mode_change">Mode change</string>
|
||||
<string name="keyboardview_keycode_shift">Shift</string>
|
||||
<string name="keyboardview_keycode_lang">Language</string>
|
||||
<string name="keyboardview_keycode_caps">Caps Lock</string>
|
||||
<string name="keyboardview_keycode_left">Left</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_password_character_no_headset">Dot.</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>
|
||||
|
||||
41
leankeykeyboard/src/main/res/values/text_appearance.xml
Normal file
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<declare-styleable name="TextAppearance">
|
||||
<!-- Text color. -->
|
||||
<attr name="textColor" format="color" />
|
||||
<!-- Size of the text. Recommended dimension type for text is "sp" for scaled-pixels (example: 15sp). -->
|
||||
<attr name="textSize" format="dimension" />
|
||||
<!-- Style (bold, italic, bolditalic) for the text. -->
|
||||
<attr name="textStyle" format="reference" />
|
||||
<!-- Typeface (normal, sans, serif, monospace) for the text. -->
|
||||
<attr name="typeface" format="string" />
|
||||
<!-- Font family (named by string) for the text. -->
|
||||
<attr name="fontFamily" format="string" />
|
||||
<!-- Color of the text selection highlight. -->
|
||||
<attr name="textColorHighlight" format="color" />
|
||||
<!-- Color of the hint text. -->
|
||||
<attr name="textColorHint" format="color" />
|
||||
<!-- Color of the links. -->
|
||||
<attr name="textColorLink" format="color" />
|
||||
<!-- Present the text in ALL CAPS. This may use a small-caps form when available. -->
|
||||
<attr name="textAllCaps" format="boolean" />
|
||||
<!-- Place a blurred shadow of text underneath the text, drawn with the
|
||||
specified color. The text shadow produced does not interact with
|
||||
properties on View that are responsible for real time shadows,
|
||||
{@link android.R.styleable#View_elevation elevation} and
|
||||
{@link android.R.styleable#View_translationZ translationZ}. -->
|
||||
<attr name="shadowColor" format="color" />
|
||||
<!-- Horizontal offset of the text shadow. -->
|
||||
<attr name="shadowDx" format="float" />
|
||||
<!-- Vertical offset of the text shadow. -->
|
||||
<attr name="shadowDy" format="float" />
|
||||
<!-- Blur radius of the text shadow. -->
|
||||
<attr name="shadowRadius" format="float" />
|
||||
<!-- Elegant text height, especially for less compacted complex script text. -->
|
||||
<attr name="elegantTextHeight" format="boolean" />
|
||||
<!-- Text letter-spacing. -->
|
||||
<attr name="letterSpacing" format="float" />
|
||||
<!-- Font feature settings. -->
|
||||
<attr name="fontFeatureSettings" format="string" />
|
||||
</declare-styleable>
|
||||
</resources>
|
||||
9
leankeykeyboard/src/main/res/xml/accent_a_th.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Keyboard android:keyWidth="@dimen/key_width" android:keyHeight="@dimen/key_height" android:horizontalGap="@dimen/keyboard_horizontal_gap" android:verticalGap="@dimen/keyboard_vertical_gap"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<Row>
|
||||
<Key android:keyLabel="ี" />
|
||||
<Key android:keyLabel="๊" />
|
||||
<Key android:keyLabel="ร" />
|
||||
</Row>
|
||||
</Keyboard>
|
||||
9
leankeykeyboard/src/main/res/xml/accent_c_th.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Keyboard android:keyWidth="@dimen/key_width" android:keyHeight="@dimen/key_height" android:horizontalGap="@dimen/keyboard_horizontal_gap" android:verticalGap="@dimen/keyboard_vertical_gap"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<Row>
|
||||
<Key android:keyLabel="็" />
|
||||
<Key android:keyLabel="่" />
|
||||
<Key android:keyLabel="๋" />
|
||||
</Row>
|
||||
</Keyboard>
|
||||
8
leankeykeyboard/src/main/res/xml/accent_d_th.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Keyboard android:keyWidth="@dimen/key_width" android:keyHeight="@dimen/key_height" android:horizontalGap="@dimen/keyboard_horizontal_gap" android:verticalGap="@dimen/keyboard_vertical_gap"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<Row>
|
||||
<Key android:keyLabel="ย" />
|
||||
<Key android:keyLabel="บ" />
|
||||
</Row>
|
||||
</Keyboard>
|
||||
9
leankeykeyboard/src/main/res/xml/accent_e_th.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Keyboard android:keyWidth="@dimen/key_width" android:keyHeight="@dimen/key_height" android:horizontalGap="@dimen/keyboard_horizontal_gap" android:verticalGap="@dimen/keyboard_vertical_gap"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<Row>
|
||||
<Key android:keyLabel="๓" />
|
||||
<Key android:keyLabel="๔" />
|
||||
<Key android:keyLabel="ุ" />
|
||||
</Row>
|
||||
</Keyboard>
|
||||
7
leankeykeyboard/src/main/res/xml/accent_f_th.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Keyboard android:keyWidth="@dimen/key_width" android:keyHeight="@dimen/key_height" android:horizontalGap="@dimen/keyboard_horizontal_gap" android:verticalGap="@dimen/keyboard_vertical_gap"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<Row>
|
||||
<Key android:keyLabel="ฐ" />
|
||||
</Row>
|
||||
</Keyboard>
|
||||
7
leankeykeyboard/src/main/res/xml/accent_g_th.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Keyboard android:keyWidth="@dimen/key_width" android:keyHeight="@dimen/key_height" android:horizontalGap="@dimen/keyboard_horizontal_gap" android:verticalGap="@dimen/keyboard_vertical_gap"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<Row>
|
||||
<Key android:keyLabel="ล" />
|
||||
</Row>
|
||||
</Keyboard>
|
||||
7
leankeykeyboard/src/main/res/xml/accent_h_th.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Keyboard android:keyWidth="@dimen/key_width" android:keyHeight="@dimen/key_height" android:horizontalGap="@dimen/keyboard_horizontal_gap" android:verticalGap="@dimen/keyboard_vertical_gap"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<Row>
|
||||
<Key android:keyLabel="ฅ" />
|
||||
</Row>
|
||||
</Keyboard>
|
||||
9
leankeykeyboard/src/main/res/xml/accent_i_th.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Keyboard android:keyWidth="@dimen/key_width" android:keyHeight="@dimen/key_height" android:horizontalGap="@dimen/keyboard_horizontal_gap" android:verticalGap="@dimen/keyboard_vertical_gap"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<Row>
|
||||
<Key android:keyLabel="๙" />
|
||||
<Key android:keyLabel="ๆ" />
|
||||
<Key android:keyLabel="๐" />
|
||||
</Row>
|
||||
</Keyboard>
|
||||
7
leankeykeyboard/src/main/res/xml/accent_j_th.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Keyboard android:keyWidth="@dimen/key_width" android:keyHeight="@dimen/key_height" android:horizontalGap="@dimen/keyboard_horizontal_gap" android:verticalGap="@dimen/keyboard_vertical_gap"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<Row>
|
||||
<Key android:keyLabel="ฃ" />
|
||||
</Row>
|
||||
</Keyboard>
|
||||
7
leankeykeyboard/src/main/res/xml/accent_k_th.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Keyboard android:keyWidth="@dimen/key_width" android:keyHeight="@dimen/key_height" android:horizontalGap="@dimen/keyboard_horizontal_gap" android:verticalGap="@dimen/keyboard_vertical_gap"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<Row>
|
||||
<Key android:keyLabel="ฟ" />
|
||||
</Row>
|
||||
</Keyboard>
|
||||
9
leankeykeyboard/src/main/res/xml/accent_o_th.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Keyboard android:keyWidth="@dimen/key_width" android:keyHeight="@dimen/key_height" android:horizontalGap="@dimen/keyboard_horizontal_gap" android:verticalGap="@dimen/keyboard_vertical_gap"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<Row>
|
||||
<Key android:keyLabel="ไ" />
|
||||
<Key android:keyLabel="ำ" />
|
||||
<Key android:keyLabel="ฎ" />
|
||||
</Row>
|
||||
</Keyboard>
|
||||
9
leankeykeyboard/src/main/res/xml/accent_p2_th.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Keyboard android:keyWidth="@dimen/key_width" android:keyHeight="@dimen/key_height" android:horizontalGap="@dimen/keyboard_horizontal_gap" android:verticalGap="@dimen/keyboard_vertical_gap"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<Row>
|
||||
<Key android:keyLabel="ธ" />
|
||||
<Key android:keyLabel="ั" />
|
||||
<Key android:keyLabel="ํ" />
|
||||
</Row>
|
||||
</Keyboard>
|
||||
9
leankeykeyboard/src/main/res/xml/accent_p_th.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Keyboard android:keyWidth="@dimen/key_width" android:keyHeight="@dimen/key_height" android:horizontalGap="@dimen/keyboard_horizontal_gap" android:verticalGap="@dimen/keyboard_vertical_gap"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<Row>
|
||||
<Key android:keyLabel="พ" />
|
||||
<Key android:keyLabel="ฑ" />
|
||||
<Key android:keyLabel="ะ" />
|
||||
</Row>
|
||||
</Keyboard>
|
||||
9
leankeykeyboard/src/main/res/xml/accent_q_th.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Keyboard android:keyWidth="@dimen/key_width" android:keyHeight="@dimen/key_height" android:horizontalGap="@dimen/keyboard_horizontal_gap" android:verticalGap="@dimen/keyboard_vertical_gap"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<Row>
|
||||
<Key android:keyLabel="ฝ" />
|
||||
<Key android:keyLabel="ฦ" />
|
||||
<Key android:keyLabel="๑" />
|
||||
</Row>
|
||||
</Keyboard>
|
||||
8
leankeykeyboard/src/main/res/xml/accent_qm.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Keyboard android:keyWidth="@dimen/key_width" android:keyHeight="@dimen/key_height" android:horizontalGap="@dimen/keyboard_horizontal_gap" android:verticalGap="@dimen/keyboard_vertical_gap"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<Row>
|
||||
<Key android:keyEdgeFlags="left" android:keyIcon="@drawable/ic_ime_accent_close" />
|
||||
<Key android:codes="1573" android:keyLabel="إ" />
|
||||
</Row>
|
||||
</Keyboard>
|
||||
8
leankeykeyboard/src/main/res/xml/accent_r.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Keyboard android:keyWidth="@dimen/key_width" android:keyHeight="@dimen/key_height" android:horizontalGap="@dimen/keyboard_horizontal_gap" android:verticalGap="@dimen/keyboard_vertical_gap"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<Row>
|
||||
<Key android:keyEdgeFlags="left" android:keyIcon="@drawable/ic_ime_accent_close" />
|
||||
<Key android:codes="1571" android:keyLabel="أ" />
|
||||
</Row>
|
||||
</Keyboard>
|
||||
9
leankeykeyboard/src/main/res/xml/accent_r_th.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Keyboard android:keyWidth="@dimen/key_width" android:keyHeight="@dimen/key_height" android:horizontalGap="@dimen/keyboard_horizontal_gap" android:verticalGap="@dimen/keyboard_vertical_gap"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<Row>
|
||||
<Key android:keyLabel="3641" />
|
||||
<Key android:keyLabel="3638" />
|
||||
<Key android:keyLabel="3662" />
|
||||
</Row>
|
||||
</Keyboard>
|
||||
9
leankeykeyboard/src/main/res/xml/accent_s_th.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Keyboard android:keyWidth="@dimen/key_width" android:keyHeight="@dimen/key_height" android:horizontalGap="@dimen/keyboard_horizontal_gap" android:verticalGap="@dimen/keyboard_vertical_gap"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<Row>
|
||||
<Key android:keyLabel="ณ" />
|
||||
<Key android:keyLabel="น" />
|
||||
<Key android:keyLabel="ฯ" />
|
||||
</Row>
|
||||
</Keyboard>
|
||||
9
leankeykeyboard/src/main/res/xml/accent_t_th.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Keyboard android:keyWidth="@dimen/key_width" android:keyHeight="@dimen/key_height" android:horizontalGap="@dimen/keyboard_horizontal_gap" android:verticalGap="@dimen/keyboard_vertical_gap"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<Row>
|
||||
<Key android:keyLabel="ค" />
|
||||
<Key android:keyLabel="๕" />
|
||||
<Key android:keyLabel="ต" />
|
||||
</Row>
|
||||
</Keyboard>
|
||||
9
leankeykeyboard/src/main/res/xml/accent_u_th.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Keyboard android:keyWidth="@dimen/key_width" android:keyHeight="@dimen/key_height" android:horizontalGap="@dimen/keyboard_horizontal_gap" android:verticalGap="@dimen/keyboard_vertical_gap"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<Row>
|
||||
<Key android:keyLabel="ข" />
|
||||
<Key android:keyLabel="๘" />
|
||||
<Key android:keyLabel="ช" />
|
||||
</Row>
|
||||
</Keyboard>
|
||||
9
leankeykeyboard/src/main/res/xml/accent_w_th.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Keyboard android:keyWidth="@dimen/key_width" android:keyHeight="@dimen/key_height" android:horizontalGap="@dimen/keyboard_horizontal_gap" android:verticalGap="@dimen/keyboard_vertical_gap"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<Row>
|
||||
<Key android:keyLabel="๒" />
|
||||
<Key android:keyLabel="ภ" />
|
||||
<Key android:keyLabel="๓" />
|
||||
</Row>
|
||||
</Keyboard>
|
||||
9
leankeykeyboard/src/main/res/xml/accent_x_th.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Keyboard android:keyWidth="@dimen/key_width" android:keyHeight="@dimen/key_height" android:horizontalGap="@dimen/keyboard_horizontal_gap" android:verticalGap="@dimen/keyboard_vertical_gap"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<Row>
|
||||
<Key android:keyLabel="ด" />
|
||||
<Key android:keyLabel="ฌ" />
|
||||
<Key android:keyLabel="้" />
|
||||
</Row>
|
||||
</Keyboard>
|
||||
9
leankeykeyboard/src/main/res/xml/accent_y_th.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Keyboard android:keyWidth="@dimen/key_width" android:keyHeight="@dimen/key_height" android:horizontalGap="@dimen/keyboard_horizontal_gap" android:verticalGap="@dimen/keyboard_vertical_gap"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<Row>
|
||||
<Key android:keyLabel="๖" />
|
||||
<Key android:keyLabel="จ" />
|
||||
<Key android:keyLabel="๗" />
|
||||
</Row>
|
||||
</Keyboard>
|
||||
9
leankeykeyboard/src/main/res/xml/accent_z_th.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Keyboard android:keyWidth="@dimen/key_width" android:keyHeight="@dimen/key_height" android:horizontalGap="@dimen/keyboard_horizontal_gap" android:verticalGap="@dimen/keyboard_vertical_gap"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<Row>
|
||||
<Key android:keyLabel="ฆ" />
|
||||
<Key android:keyLabel="ก" />
|
||||
<Key android:keyLabel="ฏ" />
|
||||
</Row>
|
||||
</Keyboard>
|
||||
65
leankeykeyboard/src/main/res/xml/qwerty_ar.xml
Normal file
@@ -0,0 +1,65 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Keyboard android:keyWidth="@dimen/key_width" android:keyHeight="@dimen/key_height" android:horizontalGap="@dimen/keyboard_horizontal_gap" android:verticalGap="@dimen/keyboard_vertical_gap"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- Key codes: https://en.wikipedia.org/wiki/Arabic_(Unicode_block) -->
|
||||
<Row android:rowEdgeFlags="top">
|
||||
<Key android:codes="49" android:popupKeyboard="@xml/shift_1" android:keyEdgeFlags="left" android:keyLabel="1" />
|
||||
<Key android:codes="50" android:popupKeyboard="@xml/shift_2" android:keyLabel="2" />
|
||||
<Key android:codes="51" android:popupKeyboard="@xml/shift_3" android:keyLabel="3" />
|
||||
<Key android:codes="52" android:popupKeyboard="@xml/shift_4" android:keyLabel="4" />
|
||||
<Key android:codes="53" android:popupKeyboard="@xml/shift_5" android:keyLabel="5" />
|
||||
<Key android:codes="54" android:popupKeyboard="@xml/shift_6" android:keyLabel="6" />
|
||||
<Key android:codes="55" android:popupKeyboard="@xml/shift_7" android:keyLabel="7" />
|
||||
<Key android:codes="56" android:popupKeyboard="@xml/shift_8" android:keyLabel="8" />
|
||||
<Key android:codes="57" android:popupKeyboard="@xml/shift_9" android:keyLabel="9" />
|
||||
<Key android:codes="48" android:popupKeyboard="@xml/shift_0" android:keyLabel="0" />
|
||||
<Key android:codes="-5" android:keyEdgeFlags="right" android:keyLabel="@string/keyboardview_keycode_delete" android:keyIcon="@drawable/ic_ime_delete" />
|
||||
</Row>
|
||||
<Row>
|
||||
<Key android:codes="1590" android:keyLabel="ض" android:keyEdgeFlags="left" />
|
||||
<Key android:codes="1589" android:keyLabel="ص" />
|
||||
<Key android:codes="1602" android:keyLabel="ق" />
|
||||
<Key android:codes="1609" android:keyLabel="ى" android:popupKeyboard="@xml/accent_r" />
|
||||
<Key android:codes="1601" android:keyLabel="ف" />
|
||||
<Key android:codes="1594" android:keyLabel="غ" />
|
||||
<Key android:codes="1593" android:keyLabel="ع" />
|
||||
<Key android:codes="1607" android:keyLabel="ه" />
|
||||
<Key android:codes="1582" android:keyLabel="خ" />
|
||||
<Key android:codes="1581" android:keyLabel="ح" />
|
||||
<Key android:codes="1580" android:keyLabel="ج" android:keyEdgeFlags="right" />
|
||||
</Row>
|
||||
<Row>
|
||||
<Key android:codes="1588" android:keyEdgeFlags="left" android:keyLabel="ش" />
|
||||
<Key android:codes="1587" android:keyLabel="س" />
|
||||
<Key android:codes="1610" android:keyLabel="ي" />
|
||||
<Key android:codes="1576" android:keyLabel="ب" />
|
||||
<Key android:codes="1604" android:keyLabel="ل" />
|
||||
<Key android:codes="1569" android:keyLabel="ء" />
|
||||
<Key android:codes="1575" android:keyLabel="ا" />
|
||||
<Key android:codes="1578" android:keyLabel="ت" />
|
||||
<Key android:codes="1606" android:keyLabel="ن" />
|
||||
<Key android:codes="1605" android:keyLabel="م" />
|
||||
<Key android:codes="1603" android:keyEdgeFlags="right" android:keyLabel="ك" />
|
||||
</Row>
|
||||
<Row>
|
||||
<Key android:codes="1592" android:keyLabel="ظ" android:keyEdgeFlags="left" />
|
||||
<Key android:codes="1591" android:keyLabel="ط" />
|
||||
<Key android:codes="1584" android:keyLabel="ذ" />
|
||||
<Key android:codes="1583" android:keyLabel="د" />
|
||||
<Key android:codes="1586" android:keyLabel="ز" />
|
||||
<Key android:codes="1585" android:keyLabel="ر" />
|
||||
<Key android:codes="1572" android:keyLabel="ؤ" />
|
||||
<Key android:codes="1608" android:keyLabel="و" />
|
||||
<Key android:codes="1577" android:keyLabel="ة" />
|
||||
<Key android:codes="1579" android:keyLabel="ث" />
|
||||
<Key android:codes="1574" android:keyLabel="ئ" android:keyEdgeFlags="right" android:popupKeyboard="@xml/accent_qm" />
|
||||
</Row>
|
||||
<Row android:rowEdgeFlags="bottom">
|
||||
<Key android:codes="-2" android:keyEdgeFlags="left" android:keyLabel="@string/keyboardview_keycode_mode_change" android:keyIcon="@drawable/ic_ime_symbols" />
|
||||
<Key android:codes="-1" android:keyLabel="@string/keyboardview_keycode_shift" android:keyIcon="@drawable/ic_ime_shift_off" />
|
||||
<Key android:codes="-9" android:keyLabel="@string/keyboardview_keycode_lang" android:keyIcon="@drawable/ic_ime_world" />
|
||||
<Key android:keyWidth="@dimen/space_key_width" android:codes="32" android:keyLabel="@string/keyboardview_keycode_space" android:keyIcon="@drawable/ic_ime_space_ar" />
|
||||
<Key android:codes="-3" android:keyLabel="@string/keyboardview_keycode_left" android:keyIcon="@drawable/ic_ime_left_arrow" />
|
||||
<Key android:codes="-4" android:keyEdgeFlags="right" android:keyLabel="@string/keyboardview_keycode_right" android:keyIcon="@drawable/ic_ime_right_arrow" />
|
||||
</Row>
|
||||
</Keyboard>
|
||||
68
leankeykeyboard/src/main/res/xml/qwerty_bg.xml
Normal file
@@ -0,0 +1,68 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Keyboard android:keyWidth="@dimen/key_width" android:keyHeight="@dimen/key_height" android:horizontalGap="@dimen/keyboard_horizontal_gap" android:verticalGap="@dimen/keyboard_vertical_gap"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- All letters needed for German and Danish are in the C0 Controls and Basic Latin and C1 Controls and Latin-1 Supplement blocks. (See Wikipedia's list of languages supported by those blocks.)
|
||||
For Czech/Slovak, you also need Latin Extended-A.
|
||||
You should also include General Punctuation, as well as any other symbols you may use (e.g. Arrows).
|
||||
See http://en.wikipedia.org/wiki/Latin_characters_in_Unicode. -->
|
||||
<Row android:rowEdgeFlags="top">
|
||||
<Key android:codes="49" android:popupKeyboard="@xml/shift_1" android:keyEdgeFlags="left" android:keyLabel="1" />
|
||||
<Key android:codes="50" android:popupKeyboard="@xml/shift_2" android:keyLabel="2" />
|
||||
<Key android:codes="51" android:popupKeyboard="@xml/shift_3" android:keyLabel="3" />
|
||||
<Key android:codes="52" android:popupKeyboard="@xml/shift_4" android:keyLabel="4" />
|
||||
<Key android:codes="53" android:popupKeyboard="@xml/shift_5" android:keyLabel="5" />
|
||||
<Key android:codes="54" android:popupKeyboard="@xml/shift_6" android:keyLabel="6" />
|
||||
<Key android:codes="55" android:popupKeyboard="@xml/shift_7" android:keyLabel="7" />
|
||||
<Key android:codes="56" android:popupKeyboard="@xml/shift_8" android:keyLabel="8" />
|
||||
<Key android:codes="57" android:popupKeyboard="@xml/shift_9" android:keyLabel="9" />
|
||||
<Key android:codes="48" android:popupKeyboard="@xml/shift_0" android:keyLabel="0" />
|
||||
<Key android:codes="-5" android:keyEdgeFlags="right" android:keyLabel="@string/keyboardview_keycode_delete" android:keyIcon="@drawable/ic_ime_delete" />
|
||||
</Row>
|
||||
<Row>
|
||||
<Key android:keyLabel="я" android:keyEdgeFlags="left" />
|
||||
<Key android:keyLabel="в" />
|
||||
<Key android:keyLabel="е" />
|
||||
<Key android:keyLabel="р" />
|
||||
<Key android:keyLabel="т" />
|
||||
<Key android:keyLabel="ъ" />
|
||||
<Key android:keyLabel="у" />
|
||||
<Key android:keyLabel="и" />
|
||||
<Key android:keyLabel="о" />
|
||||
<Key android:keyLabel="п" />
|
||||
<Key android:keyLabel="ч" android:keyEdgeFlags="right" />
|
||||
</Row>
|
||||
<Row>
|
||||
<Key android:keyLabel="а" android:keyEdgeFlags="left" />
|
||||
<Key android:keyLabel="с" />
|
||||
<Key android:keyLabel="д" />
|
||||
<Key android:keyLabel="ф" />
|
||||
<Key android:keyLabel="г" />
|
||||
<Key android:keyLabel="х" />
|
||||
<Key android:keyLabel="й" />
|
||||
<Key android:keyLabel="к" />
|
||||
<Key android:keyLabel="л" />
|
||||
<Key android:keyLabel="ш" />
|
||||
<Key android:keyLabel="щ" android:keyEdgeFlags="right" />
|
||||
</Row>
|
||||
<Row>
|
||||
<Key android:keyLabel="з" android:keyEdgeFlags="left" />
|
||||
<Key android:keyLabel="Ь" />
|
||||
<Key android:keyLabel="ц" />
|
||||
<Key android:keyLabel="ж" />
|
||||
<Key android:keyLabel="б" />
|
||||
<Key android:keyLabel="н" />
|
||||
<Key android:keyLabel="м" />
|
||||
<Key android:keyLabel="ю" />
|
||||
<Key android:keyLabel="." />
|
||||
<Key android:keyLabel="-" />
|
||||
<Key android:keyEdgeFlags="right" android:keyLabel="\?" />
|
||||
</Row>
|
||||
<Row android:rowEdgeFlags="bottom">
|
||||
<Key android:codes="-2" android:keyEdgeFlags="left" android:keyLabel="@string/keyboardview_keycode_mode_change" android:keyIcon="@drawable/ic_ime_symbols" />
|
||||
<Key android:codes="-1" android:keyLabel="@string/keyboardview_keycode_shift" android:keyIcon="@drawable/ic_ime_shift_off" />
|
||||
<Key android:codes="-9" android:keyLabel="@string/keyboardview_keycode_lang" android:keyIcon="@drawable/ic_ime_world" />
|
||||
<Key android:keyWidth="@dimen/space_key_width" android:codes="32" android:keyLabel="@string/keyboardview_keycode_space" android:keyIcon="@drawable/ic_ime_space_bg" />
|
||||
<Key android:codes="-3" android:keyLabel="@string/keyboardview_keycode_left" android:keyIcon="@drawable/ic_ime_left_arrow" />
|
||||
<Key android:codes="-4" android:keyEdgeFlags="right" android:keyLabel="@string/keyboardview_keycode_right" android:keyIcon="@drawable/ic_ime_right_arrow" />
|
||||
</Row>
|
||||
</Keyboard>
|
||||
68
leankeykeyboard/src/main/res/xml/qwerty_de.xml
Normal file
@@ -0,0 +1,68 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Keyboard android:keyWidth="@dimen/key_width" android:keyHeight="@dimen/key_height" android:horizontalGap="@dimen/keyboard_horizontal_gap" android:verticalGap="@dimen/keyboard_vertical_gap"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- All letters needed for German and Danish are in the C0 Controls and Basic Latin and C1 Controls and Latin-1 Supplement blocks. (See Wikipedia's list of languages supported by those blocks.)
|
||||
For Czech/Slovak, you also need Latin Extended-A.
|
||||
You should also include General Punctuation, as well as any other symbols you may use (e.g. Arrows).
|
||||
See http://en.wikipedia.org/wiki/Latin_characters_in_Unicode. -->
|
||||
<Row android:rowEdgeFlags="top">
|
||||
<Key android:codes="49" android:popupKeyboard="@xml/shift_1" android:keyEdgeFlags="left" android:keyLabel="1" />
|
||||
<Key android:codes="50" android:popupKeyboard="@xml/shift_2" android:keyLabel="2" />
|
||||
<Key android:codes="51" android:popupKeyboard="@xml/shift_3" android:keyLabel="3" />
|
||||
<Key android:codes="52" android:popupKeyboard="@xml/shift_4" android:keyLabel="4" />
|
||||
<Key android:codes="53" android:popupKeyboard="@xml/shift_5" android:keyLabel="5" />
|
||||
<Key android:codes="54" android:popupKeyboard="@xml/shift_6" android:keyLabel="6" />
|
||||
<Key android:codes="55" android:popupKeyboard="@xml/shift_7" android:keyLabel="7" />
|
||||
<Key android:codes="56" android:popupKeyboard="@xml/shift_8" android:keyLabel="8" />
|
||||
<Key android:codes="57" android:popupKeyboard="@xml/shift_9" android:keyLabel="9" />
|
||||
<Key android:codes="48" android:popupKeyboard="@xml/shift_0" android:keyLabel="0" />
|
||||
<Key android:codes="-5" android:keyEdgeFlags="right" android:keyLabel="@string/keyboardview_keycode_delete" android:keyIcon="@drawable/ic_ime_delete" />
|
||||
</Row>
|
||||
<Row>
|
||||
<Key android:codes="113" android:keyLabel="q" android:keyEdgeFlags="left" />
|
||||
<Key android:codes="119" android:keyLabel="w" />
|
||||
<Key android:codes="101" android:keyLabel="e" android:popupCharacters="€" />
|
||||
<Key android:codes="114" android:keyLabel="r" />
|
||||
<Key android:codes="116" android:keyLabel="t" />
|
||||
<Key android:codes="122" android:keyLabel="z" />
|
||||
<Key android:codes="117" android:keyLabel="u" />
|
||||
<Key android:codes="105" android:keyLabel="i" />
|
||||
<Key android:codes="111" android:keyLabel="o" />
|
||||
<Key android:codes="112" android:keyLabel="p" />
|
||||
<Key android:codes="252" android:keyLabel="ü" android:keyEdgeFlags="right" />
|
||||
</Row>
|
||||
<Row>
|
||||
<Key android:codes="97" android:keyLabel="a" android:keyEdgeFlags="left" />
|
||||
<Key android:codes="115" android:keyLabel="s" />
|
||||
<Key android:codes="100" android:keyLabel="d" />
|
||||
<Key android:codes="102" android:keyLabel="f" />
|
||||
<Key android:codes="103" android:keyLabel="g" />
|
||||
<Key android:codes="104" android:keyLabel="h" />
|
||||
<Key android:codes="106" android:keyLabel="j" />
|
||||
<Key android:codes="107" android:keyLabel="k" />
|
||||
<Key android:codes="108" android:keyLabel="l" />
|
||||
<Key android:codes="246" android:keyLabel="ö" />
|
||||
<Key android:codes="228" android:keyLabel="ä" android:keyEdgeFlags="right" />
|
||||
</Row>
|
||||
<Row>
|
||||
<Key android:codes="121" android:keyLabel="y" android:keyEdgeFlags="left" />
|
||||
<Key android:codes="120" android:keyLabel="x" />
|
||||
<Key android:codes="99" android:keyLabel="c" />
|
||||
<Key android:codes="118" android:keyLabel="v" />
|
||||
<Key android:codes="98" android:keyLabel="b" />
|
||||
<Key android:codes="110" android:keyLabel="n" />
|
||||
<Key android:codes="109" android:keyLabel="m" />
|
||||
<Key android:codes="223" android:keyLabel="ß" />
|
||||
<Key android:keyLabel="." />
|
||||
<Key android:keyLabel="/" />
|
||||
<Key android:keyLabel="\?" android:keyEdgeFlags="right" />
|
||||
</Row>
|
||||
<Row android:rowEdgeFlags="bottom">
|
||||
<Key android:codes="-2" android:keyEdgeFlags="left" android:keyLabel="@string/keyboardview_keycode_mode_change" android:keyIcon="@drawable/ic_ime_symbols" />
|
||||
<Key android:codes="-1" android:keyLabel="@string/keyboardview_keycode_shift" android:keyIcon="@drawable/ic_ime_shift_off" />
|
||||
<Key android:codes="-9" android:keyLabel="@string/keyboardview_keycode_lang" android:keyIcon="@drawable/ic_ime_world" />
|
||||
<Key android:keyWidth="@dimen/space_key_width" android:codes="32" android:keyLabel="@string/keyboardview_keycode_space" android:keyIcon="@drawable/ic_ime_space_de" />
|
||||
<Key android:codes="-3" android:keyLabel="@string/keyboardview_keycode_left" android:keyIcon="@drawable/ic_ime_left_arrow" />
|
||||
<Key android:codes="-4" android:keyEdgeFlags="right" android:keyLabel="@string/keyboardview_keycode_right" android:keyIcon="@drawable/ic_ime_right_arrow" />
|
||||
</Row>
|
||||
</Keyboard>
|
||||
68
leankeykeyboard/src/main/res/xml/qwerty_el.xml
Normal file
@@ -0,0 +1,68 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Keyboard android:keyWidth="@dimen/key_width" android:keyHeight="@dimen/key_height" android:horizontalGap="@dimen/keyboard_horizontal_gap" android:verticalGap="@dimen/keyboard_vertical_gap"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- Key codes: https://en.wikipedia.org/wiki/Greek_(Unicode_block) -->
|
||||
<Row android:rowEdgeFlags="top">
|
||||
<Key android:codes="49" android:popupKeyboard="@xml/shift_1" android:keyEdgeFlags="left" android:keyLabel="1" />
|
||||
<Key android:codes="50" android:popupKeyboard="@xml/shift_2" android:keyLabel="2" />
|
||||
<Key android:codes="51" android:popupKeyboard="@xml/shift_3" android:keyLabel="3" />
|
||||
<Key android:codes="52" android:popupKeyboard="@xml/shift_4" android:keyLabel="4" />
|
||||
<Key android:codes="53" android:popupKeyboard="@xml/shift_5" android:keyLabel="5" />
|
||||
<Key android:codes="54" android:popupKeyboard="@xml/shift_6" android:keyLabel="6" />
|
||||
<Key android:codes="55" android:popupKeyboard="@xml/shift_7" android:keyLabel="7" />
|
||||
<Key android:codes="56" android:popupKeyboard="@xml/shift_8" android:keyLabel="8" />
|
||||
<Key android:codes="57" android:popupKeyboard="@xml/shift_9" android:keyLabel="9" />
|
||||
<Key android:codes="48" android:popupKeyboard="@xml/shift_0" android:keyLabel="0" />
|
||||
<Key android:codes="-5" android:keyEdgeFlags="right" android:keyLabel="@string/keyboardview_keycode_delete" android:keyIcon="@drawable/ic_ime_delete" />
|
||||
</Row>
|
||||
<Row>
|
||||
<Key android:keyLabel=";" android:keyEdgeFlags="left" />
|
||||
<Key android:keyLabel="ς" />
|
||||
<Key android:keyLabel="ε" android:popupCharacters="έ" />
|
||||
<Key android:keyLabel="ρ" />
|
||||
<Key android:keyLabel="τ" />
|
||||
<Key android:keyLabel="υ" android:popupCharacters="ύϋΰ" />
|
||||
<Key android:keyLabel="θ" />
|
||||
<Key android:keyLabel="ι" android:popupCharacters="ίϊΐ" />
|
||||
<Key android:keyLabel="ο" android:popupCharacters="ό" />
|
||||
<Key android:keyLabel="π" />
|
||||
<!-- Empty -->
|
||||
<Key android:keyLabel="`" android:keyEdgeFlags="right" />
|
||||
</Row>
|
||||
<Row>
|
||||
<Key android:keyLabel="α" android:popupCharacters="ά" android:keyEdgeFlags="left" />
|
||||
<Key android:keyLabel="σ" />
|
||||
<Key android:keyLabel="δ" />
|
||||
<Key android:keyLabel="φ" />
|
||||
<Key android:keyLabel="γ" />
|
||||
<Key android:keyLabel="η" android:popupCharacters="ή" />
|
||||
<Key android:keyLabel="ξ" />
|
||||
<Key android:keyLabel="κ" />
|
||||
<Key android:keyLabel="λ" />
|
||||
<!-- Empty -->
|
||||
<Key android:keyLabel=":" />
|
||||
<Key android:keyLabel="\u0022" android:keyEdgeFlags="right" />
|
||||
</Row>
|
||||
<Row>
|
||||
<Key android:keyLabel="ζ" android:keyEdgeFlags="left" />
|
||||
<Key android:keyLabel="χ" />
|
||||
<Key android:keyLabel="ψ" />
|
||||
<Key android:keyLabel="ω" android:popupCharacters="ώ" />
|
||||
<Key android:keyLabel="β" />
|
||||
<Key android:keyLabel="ν" />
|
||||
<Key android:keyLabel="μ" />
|
||||
<!-- Empty -->
|
||||
<Key android:keyLabel="," />
|
||||
<Key android:keyLabel="." />
|
||||
<Key android:keyLabel="/" />
|
||||
<Key android:keyLabel="\?" android:keyEdgeFlags="right" />
|
||||
</Row>
|
||||
<Row android:rowEdgeFlags="bottom">
|
||||
<Key android:codes="-2" android:keyEdgeFlags="left" android:keyLabel="@string/keyboardview_keycode_mode_change" android:keyIcon="@drawable/ic_ime_symbols" />
|
||||
<Key android:codes="-1" android:keyLabel="@string/keyboardview_keycode_shift" android:keyIcon="@drawable/ic_ime_shift_off" />
|
||||
<Key android:codes="-9" android:keyLabel="@string/keyboardview_keycode_lang" android:keyIcon="@drawable/ic_ime_world" />
|
||||
<Key android:keyWidth="@dimen/space_key_width" android:codes="32" android:keyLabel="@string/keyboardview_keycode_space" android:keyIcon="@drawable/ic_ime_space_el" />
|
||||
<Key android:codes="-3" android:keyLabel="@string/keyboardview_keycode_left" android:keyIcon="@drawable/ic_ime_left_arrow" />
|
||||
<Key android:codes="-4" android:keyEdgeFlags="right" android:keyLabel="@string/keyboardview_keycode_right" android:keyIcon="@drawable/ic_ime_right_arrow" />
|
||||
</Row>
|
||||
</Keyboard>
|
||||
68
leankeykeyboard/src/main/res/xml/qwerty_fa.xml
Normal file
@@ -0,0 +1,68 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Keyboard android:keyWidth="@dimen/key_width" android:keyHeight="@dimen/key_height" android:horizontalGap="@dimen/keyboard_horizontal_gap" android:verticalGap="@dimen/keyboard_vertical_gap"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- All letters needed for German and Danish are in the C0 Controls and Basic Latin and C1 Controls and Latin-1 Supplement blocks. (See Wikipedia's list of languages supported by those blocks.)
|
||||
For Czech/Slovak, you also need Latin Extended-A.
|
||||
You should also include General Punctuation, as well as any other symbols you may use (e.g. Arrows).
|
||||
See http://en.wikipedia.org/wiki/Latin_characters_in_Unicode. -->
|
||||
<Row android:rowEdgeFlags="top">
|
||||
<Key android:codes="49" android:popupKeyboard="@xml/shift_1" android:keyEdgeFlags="left" android:keyLabel="1" />
|
||||
<Key android:codes="50" android:popupKeyboard="@xml/shift_2" android:keyLabel="2" />
|
||||
<Key android:codes="51" android:popupKeyboard="@xml/shift_3" android:keyLabel="3" />
|
||||
<Key android:codes="52" android:popupKeyboard="@xml/shift_4" android:keyLabel="4" />
|
||||
<Key android:codes="53" android:popupKeyboard="@xml/shift_5" android:keyLabel="5" />
|
||||
<Key android:codes="54" android:popupKeyboard="@xml/shift_6" android:keyLabel="6" />
|
||||
<Key android:codes="55" android:popupKeyboard="@xml/shift_7" android:keyLabel="7" />
|
||||
<Key android:codes="56" android:popupKeyboard="@xml/shift_8" android:keyLabel="8" />
|
||||
<Key android:codes="57" android:popupKeyboard="@xml/shift_9" android:keyLabel="9" />
|
||||
<Key android:codes="48" android:popupKeyboard="@xml/shift_0" android:keyLabel="0" />
|
||||
<Key android:codes="-5" android:keyEdgeFlags="right" android:keyLabel="@string/keyboardview_keycode_delete" android:keyIcon="@drawable/ic_ime_delete" />
|
||||
</Row>
|
||||
<Row>
|
||||
<Key android:keyLabel="ض" android:keyEdgeFlags="left" />
|
||||
<Key android:keyLabel="ص" />
|
||||
<Key android:keyLabel="ث" />
|
||||
<Key android:keyLabel="ق" />
|
||||
<Key android:keyLabel="ف" />
|
||||
<Key android:keyLabel="غ" />
|
||||
<Key android:keyLabel="ع" />
|
||||
<Key android:keyLabel="ه" />
|
||||
<Key android:keyLabel="خ" />
|
||||
<Key android:keyLabel="ح" />
|
||||
<Key android:keyLabel="ج" android:keyEdgeFlags="right" />
|
||||
</Row>
|
||||
<Row>
|
||||
<Key android:keyLabel="ش" android:keyEdgeFlags="left" />
|
||||
<Key android:keyLabel="س" />
|
||||
<Key android:keyLabel="ی" />
|
||||
<Key android:keyLabel="ب" />
|
||||
<Key android:keyLabel="ل" />
|
||||
<Key android:keyLabel="ا" />
|
||||
<Key android:keyLabel="ت" />
|
||||
<Key android:keyLabel="ن" />
|
||||
<Key android:keyLabel="م" />
|
||||
<Key android:keyLabel="ک" />
|
||||
<Key android:keyLabel="چ" android:keyEdgeFlags="right" />
|
||||
</Row>
|
||||
<Row>
|
||||
<Key android:keyLabel="ظ" android:keyEdgeFlags="left" />
|
||||
<Key android:keyLabel="ط" />
|
||||
<Key android:keyLabel="ژ" />
|
||||
<Key android:keyLabel="ز" />
|
||||
<Key android:keyLabel="ر" />
|
||||
<Key android:keyLabel="ذ" />
|
||||
<Key android:keyLabel="د" />
|
||||
<Key android:keyLabel="پ" />
|
||||
<Key android:keyLabel="و" />
|
||||
<Key android:keyLabel="ئ" />
|
||||
<Key android:keyEdgeFlags="right" android:keyLabel="گ" />
|
||||
</Row>
|
||||
<Row android:rowEdgeFlags="bottom">
|
||||
<Key android:codes="-2" android:keyEdgeFlags="left" android:keyLabel="@string/keyboardview_keycode_mode_change" android:keyIcon="@drawable/ic_ime_symbols" />
|
||||
<Key android:codes="-1" android:keyLabel="@string/keyboardview_keycode_shift" android:keyIcon="@drawable/ic_ime_shift_off" />
|
||||
<Key android:codes="-9" android:keyLabel="@string/keyboardview_keycode_lang" android:keyIcon="@drawable/ic_ime_world" />
|
||||
<Key android:keyWidth="@dimen/space_key_width" android:codes="32" android:keyLabel="@string/keyboardview_keycode_space" android:keyIcon="@drawable/ic_ime_space_fa" />
|
||||
<Key android:codes="-3" android:keyLabel="@string/keyboardview_keycode_left" android:keyIcon="@drawable/ic_ime_left_arrow" />
|
||||
<Key android:codes="-4" android:keyEdgeFlags="right" android:keyLabel="@string/keyboardview_keycode_right" android:keyIcon="@drawable/ic_ime_right_arrow" />
|
||||
</Row>
|
||||
</Keyboard>
|
||||
68
leankeykeyboard/src/main/res/xml/qwerty_fr.xml
Normal file
@@ -0,0 +1,68 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Keyboard android:keyWidth="@dimen/key_width" android:keyHeight="@dimen/key_height" android:horizontalGap="@dimen/keyboard_horizontal_gap" android:verticalGap="@dimen/keyboard_vertical_gap"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- All letters needed for German and Danish are in the C0 Controls and Basic Latin and C1 Controls and Latin-1 Supplement blocks. (See Wikipedia's list of languages supported by those blocks.)
|
||||
For Czech/Slovak, you also need Latin Extended-A.
|
||||
You should also include General Punctuation, as well as any other symbols you may use (e.g. Arrows).
|
||||
See http://en.wikipedia.org/wiki/Latin_characters_in_Unicode. -->
|
||||
<Row android:rowEdgeFlags="top">
|
||||
<Key android:codes="49" android:popupKeyboard="@xml/shift_1" android:keyEdgeFlags="left" android:keyLabel="1" />
|
||||
<Key android:codes="50" android:popupKeyboard="@xml/shift_2" android:keyLabel="2" />
|
||||
<Key android:codes="51" android:popupKeyboard="@xml/shift_3" android:keyLabel="3" />
|
||||
<Key android:codes="52" android:popupKeyboard="@xml/shift_4" android:keyLabel="4" />
|
||||
<Key android:codes="53" android:popupKeyboard="@xml/shift_5" android:keyLabel="5" />
|
||||
<Key android:codes="54" android:popupKeyboard="@xml/shift_6" android:keyLabel="6" />
|
||||
<Key android:codes="55" android:popupKeyboard="@xml/shift_7" android:keyLabel="7" />
|
||||
<Key android:codes="56" android:popupKeyboard="@xml/shift_8" android:keyLabel="8" />
|
||||
<Key android:codes="57" android:popupKeyboard="@xml/shift_9" android:keyLabel="9" />
|
||||
<Key android:codes="48" android:popupKeyboard="@xml/shift_0" android:keyLabel="0" />
|
||||
<Key android:codes="-5" android:keyEdgeFlags="right" android:keyLabel="@string/keyboardview_keycode_delete" android:keyIcon="@drawable/ic_ime_delete" />
|
||||
</Row>
|
||||
<Row>
|
||||
<Key android:codes="113" android:keyLabel="q" android:keyEdgeFlags="left" />
|
||||
<Key android:codes="119" android:keyLabel="w" />
|
||||
<Key android:codes="101" android:keyLabel="e" />
|
||||
<Key android:codes="114" android:keyLabel="r" />
|
||||
<Key android:codes="116" android:keyLabel="t" />
|
||||
<Key android:codes="121" android:keyLabel="y" />
|
||||
<Key android:codes="117" android:keyLabel="u" />
|
||||
<Key android:codes="105" android:keyLabel="i" />
|
||||
<Key android:codes="111" android:keyLabel="o" />
|
||||
<Key android:codes="112" android:keyLabel="p" />
|
||||
<Key android:codes="232" android:keyLabel="è" android:keyEdgeFlags="right" />
|
||||
</Row>
|
||||
<Row>
|
||||
<Key android:codes="97" android:keyLabel="a" android:keyEdgeFlags="left" />
|
||||
<Key android:codes="115" android:keyLabel="s" />
|
||||
<Key android:codes="100" android:keyLabel="d" />
|
||||
<Key android:codes="102" android:keyLabel="f" />
|
||||
<Key android:codes="103" android:keyLabel="g" />
|
||||
<Key android:codes="104" android:keyLabel="h" />
|
||||
<Key android:codes="106" android:keyLabel="j" />
|
||||
<Key android:codes="107" android:keyLabel="k" />
|
||||
<Key android:codes="108" android:keyLabel="l" />
|
||||
<Key android:codes="233" android:keyLabel="é" />
|
||||
<Key android:codes="224" android:keyLabel="à" android:keyEdgeFlags="right" />
|
||||
</Row>
|
||||
<Row>
|
||||
<Key android:codes="122" android:keyLabel="z" android:keyEdgeFlags="left" />
|
||||
<Key android:codes="120" android:keyLabel="x" />
|
||||
<Key android:codes="99" android:keyLabel="c" />
|
||||
<Key android:codes="118" android:keyLabel="v" />
|
||||
<Key android:codes="98" android:keyLabel="b" />
|
||||
<Key android:codes="110" android:keyLabel="n" />
|
||||
<Key android:codes="109" android:keyLabel="m" />
|
||||
<Key android:keyLabel="/" />
|
||||
<Key android:keyLabel="." />
|
||||
<Key android:keyLabel="-" />
|
||||
<Key android:keyEdgeFlags="right" android:keyLabel="\?" />
|
||||
</Row>
|
||||
<Row android:rowEdgeFlags="bottom">
|
||||
<Key android:codes="-2" android:keyEdgeFlags="left" android:keyLabel="@string/keyboardview_keycode_mode_change" android:keyIcon="@drawable/ic_ime_symbols" />
|
||||
<Key android:codes="-1" android:keyLabel="@string/keyboardview_keycode_shift" android:keyIcon="@drawable/ic_ime_shift_off" />
|
||||
<Key android:codes="-9" android:keyLabel="@string/keyboardview_keycode_lang" android:keyIcon="@drawable/ic_ime_world" />
|
||||
<Key android:keyWidth="@dimen/space_key_width" android:codes="32" android:keyLabel="@string/keyboardview_keycode_space" android:keyIcon="@drawable/ic_ime_space_fr" />
|
||||
<Key android:codes="-3" android:keyLabel="@string/keyboardview_keycode_left" android:keyIcon="@drawable/ic_ime_left_arrow" />
|
||||
<Key android:codes="-4" android:keyEdgeFlags="right" android:keyLabel="@string/keyboardview_keycode_right" android:keyIcon="@drawable/ic_ime_right_arrow" />
|
||||
</Row>
|
||||
</Keyboard>
|
||||
68
leankeykeyboard/src/main/res/xml/qwerty_he.xml
Normal file
@@ -0,0 +1,68 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Keyboard android:keyWidth="@dimen/key_width" android:keyHeight="@dimen/key_height" android:horizontalGap="@dimen/keyboard_horizontal_gap" android:verticalGap="@dimen/keyboard_vertical_gap"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- Key codes: https://en.wikipedia.org/wiki/Hebrew_(Unicode_block) -->
|
||||
<Row android:rowEdgeFlags="top">
|
||||
<Key android:codes="49" android:popupKeyboard="@xml/shift_1" android:keyEdgeFlags="left" android:keyLabel="1" />
|
||||
<Key android:codes="50" android:popupKeyboard="@xml/shift_2" android:keyLabel="2" />
|
||||
<Key android:codes="51" android:popupKeyboard="@xml/shift_3" android:keyLabel="3" />
|
||||
<Key android:codes="52" android:popupKeyboard="@xml/shift_4" android:keyLabel="4" />
|
||||
<Key android:codes="53" android:popupKeyboard="@xml/shift_5" android:keyLabel="5" />
|
||||
<Key android:codes="54" android:popupKeyboard="@xml/shift_6" android:keyLabel="6" />
|
||||
<Key android:codes="55" android:popupKeyboard="@xml/shift_7" android:keyLabel="7" />
|
||||
<Key android:codes="56" android:popupKeyboard="@xml/shift_8" android:keyLabel="8" />
|
||||
<Key android:codes="57" android:popupKeyboard="@xml/shift_9" android:keyLabel="9" />
|
||||
<Key android:codes="48" android:popupKeyboard="@xml/shift_0" android:keyLabel="0" />
|
||||
<Key android:codes="-5" android:keyEdgeFlags="right" android:keyLabel="@string/keyboardview_keycode_delete" android:keyIcon="@drawable/ic_ime_delete" />
|
||||
</Row>
|
||||
<Row>
|
||||
<Key android:codes="1509" android:keyLabel="ץ" android:keyEdgeFlags="left" />
|
||||
<Key android:codes="1511" android:keyLabel="ק" />
|
||||
<Key android:codes="1512" android:keyLabel="ר" />
|
||||
<Key android:codes="1488" android:keyLabel="א" />
|
||||
<Key android:codes="1496" android:keyLabel="ט" />
|
||||
<Key android:codes="1493" android:keyLabel="ו" />
|
||||
<Key android:codes="1503" android:keyLabel="ן" />
|
||||
<Key android:codes="1501" android:keyLabel="ם" />
|
||||
<Key android:codes="1508" android:keyLabel="פ" />
|
||||
<!-- Hebrew Punctuation -->
|
||||
<Key android:codes="1523" android:keyLabel="׳" />
|
||||
<Key android:codes="1524" android:keyLabel="״" android:keyEdgeFlags="right" />
|
||||
</Row>
|
||||
<Row>
|
||||
<Key android:codes="1513" android:keyLabel="ש" android:keyEdgeFlags="left" />
|
||||
<Key android:codes="1491" android:keyLabel="ד" />
|
||||
<Key android:codes="1490" android:keyLabel="ג" />
|
||||
<Key android:codes="1499" android:keyLabel="כ" />
|
||||
<Key android:codes="1506" android:keyLabel="ע" />
|
||||
<Key android:codes="1497" android:keyLabel="י" />
|
||||
<Key android:codes="1495" android:keyLabel="ח" />
|
||||
<Key android:codes="1500" android:keyLabel="ל" />
|
||||
<Key android:codes="1498" android:keyLabel="ך" />
|
||||
<Key android:codes="1507" android:keyLabel="ף" />
|
||||
<!-- Hebrew Punctuation -->
|
||||
<Key android:codes="1478" android:keyLabel="׆" android:keyEdgeFlags="right" />
|
||||
</Row>
|
||||
<Row>
|
||||
<Key android:codes="1494" android:keyLabel="ז" android:keyEdgeFlags="left" />
|
||||
<Key android:codes="1505" android:keyLabel="ס" />
|
||||
<Key android:codes="1489" android:keyLabel="ב" />
|
||||
<Key android:codes="1492" android:keyLabel="ה" />
|
||||
<Key android:codes="1504" android:keyLabel="נ" />
|
||||
<Key android:codes="1502" android:keyLabel="מ" />
|
||||
<Key android:codes="1510" android:keyLabel="צ" />
|
||||
<Key android:codes="1514" android:keyLabel="ת" />
|
||||
<!-- Hebrew Punctuation -->
|
||||
<Key android:codes="1470" android:keyLabel="־" />
|
||||
<Key android:codes="1472" android:keyLabel="׀" />
|
||||
<Key android:codes="1475" android:keyLabel="׃" android:keyEdgeFlags="right" />
|
||||
</Row>
|
||||
<Row android:rowEdgeFlags="bottom">
|
||||
<Key android:codes="-2" android:keyEdgeFlags="left" android:keyLabel="@string/keyboardview_keycode_mode_change" android:keyIcon="@drawable/ic_ime_symbols" />
|
||||
<Key android:codes="-1" android:keyLabel="@string/keyboardview_keycode_shift" android:keyIcon="@drawable/ic_ime_shift_off" />
|
||||
<Key android:codes="-9" android:keyLabel="@string/keyboardview_keycode_lang" android:keyIcon="@drawable/ic_ime_world" />
|
||||
<Key android:keyWidth="@dimen/space_key_width" android:codes="32" android:keyLabel="@string/keyboardview_keycode_space" android:keyIcon="@drawable/ic_ime_space_he" />
|
||||
<Key android:codes="-3" android:keyLabel="@string/keyboardview_keycode_left" android:keyIcon="@drawable/ic_ime_left_arrow" />
|
||||
<Key android:codes="-4" android:keyEdgeFlags="right" android:keyLabel="@string/keyboardview_keycode_right" android:keyIcon="@drawable/ic_ime_right_arrow" />
|
||||
</Row>
|
||||
</Keyboard>
|
||||
68
leankeykeyboard/src/main/res/xml/qwerty_it.xml
Normal file
@@ -0,0 +1,68 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Keyboard android:keyWidth="@dimen/key_width" android:keyHeight="@dimen/key_height" android:horizontalGap="@dimen/keyboard_horizontal_gap" android:verticalGap="@dimen/keyboard_vertical_gap"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- All letters needed for German and Danish are in the C0 Controls and Basic Latin and C1 Controls and Latin-1 Supplement blocks. (See Wikipedia's list of languages supported by those blocks.)
|
||||
For Czech/Slovak, you also need Latin Extended-A.
|
||||
You should also include General Punctuation, as well as any other symbols you may use (e.g. Arrows).
|
||||
See http://en.wikipedia.org/wiki/Latin_characters_in_Unicode. -->
|
||||
<Row android:rowEdgeFlags="top">
|
||||
<Key android:codes="49" android:popupKeyboard="@xml/shift_1" android:keyEdgeFlags="left" android:keyLabel="1" />
|
||||
<Key android:codes="50" android:popupKeyboard="@xml/shift_2" android:keyLabel="2" />
|
||||
<Key android:codes="51" android:popupKeyboard="@xml/shift_3" android:keyLabel="3" />
|
||||
<Key android:codes="52" android:popupKeyboard="@xml/shift_4" android:keyLabel="4" />
|
||||
<Key android:codes="53" android:popupKeyboard="@xml/shift_5" android:keyLabel="5" />
|
||||
<Key android:codes="54" android:popupKeyboard="@xml/shift_6" android:keyLabel="6" />
|
||||
<Key android:codes="55" android:popupKeyboard="@xml/shift_7" android:keyLabel="7" />
|
||||
<Key android:codes="56" android:popupKeyboard="@xml/shift_8" android:keyLabel="8" />
|
||||
<Key android:codes="57" android:popupKeyboard="@xml/shift_9" android:keyLabel="9" />
|
||||
<Key android:codes="48" android:popupKeyboard="@xml/shift_0" android:keyLabel="0" />
|
||||
<Key android:codes="-5" android:keyEdgeFlags="right" android:keyLabel="@string/keyboardview_keycode_delete" android:keyIcon="@drawable/ic_ime_delete" />
|
||||
</Row>
|
||||
<Row>
|
||||
<Key android:codes="113" android:keyLabel="q" android:keyEdgeFlags="left" />
|
||||
<Key android:codes="119" android:keyLabel="w" />
|
||||
<Key android:codes="101" android:keyLabel="e" android:popupCharacters="€" />
|
||||
<Key android:codes="114" android:keyLabel="r" />
|
||||
<Key android:codes="116" android:keyLabel="t" />
|
||||
<Key android:codes="121" android:keyLabel="y" />
|
||||
<Key android:codes="117" android:keyLabel="u" />
|
||||
<Key android:codes="105" android:keyLabel="i" />
|
||||
<Key android:codes="111" android:keyLabel="o" />
|
||||
<Key android:codes="112" android:keyLabel="p" />
|
||||
<Key android:keyLabel=":" android:keyEdgeFlags="right" />
|
||||
</Row>
|
||||
<Row>
|
||||
<Key android:codes="97" android:keyLabel="a" android:keyEdgeFlags="left" />
|
||||
<Key android:codes="115" android:keyLabel="s" />
|
||||
<Key android:codes="100" android:keyLabel="d" />
|
||||
<Key android:codes="102" android:keyLabel="f" />
|
||||
<Key android:codes="103" android:keyLabel="g" />
|
||||
<Key android:codes="104" android:keyLabel="h" />
|
||||
<Key android:codes="106" android:keyLabel="j" />
|
||||
<Key android:codes="107" android:keyLabel="k" />
|
||||
<Key android:codes="108" android:keyLabel="l" />
|
||||
<Key android:keyLabel="'" />
|
||||
<Key android:keyLabel="`" android:keyEdgeFlags="right" />
|
||||
</Row>
|
||||
<Row>
|
||||
<Key android:codes="122" android:keyLabel="z" android:keyEdgeFlags="left" />
|
||||
<Key android:codes="120" android:keyLabel="x" />
|
||||
<Key android:codes="99" android:keyLabel="c" />
|
||||
<Key android:codes="118" android:keyLabel="v" />
|
||||
<Key android:codes="98" android:keyLabel="b" />
|
||||
<Key android:codes="110" android:keyLabel="n" />
|
||||
<Key android:codes="109" android:keyLabel="m" />
|
||||
<Key android:codes="223" android:keyLabel=";" />
|
||||
<Key android:keyLabel="." />
|
||||
<Key android:keyLabel="/" />
|
||||
<Key android:keyLabel="\?" android:keyEdgeFlags="right" />
|
||||
</Row>
|
||||
<Row android:rowEdgeFlags="bottom">
|
||||
<Key android:codes="-2" android:keyEdgeFlags="left" android:keyLabel="@string/keyboardview_keycode_mode_change" android:keyIcon="@drawable/ic_ime_symbols" />
|
||||
<Key android:codes="-1" android:keyLabel="@string/keyboardview_keycode_shift" android:keyIcon="@drawable/ic_ime_shift_off" />
|
||||
<Key android:codes="-9" android:keyLabel="@string/keyboardview_keycode_lang" android:keyIcon="@drawable/ic_ime_world" />
|
||||
<Key android:keyWidth="@dimen/space_key_width" android:codes="32" android:keyLabel="@string/keyboardview_keycode_space" android:keyIcon="@drawable/ic_ime_space_it" />
|
||||
<Key android:codes="-3" android:keyLabel="@string/keyboardview_keycode_left" android:keyIcon="@drawable/ic_ime_left_arrow" />
|
||||
<Key android:codes="-4" android:keyEdgeFlags="right" android:keyLabel="@string/keyboardview_keycode_right" android:keyIcon="@drawable/ic_ime_right_arrow" />
|
||||
</Row>
|
||||
</Keyboard>
|
||||
68
leankeykeyboard/src/main/res/xml/qwerty_nl.xml
Normal file
@@ -0,0 +1,68 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Keyboard android:keyWidth="@dimen/key_width" android:keyHeight="@dimen/key_height" android:horizontalGap="@dimen/keyboard_horizontal_gap" android:verticalGap="@dimen/keyboard_vertical_gap"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- All letters needed for German and Danish are in the C0 Controls and Basic Latin and C1 Controls and Latin-1 Supplement blocks. (See Wikipedia's list of languages supported by those blocks.)
|
||||
For Czech/Slovak, you also need Latin Extended-A.
|
||||
You should also include General Punctuation, as well as any other symbols you may use (e.g. Arrows).
|
||||
See http://en.wikipedia.org/wiki/Latin_characters_in_Unicode. -->
|
||||
<Row android:rowEdgeFlags="top">
|
||||
<Key android:codes="49" android:popupKeyboard="@xml/shift_1" android:keyEdgeFlags="left" android:keyLabel="1" />
|
||||
<Key android:codes="50" android:popupKeyboard="@xml/shift_2" android:keyLabel="2" />
|
||||
<Key android:codes="51" android:popupKeyboard="@xml/shift_3" android:keyLabel="3" />
|
||||
<Key android:codes="52" android:popupKeyboard="@xml/shift_4" android:keyLabel="4" />
|
||||
<Key android:codes="53" android:popupKeyboard="@xml/shift_5" android:keyLabel="5" />
|
||||
<Key android:codes="54" android:popupKeyboard="@xml/shift_6" android:keyLabel="6" />
|
||||
<Key android:codes="55" android:popupKeyboard="@xml/shift_7" android:keyLabel="7" />
|
||||
<Key android:codes="56" android:popupKeyboard="@xml/shift_8" android:keyLabel="8" />
|
||||
<Key android:codes="57" android:popupKeyboard="@xml/shift_9" android:keyLabel="9" />
|
||||
<Key android:codes="48" android:popupKeyboard="@xml/shift_0" android:keyLabel="0" />
|
||||
<Key android:codes="-5" android:keyEdgeFlags="right" android:keyLabel="@string/keyboardview_keycode_delete" android:keyIcon="@drawable/ic_ime_delete" />
|
||||
</Row>
|
||||
<Row>
|
||||
<Key android:codes="113" android:keyLabel="q" android:keyEdgeFlags="left" />
|
||||
<Key android:codes="119" android:keyLabel="w" />
|
||||
<Key android:codes="101" android:keyLabel="e" />
|
||||
<Key android:codes="114" android:keyLabel="r" />
|
||||
<Key android:codes="116" android:keyLabel="t" />
|
||||
<Key android:codes="121" android:keyLabel="y" />
|
||||
<Key android:codes="117" android:keyLabel="u" />
|
||||
<Key android:codes="105" android:keyLabel="i" />
|
||||
<Key android:codes="111" android:keyLabel="o" />
|
||||
<Key android:codes="112" android:keyLabel="p" />
|
||||
<Key android:codes="64" android:keyEdgeFlags="right" android:keyLabel="\@" />
|
||||
</Row>
|
||||
<Row>
|
||||
<Key android:codes="97" android:keyLabel="a" android:keyEdgeFlags="left" />
|
||||
<Key android:codes="115" android:keyLabel="s" />
|
||||
<Key android:codes="100" android:keyLabel="d" />
|
||||
<Key android:codes="102" android:keyLabel="f" />
|
||||
<Key android:codes="103" android:keyLabel="g" />
|
||||
<Key android:codes="104" android:keyLabel="h" />
|
||||
<Key android:codes="106" android:keyLabel="j" />
|
||||
<Key android:codes="107" android:keyLabel="k" />
|
||||
<Key android:codes="108" android:keyLabel="l" />
|
||||
<Key android:codes="95" android:keyLabel="_" />
|
||||
<Key android:codes="38" android:keyEdgeFlags="right" android:keyLabel="&" />
|
||||
</Row>
|
||||
<Row>
|
||||
<Key android:codes="122" android:keyLabel="z" android:keyEdgeFlags="left" />
|
||||
<Key android:codes="120" android:keyLabel="x" />
|
||||
<Key android:codes="99" android:keyLabel="c" />
|
||||
<Key android:codes="118" android:keyLabel="v" />
|
||||
<Key android:codes="98" android:keyLabel="b" />
|
||||
<Key android:codes="110" android:keyLabel="n" />
|
||||
<Key android:codes="109" android:keyLabel="m" />
|
||||
<Key android:keyLabel="ij" />
|
||||
<Key android:codes="46" android:keyLabel="." />
|
||||
<Key android:codes="45" android:keyLabel="-" />
|
||||
<Key android:codes="63" android:keyEdgeFlags="right" android:keyLabel="\?" />
|
||||
</Row>
|
||||
<Row android:rowEdgeFlags="bottom">
|
||||
<Key android:codes="-2" android:keyEdgeFlags="left" android:keyLabel="@string/keyboardview_keycode_mode_change" android:keyIcon="@drawable/ic_ime_symbols" />
|
||||
<Key android:codes="-1" android:keyLabel="@string/keyboardview_keycode_shift" android:keyIcon="@drawable/ic_ime_shift_off" />
|
||||
<Key android:codes="-9" android:keyLabel="@string/keyboardview_keycode_lang" android:keyIcon="@drawable/ic_ime_world" />
|
||||
<Key android:keyWidth="@dimen/space_key_width" android:codes="32" android:keyLabel="@string/keyboardview_keycode_space" android:keyIcon="@drawable/ic_ime_space_nl" />
|
||||
<Key android:codes="-3" android:keyLabel="@string/keyboardview_keycode_left" android:keyIcon="@drawable/ic_ime_left_arrow" />
|
||||
<Key android:codes="-4" android:keyEdgeFlags="right" android:keyLabel="@string/keyboardview_keycode_right" android:keyIcon="@drawable/ic_ime_right_arrow" />
|
||||
</Row>
|
||||
</Keyboard>
|
||||
64
leankeykeyboard/src/main/res/xml/qwerty_ru.xml
Normal file
@@ -0,0 +1,64 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Keyboard android:keyWidth="@dimen/key_width" android:keyHeight="@dimen/key_height" android:horizontalGap="@dimen/keyboard_horizontal_gap" android:verticalGap="@dimen/keyboard_vertical_gap"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<Row android:rowEdgeFlags="top">
|
||||
<Key android:codes="49" android:popupKeyboard="@xml/shift_1" android:keyEdgeFlags="left" android:keyLabel="1" />
|
||||
<Key android:codes="50" android:popupKeyboard="@xml/shift_2" android:keyLabel="2" />
|
||||
<Key android:codes="51" android:popupKeyboard="@xml/shift_3" android:keyLabel="3" />
|
||||
<Key android:codes="52" android:popupKeyboard="@xml/shift_4" android:keyLabel="4" />
|
||||
<Key android:codes="53" android:popupKeyboard="@xml/shift_5" android:keyLabel="5" />
|
||||
<Key android:codes="54" android:popupKeyboard="@xml/shift_6" android:keyLabel="6" />
|
||||
<Key android:codes="55" android:popupKeyboard="@xml/shift_7" android:keyLabel="7" />
|
||||
<Key android:codes="56" android:popupKeyboard="@xml/shift_8" android:keyLabel="8" />
|
||||
<Key android:codes="57" android:popupKeyboard="@xml/shift_9" android:keyLabel="9" />
|
||||
<Key android:codes="48" android:popupKeyboard="@xml/shift_0" android:keyLabel="0" />
|
||||
<Key android:codes="-5" android:keyEdgeFlags="right" android:keyLabel="@string/keyboardview_keycode_delete" android:keyIcon="@drawable/ic_ime_delete" />
|
||||
</Row>
|
||||
<Row>
|
||||
<Key android:keyEdgeFlags="left" android:keyLabel="й" />
|
||||
<Key android:keyLabel="ц" />
|
||||
<Key android:keyLabel="у" />
|
||||
<Key android:keyLabel="к" />
|
||||
<Key android:keyLabel="е" />
|
||||
<Key android:keyLabel="н" />
|
||||
<Key android:keyLabel="г" />
|
||||
<Key android:keyLabel="ш" />
|
||||
<Key android:keyLabel="щ" />
|
||||
<Key android:keyLabel="з" />
|
||||
<Key android:keyEdgeFlags="right" android:keyLabel="х" />
|
||||
</Row>
|
||||
<Row>
|
||||
<Key android:popupKeyboard="@xml/accent_a" android:keyEdgeFlags="left" android:keyLabel="ф" />
|
||||
<Key android:keyLabel="ы" />
|
||||
<Key android:keyLabel="в" />
|
||||
<Key android:keyLabel="а" />
|
||||
<Key android:keyLabel="п" />
|
||||
<Key android:keyLabel="р" />
|
||||
<Key android:keyLabel="о" />
|
||||
<Key android:keyLabel="л" />
|
||||
<Key android:keyLabel="д" />
|
||||
<Key android:keyLabel="ж" />
|
||||
<Key android:keyEdgeFlags="right" android:keyLabel="э" />
|
||||
</Row>
|
||||
<Row>
|
||||
<Key android:keyEdgeFlags="left" android:keyLabel="я" />
|
||||
<Key android:keyLabel="ч" />
|
||||
<Key android:keyLabel="с" />
|
||||
<Key android:keyLabel="м" />
|
||||
<Key android:keyLabel="и" />
|
||||
<Key android:keyLabel="т" />
|
||||
<Key android:keyLabel="ь" />
|
||||
<Key android:keyLabel="б" />
|
||||
<Key android:keyLabel="ю" />
|
||||
<Key android:codes="45" android:keyLabel="-" />
|
||||
<Key android:codes="63" android:keyEdgeFlags="right" android:keyLabel="\?" />
|
||||
</Row>
|
||||
<Row android:rowEdgeFlags="bottom">
|
||||
<Key android:codes="-2" android:keyEdgeFlags="left" android:keyLabel="@string/keyboardview_keycode_mode_change" android:keyIcon="@drawable/ic_ime_symbols" />
|
||||
<Key android:codes="-1" android:keyLabel="@string/keyboardview_keycode_shift" android:keyIcon="@drawable/ic_ime_shift_off" />
|
||||
<Key android:codes="-9" android:keyLabel="@string/keyboardview_keycode_lang" android:keyIcon="@drawable/ic_ime_world" />
|
||||
<Key android:keyWidth="@dimen/space_key_width" android:codes="32" android:keyLabel="@string/keyboardview_keycode_space" android:keyIcon="@drawable/ic_ime_space_ru" />
|
||||
<Key android:codes="-3" android:keyLabel="@string/keyboardview_keycode_left" android:keyIcon="@drawable/ic_ime_left_arrow" />
|
||||
<Key android:codes="-4" android:keyEdgeFlags="right" android:keyLabel="@string/keyboardview_keycode_right" android:keyIcon="@drawable/ic_ime_right_arrow" />
|
||||
</Row>
|
||||
</Keyboard>
|
||||
66
leankeykeyboard/src/main/res/xml/qwerty_th.xml
Normal file
@@ -0,0 +1,66 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Keyboard android:keyWidth="@dimen/key_width" android:keyHeight="@dimen/key_height" android:horizontalGap="@dimen/keyboard_horizontal_gap" android:verticalGap="@dimen/keyboard_vertical_gap"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- Thai keyboard -->
|
||||
<!-- https://en.wikipedia.org/wiki/Thai_(Unicode_block) -->
|
||||
<Row android:rowEdgeFlags="top">
|
||||
<Key android:codes="49" android:popupKeyboard="@xml/shift_1" android:keyEdgeFlags="left" android:keyLabel="1" />
|
||||
<Key android:codes="50" android:popupKeyboard="@xml/shift_2" android:keyLabel="2" />
|
||||
<Key android:codes="51" android:popupKeyboard="@xml/shift_3" android:keyLabel="3" />
|
||||
<Key android:codes="52" android:popupKeyboard="@xml/shift_4" android:keyLabel="4" />
|
||||
<Key android:codes="53" android:popupKeyboard="@xml/shift_5" android:keyLabel="5" />
|
||||
<Key android:codes="54" android:popupKeyboard="@xml/shift_6" android:keyLabel="6" />
|
||||
<Key android:codes="55" android:popupKeyboard="@xml/shift_7" android:keyLabel="7" />
|
||||
<Key android:codes="56" android:popupKeyboard="@xml/shift_8" android:keyLabel="8" />
|
||||
<Key android:codes="57" android:popupKeyboard="@xml/shift_9" android:keyLabel="9" />
|
||||
<Key android:codes="48" android:popupKeyboard="@xml/shift_0" android:keyLabel="0" />
|
||||
<Key android:codes="-5" android:keyEdgeFlags="right" android:keyLabel="@string/keyboardview_keycode_delete" android:keyIcon="@drawable/ic_ime_delete" />
|
||||
</Row>
|
||||
<Row>
|
||||
<Key android:popupKeyboard="@xml/accent_q_th" android:keyLabel="ฝ" android:keyEdgeFlags="left" />
|
||||
<Key android:popupKeyboard="@xml/accent_w_th" android:keyLabel="๒" />
|
||||
<Key android:popupKeyboard="@xml/accent_e_th" android:keyLabel="๓" />
|
||||
<Key android:popupKeyboard="@xml/accent_r_th" android:keyLabel="ู" />
|
||||
<Key android:popupKeyboard="@xml/accent_t_th" android:keyLabel="ค" />
|
||||
<Key android:popupKeyboard="@xml/accent_y_th" android:keyLabel="๖" />
|
||||
<Key android:popupKeyboard="@xml/accent_u_th" android:keyLabel="ข" />
|
||||
<Key android:popupKeyboard="@xml/accent_i_th" android:keyLabel="๙" />
|
||||
<Key android:popupKeyboard="@xml/accent_o_th" android:keyLabel="ไ" />
|
||||
<Key android:popupKeyboard="@xml/accent_p_th" android:keyLabel="พ" />
|
||||
<Key android:popupKeyboard="@xml/accent_p2_th" android:keyLabel="ธ" android:keyEdgeFlags="right" />
|
||||
</Row>
|
||||
<Row>
|
||||
<Key android:popupKeyboard="@xml/accent_a_th" android:keyLabel="ี" android:keyEdgeFlags="left" />
|
||||
<Key android:popupKeyboard="@xml/accent_s_th" android:keyLabel="ณ" />
|
||||
<Key android:popupKeyboard="@xml/accent_d_th" android:keyLabel="ย" />
|
||||
<Key android:popupKeyboard="@xml/accent_f_th" android:keyLabel="ฐ" />
|
||||
<Key android:popupKeyboard="@xml/accent_g_th" android:keyLabel="ล" />
|
||||
<Key android:popupKeyboard="@xml/accent_h_th" android:keyLabel="ฅ" />
|
||||
<Key android:popupKeyboard="@xml/accent_j_th" android:keyLabel="ฃ" />
|
||||
<Key android:keyLabel="ฟ" />
|
||||
<Key android:keyLabel="ฤ" />
|
||||
<Key android:keyLabel="ห" />
|
||||
<Key android:keyLabel="ş" android:keyEdgeFlags="right" />
|
||||
</Row>
|
||||
<Row>
|
||||
<Key android:popupKeyboard="@xml/accent_z_th" android:keyLabel="ฆ" android:keyEdgeFlags="left" />
|
||||
<Key android:popupKeyboard="@xml/accent_x_th" android:keyLabel="ด" />
|
||||
<Key android:popupKeyboard="@xml/accent_c_th" android:keyLabel="็" />
|
||||
<Key android:keyLabel="า" />
|
||||
<Key android:keyLabel="ษ" />
|
||||
<Key android:keyLabel="ส" />
|
||||
<Key android:keyLabel="ศ" />
|
||||
<Key android:keyLabel="ว" />
|
||||
<Key android:keyLabel="ซ" />
|
||||
<Key android:keyLabel="ง" />
|
||||
<Key android:keyLabel="," android:keyEdgeFlags="right" />
|
||||
</Row>
|
||||
<Row android:rowEdgeFlags="bottom">
|
||||
<Key android:codes="-2" android:keyEdgeFlags="left" android:keyLabel="@string/keyboardview_keycode_mode_change" android:keyIcon="@drawable/ic_ime_symbols" />
|
||||
<Key android:codes="-1" android:keyLabel="@string/keyboardview_keycode_shift" android:keyIcon="@drawable/ic_ime_shift_off" />
|
||||
<Key android:codes="-9" android:keyLabel="@string/keyboardview_keycode_lang" android:keyIcon="@drawable/ic_ime_world" />
|
||||
<Key android:keyWidth="@dimen/space_key_width" android:codes="32" android:keyLabel="@string/keyboardview_keycode_space" android:keyIcon="@drawable/ic_ime_space_th" />
|
||||
<Key android:codes="-3" android:keyLabel="@string/keyboardview_keycode_left" android:keyIcon="@drawable/ic_ime_left_arrow" />
|
||||
<Key android:codes="-4" android:keyEdgeFlags="right" android:keyLabel="@string/keyboardview_keycode_right" android:keyIcon="@drawable/ic_ime_right_arrow" />
|
||||
</Row>
|
||||
</Keyboard>
|
||||
68
leankeykeyboard/src/main/res/xml/qwerty_tr.xml
Normal file
@@ -0,0 +1,68 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Keyboard android:keyWidth="@dimen/key_width" android:keyHeight="@dimen/key_height" android:horizontalGap="@dimen/keyboard_horizontal_gap" android:verticalGap="@dimen/keyboard_vertical_gap"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- All letters needed for German and Danish are in the C0 Controls and Basic Latin and C1 Controls and Latin-1 Supplement blocks. (See Wikipedia's list of languages supported by those blocks.)
|
||||
For Czech/Slovak, you also need Latin Extended-A.
|
||||
You should also include General Punctuation, as well as any other symbols you may use (e.g. Arrows).
|
||||
See http://en.wikipedia.org/wiki/Latin_characters_in_Unicode. -->
|
||||
<Row android:rowEdgeFlags="top">
|
||||
<Key android:codes="49" android:popupKeyboard="@xml/shift_1" android:keyEdgeFlags="left" android:keyLabel="1" />
|
||||
<Key android:codes="50" android:popupKeyboard="@xml/shift_2" android:keyLabel="2" />
|
||||
<Key android:codes="51" android:popupKeyboard="@xml/shift_3" android:keyLabel="3" />
|
||||
<Key android:codes="52" android:popupKeyboard="@xml/shift_4" android:keyLabel="4" />
|
||||
<Key android:codes="53" android:popupKeyboard="@xml/shift_5" android:keyLabel="5" />
|
||||
<Key android:codes="54" android:popupKeyboard="@xml/shift_6" android:keyLabel="6" />
|
||||
<Key android:codes="55" android:popupKeyboard="@xml/shift_7" android:keyLabel="7" />
|
||||
<Key android:codes="56" android:popupKeyboard="@xml/shift_8" android:keyLabel="8" />
|
||||
<Key android:codes="57" android:popupKeyboard="@xml/shift_9" android:keyLabel="9" />
|
||||
<Key android:codes="48" android:popupKeyboard="@xml/shift_0" android:keyLabel="0" />
|
||||
<Key android:codes="-5" android:keyEdgeFlags="right" android:keyLabel="@string/keyboardview_keycode_delete" android:keyIcon="@drawable/ic_ime_delete" />
|
||||
</Row>
|
||||
<Row>
|
||||
<Key android:keyLabel="f" android:keyEdgeFlags="left" />
|
||||
<Key android:keyLabel="g" />
|
||||
<Key android:keyLabel="ğ" />
|
||||
<Key android:keyLabel="ı" />
|
||||
<Key android:keyLabel="o" />
|
||||
<Key android:keyLabel="d" />
|
||||
<Key android:keyLabel="r" />
|
||||
<Key android:keyLabel="n" />
|
||||
<Key android:keyLabel="h" />
|
||||
<Key android:keyLabel="p" />
|
||||
<Key android:keyLabel="q" android:keyEdgeFlags="right" />
|
||||
</Row>
|
||||
<Row>
|
||||
<Key android:keyLabel="u" android:keyEdgeFlags="left" />
|
||||
<Key android:keyLabel="İ" />
|
||||
<Key android:keyLabel="e" />
|
||||
<Key android:keyLabel="a" />
|
||||
<Key android:keyLabel="ü" />
|
||||
<Key android:keyLabel="t" />
|
||||
<Key android:keyLabel="k" />
|
||||
<Key android:keyLabel="m" />
|
||||
<Key android:keyLabel="l" />
|
||||
<Key android:keyLabel="y" />
|
||||
<Key android:keyLabel="ş" android:keyEdgeFlags="right" />
|
||||
</Row>
|
||||
<Row>
|
||||
<Key android:keyLabel="j" android:keyEdgeFlags="left" />
|
||||
<Key android:keyLabel="ö" />
|
||||
<Key android:keyLabel="v" />
|
||||
<Key android:keyLabel="c" />
|
||||
<Key android:keyLabel="ç" />
|
||||
<Key android:keyLabel="z" />
|
||||
<Key android:keyLabel="s" />
|
||||
<Key android:keyLabel="b" />
|
||||
<Key android:keyLabel="w" />
|
||||
<Key android:keyLabel="x" />
|
||||
<Key android:keyLabel=";" android:keyEdgeFlags="right" />
|
||||
</Row>
|
||||
<Row android:rowEdgeFlags="bottom">
|
||||
<Key android:codes="-2" android:keyEdgeFlags="left" android:keyLabel="@string/keyboardview_keycode_mode_change" android:keyIcon="@drawable/ic_ime_symbols" />
|
||||
<Key android:codes="-1" android:keyLabel="@string/keyboardview_keycode_shift" android:keyIcon="@drawable/ic_ime_shift_off" />
|
||||
<Key android:codes="-9" android:keyLabel="@string/keyboardview_keycode_lang" android:keyIcon="@drawable/ic_ime_world" />
|
||||
<Key android:keyWidth="@dimen/space_key_width" android:codes="32" android:keyLabel="@string/keyboardview_keycode_space" android:keyIcon="@drawable/ic_ime_space_tr" />
|
||||
<Key android:codes="-3" android:keyLabel="@string/keyboardview_keycode_left" android:keyIcon="@drawable/ic_ime_left_arrow" />
|
||||
<Key android:codes="-4" android:keyEdgeFlags="right" android:keyLabel="@string/keyboardview_keycode_right" android:keyIcon="@drawable/ic_ime_right_arrow" />
|
||||
</Row>
|
||||
</Keyboard>
|
||||
64
leankeykeyboard/src/main/res/xml/qwerty_uk.xml
Normal file
@@ -0,0 +1,64 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Keyboard android:keyWidth="@dimen/key_width" android:keyHeight="@dimen/key_height" android:horizontalGap="@dimen/keyboard_horizontal_gap" android:verticalGap="@dimen/keyboard_vertical_gap"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<Row android:rowEdgeFlags="top">
|
||||
<Key android:codes="49" android:popupKeyboard="@xml/shift_1" android:keyEdgeFlags="left" android:keyLabel="1" />
|
||||
<Key android:codes="50" android:popupKeyboard="@xml/shift_2" android:keyLabel="2" />
|
||||
<Key android:codes="51" android:popupKeyboard="@xml/shift_3" android:keyLabel="3" />
|
||||
<Key android:codes="52" android:popupKeyboard="@xml/shift_4" android:keyLabel="4" />
|
||||
<Key android:codes="53" android:popupKeyboard="@xml/shift_5" android:keyLabel="5" />
|
||||
<Key android:codes="54" android:popupKeyboard="@xml/shift_6" android:keyLabel="6" />
|
||||
<Key android:codes="55" android:popupKeyboard="@xml/shift_7" android:keyLabel="7" />
|
||||
<Key android:codes="56" android:popupKeyboard="@xml/shift_8" android:keyLabel="8" />
|
||||
<Key android:codes="57" android:popupKeyboard="@xml/shift_9" android:keyLabel="9" />
|
||||
<Key android:codes="48" android:popupKeyboard="@xml/shift_0" android:keyLabel="0" />
|
||||
<Key android:codes="-5" android:keyEdgeFlags="right" android:keyLabel="@string/keyboardview_keycode_delete" android:keyIcon="@drawable/ic_ime_delete" />
|
||||
</Row>
|
||||
<Row>
|
||||
<Key android:keyEdgeFlags="left" android:keyLabel="й" />
|
||||
<Key android:keyLabel="ц" />
|
||||
<Key android:keyLabel="у" />
|
||||
<Key android:keyLabel="к" />
|
||||
<Key android:keyLabel="е" />
|
||||
<Key android:keyLabel="н" />
|
||||
<Key android:keyLabel="г" />
|
||||
<Key android:keyLabel="ш" />
|
||||
<Key android:keyLabel="щ" />
|
||||
<Key android:keyLabel="з" />
|
||||
<Key android:keyEdgeFlags="right" android:keyLabel="х" />
|
||||
</Row>
|
||||
<Row>
|
||||
<Key android:popupKeyboard="@xml/accent_a" android:keyEdgeFlags="left" android:keyLabel="ф" />
|
||||
<Key android:keyLabel="і" />
|
||||
<Key android:keyLabel="в" />
|
||||
<Key android:keyLabel="а" />
|
||||
<Key android:keyLabel="п" />
|
||||
<Key android:keyLabel="р" />
|
||||
<Key android:keyLabel="о" />
|
||||
<Key android:keyLabel="л" />
|
||||
<Key android:keyLabel="д" />
|
||||
<Key android:keyLabel="ж" />
|
||||
<Key android:keyEdgeFlags="right" android:keyLabel="є" />
|
||||
</Row>
|
||||
<Row>
|
||||
<Key android:keyEdgeFlags="left" android:keyLabel="я" />
|
||||
<Key android:keyLabel="ч" />
|
||||
<Key android:keyLabel="с" />
|
||||
<Key android:keyLabel="м" />
|
||||
<Key android:keyLabel="и" />
|
||||
<Key android:keyLabel="т" />
|
||||
<Key android:keyLabel="ь" />
|
||||
<Key android:keyLabel="б" />
|
||||
<Key android:keyLabel="ю" />
|
||||
<Key android:keyLabel="ї" />
|
||||
<Key android:keyEdgeFlags="right" android:keyLabel="`" />
|
||||
</Row>
|
||||
<Row android:rowEdgeFlags="bottom">
|
||||
<Key android:codes="-2" android:keyEdgeFlags="left" android:keyLabel="@string/keyboardview_keycode_mode_change" android:keyIcon="@drawable/ic_ime_symbols" />
|
||||
<Key android:codes="-1" android:keyLabel="@string/keyboardview_keycode_shift" android:keyIcon="@drawable/ic_ime_shift_off" />
|
||||
<Key android:codes="-9" android:keyLabel="@string/keyboardview_keycode_lang" android:keyIcon="@drawable/ic_ime_world" />
|
||||
<Key android:keyWidth="@dimen/space_key_width" android:codes="32" android:keyLabel="@string/keyboardview_keycode_space" android:keyIcon="@drawable/ic_ime_space_uk" />
|
||||
<Key android:codes="-3" android:keyLabel="@string/keyboardview_keycode_left" android:keyIcon="@drawable/ic_ime_left_arrow" />
|
||||
<Key android:codes="-4" android:keyEdgeFlags="right" android:keyLabel="@string/keyboardview_keycode_right" android:keyIcon="@drawable/ic_ime_right_arrow" />
|
||||
</Row>
|
||||
</Keyboard>
|
||||
@@ -1,4 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- NOTE: this is root english keyboard -->
|
||||
<Keyboard android:keyWidth="@dimen/key_width" android:keyHeight="@dimen/key_height" android:horizontalGap="@dimen/keyboard_horizontal_gap" android:verticalGap="@dimen/keyboard_vertical_gap"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<Row android:rowEdgeFlags="top">
|
||||
@@ -56,7 +57,8 @@
|
||||
<Row android:rowEdgeFlags="bottom">
|
||||
<Key android:codes="-2" android:keyEdgeFlags="left" android:keyLabel="@string/keyboardview_keycode_mode_change" android:keyIcon="@drawable/ic_ime_symbols" />
|
||||
<Key android:codes="-1" android:keyLabel="@string/keyboardview_keycode_shift" android:keyIcon="@drawable/ic_ime_shift_off" />
|
||||
<Key android:keyWidth="@dimen/space_key_width" android:codes="32" android:keyLabel="@string/keyboardview_keycode_space" android:keyIcon="@drawable/ic_ime_space" />
|
||||
<Key android:codes="-9" android:keyLabel="@string/keyboardview_keycode_lang" android:keyIcon="@drawable/ic_ime_world" />
|
||||
<Key android:keyWidth="@dimen/space_key_width" android:codes="32" android:keyLabel="@string/keyboardview_keycode_space" android:keyIcon="@drawable/ic_ime_space_en" />
|
||||
<Key android:codes="-3" android:keyLabel="@string/keyboardview_keycode_left" android:keyIcon="@drawable/ic_ime_left_arrow" />
|
||||
<Key android:codes="-4" android:keyEdgeFlags="right" android:keyLabel="@string/keyboardview_keycode_right" android:keyIcon="@drawable/ic_ime_right_arrow" />
|
||||
</Row>
|
||||
|
||||
@@ -56,6 +56,7 @@
|
||||
<Row android:rowEdgeFlags="bottom">
|
||||
<Key android:codes="-2" android:keyEdgeFlags="left" android:keyLabel="@string/keyboardview_keycode_mode_change" android:keyIcon="@drawable/ic_ime_alphabet" />
|
||||
<Key android:codes="-1" android:keyLabel="@string/keyboardview_keycode_shift" android:keyIcon="@drawable/ic_ime_shift_off" />
|
||||
<Key android:codes="-9" android:keyLabel="@string/keyboardview_keycode_lang" android:keyIcon="@drawable/ic_ime_world" />
|
||||
<Key android:keyWidth="@dimen/space_key_width" android:codes="32" android:keyLabel="@string/keyboardview_keycode_space" android:keyIcon="@drawable/ic_ime_space" />
|
||||
<Key android:codes="-3" android:keyLabel="@string/keyboardview_keycode_left" android:keyIcon="@drawable/ic_ime_left_arrow" />
|
||||
<Key android:codes="-4" android:keyEdgeFlags="right" android:keyLabel="@string/keyboardview_keycode_right" android:keyIcon="@drawable/ic_ime_right_arrow" />
|
||||
|
||||