Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
231c384db3 | ||
|
|
0d8a86cadd | ||
|
|
f948ba3bd4 | ||
|
|
1c65d017fb | ||
|
|
a7598c27eb | ||
|
|
ce62e91626 | ||
|
|
171d314230 |
@@ -46,4 +46,6 @@ __Standard installation via ADB__
|
|||||||
|
|
||||||
### Donation:
|
### Donation:
|
||||||
If you want to support my developments you are welcome to buy me a cup of coffee :)
|
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
|
||||||
|
|||||||
@@ -5,11 +5,11 @@ android {
|
|||||||
buildToolsVersion project.properties.buildToolsVersion
|
buildToolsVersion project.properties.buildToolsVersion
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "org.liskovsoft.androidtv.rukeyboard"
|
applicationId "org.liskovsoft.leankeykeyboard.pro"
|
||||||
minSdkVersion project.properties.minSdkVersion
|
minSdkVersion project.properties.minSdkVersion
|
||||||
targetSdkVersion project.properties.targetSdkVersion
|
targetSdkVersion project.properties.targetSdkVersion
|
||||||
versionCode 52
|
versionCode 53
|
||||||
versionName "3.2.0"
|
versionName "4.3.3"
|
||||||
|
|
||||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||||
|
|
||||||
@@ -20,6 +20,20 @@ android {
|
|||||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
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 {
|
dependencies {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<uses-feature android:name="android.hardware.microphone" android:required="false"/>
|
<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.RECEIVE_BOOT_COMPLETED"/>
|
||||||
<uses-permission android:name="android.permission.KILL_BACKGROUND_PROCESSES"/>
|
<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="LeanKey Keyboard Pro" android:icon="@drawable/ic_launcher" tools:targetApi="21">
|
||||||
<activity android:launchMode="singleTop" android:name="com.liskovsoft.inputchooser.SettingsActivity">
|
<activity android:launchMode="singleTop" android:name="com.liskovsoft.inputchooser.SettingsActivity">
|
||||||
<meta-data android:name="package" android:value="com.android.settings"/>
|
<meta-data android:name="package" android:value="com.android.settings"/>
|
||||||
<meta-data android:name="class" android:value="com.android.settings.Settings"/>
|
<meta-data android:name="class" android:value="com.android.settings.Settings"/>
|
||||||
|
|||||||
@@ -36,6 +36,8 @@ import android.widget.RelativeLayout.LayoutParams;
|
|||||||
import com.google.android.leanback.ime.voice.RecognizerView;
|
import com.google.android.leanback.ime.voice.RecognizerView;
|
||||||
import com.google.android.leanback.ime.voice.SpeechLevelSource;
|
import com.google.android.leanback.ime.voice.SpeechLevelSource;
|
||||||
import com.google.leanback.ime.LeanbackImeService;
|
import com.google.leanback.ime.LeanbackImeService;
|
||||||
|
import com.liskovsoft.inputchooser.ChooseKeyboardDialog;
|
||||||
|
import com.liskovsoft.inputchooser.LeanKeyPreferences;
|
||||||
import com.liskovsoft.keyboardaddons.KeyboardManager;
|
import com.liskovsoft.keyboardaddons.KeyboardManager;
|
||||||
import com.liskovsoft.leankeykeyboard.R;
|
import com.liskovsoft.leankeykeyboard.R;
|
||||||
|
|
||||||
@@ -59,6 +61,10 @@ public class LeanbackKeyboardContainer {
|
|||||||
public static final int TOUCH_STATE_TOUCH_SNAP = 1;
|
public static final int TOUCH_STATE_TOUCH_SNAP = 1;
|
||||||
private static final boolean VOICE_SUPPORTED = true;
|
private static final boolean VOICE_SUPPORTED = true;
|
||||||
public static final Interpolator sMovementInterpolator = new DecelerateInterpolator(1.5F);
|
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 mAbcKeyboard;
|
||||||
private Keyboard mAbcKeyboardRU;
|
private Keyboard mAbcKeyboardRU;
|
||||||
private Button mActionButtonView;
|
private Button mActionButtonView;
|
||||||
@@ -204,7 +210,7 @@ public class LeanbackKeyboardContainer {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void configureFocus(LeanbackKeyboardContainer.KeyFocus focus, Rect rect, int index, int type) {
|
private void configureFocus(LeanbackKeyboardContainer.KeyFocus focus, Rect rect, int index, int type) {
|
||||||
focus.type = type;
|
focus.type = type;
|
||||||
focus.index = index;
|
focus.index = index;
|
||||||
@@ -267,10 +273,10 @@ public class LeanbackKeyboardContainer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void initKeyboards() {
|
private void initKeyboards() {
|
||||||
this.mAbcKeyboard = new Keyboard(this.mContext, R.xml.qwerty_us);
|
mAbcKeyboard = new Keyboard(mContext, R.xml.qwerty_us);
|
||||||
this.mSymKeyboard = new Keyboard(this.mContext, R.xml.sym_us);
|
mSymKeyboard = new Keyboard(mContext, R.xml.sym_us);
|
||||||
this.updateAddonKeyboard();
|
updateAddonKeyboard();
|
||||||
this.mNumKeyboard = new Keyboard(this.mContext, R.xml.number);
|
mNumKeyboard = new Keyboard(mContext, R.xml.number);
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isMatch(Locale var1, Locale[] var2) {
|
private boolean isMatch(Locale var1, Locale[] var2) {
|
||||||
@@ -614,51 +620,58 @@ public class LeanbackKeyboardContainer {
|
|||||||
return mAutoEnterSpaceEnabled;
|
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) {
|
public boolean getBestFocus(final Float x, final Float y, final LeanbackKeyboardContainer.KeyFocus focus) {
|
||||||
this.offsetRect(this.mRect, this.mActionButtonView);
|
offsetRect(mRect, mActionButtonView);
|
||||||
int actionLeft = this.mRect.left;
|
int actionLeft = mRect.left;
|
||||||
this.offsetRect(this.mRect, this.mMainKeyboardView);
|
offsetRect(mRect, mMainKeyboardView);
|
||||||
int keyboardTop = this.mRect.top;
|
int keyboardTop = mRect.top;
|
||||||
Float newX = x;
|
Float newX = x;
|
||||||
if (x == null) {
|
if (x == null) {
|
||||||
newX = this.mX;
|
newX = mX;
|
||||||
}
|
}
|
||||||
|
|
||||||
Float newY = y;
|
Float newY = y;
|
||||||
if (y == null) {
|
if (y == null) {
|
||||||
newY = this.mY;
|
newY = mY;
|
||||||
}
|
}
|
||||||
|
|
||||||
int count = this.mSuggestions.getChildCount();
|
int count = mSuggestions.getChildCount();
|
||||||
if (newY < (float) keyboardTop && count > 0 && this.mSuggestionsEnabled) {
|
if (newY < (float) keyboardTop && count > 0 && mSuggestionsEnabled) {
|
||||||
for (actionLeft = 0; actionLeft < count; ++actionLeft) {
|
for (actionLeft = 0; actionLeft < count; ++actionLeft) {
|
||||||
View view = this.mSuggestions.getChildAt(actionLeft);
|
View view = mSuggestions.getChildAt(actionLeft);
|
||||||
this.offsetRect(this.mRect, view);
|
offsetRect(mRect, view);
|
||||||
if (newX < (float) this.mRect.right || actionLeft + 1 == count) {
|
if (newX < (float) mRect.right || actionLeft + 1 == count) {
|
||||||
view.requestFocus();
|
view.requestFocus();
|
||||||
LeanbackUtils.sendAccessibilityEvent(view.findViewById(R.id.text), true);
|
LeanbackUtils.sendAccessibilityEvent(view.findViewById(R.id.text), true);
|
||||||
this.configureFocus(focus, this.mRect, actionLeft, 3);
|
configureFocus(focus, mRect, actionLeft, KeyFocus.TYPE_SUGGESTION);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
} else if (newY < (float) keyboardTop && this.mEscapeNorthEnabled) {
|
} else if (newY < (float) keyboardTop && mEscapeNorthEnabled) {
|
||||||
this.escapeNorth();
|
escapeNorth();
|
||||||
return false;
|
return false;
|
||||||
} else if (newX > (float) actionLeft) {
|
} else if (newX > (float) actionLeft) {
|
||||||
this.offsetRect(this.mRect, this.mActionButtonView);
|
offsetRect(mRect, mActionButtonView);
|
||||||
this.configureFocus(focus, this.mRect, 0, 2);
|
configureFocus(focus, mRect, 0, KeyFocus.TYPE_ACTION);
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
this.mX = newX;
|
mX = newX;
|
||||||
this.mY = newY;
|
mY = newY;
|
||||||
this.offsetRect(this.mRect, this.mMainKeyboardView);
|
offsetRect(mRect, mMainKeyboardView);
|
||||||
final float left = (float) this.mRect.left;
|
final float left = (float) mRect.left;
|
||||||
final float top = (float) this.mRect.top;
|
final float top = (float) mRect.top;
|
||||||
actionLeft = this.mMainKeyboardView.getNearestIndex(Float.valueOf(newX - left), Float.valueOf(newY - top));
|
actionLeft = mMainKeyboardView.getNearestIndex(Float.valueOf(newX - left), Float.valueOf(newY - top));
|
||||||
Key key = this.mMainKeyboardView.getKey(actionLeft);
|
Key key = mMainKeyboardView.getKey(actionLeft);
|
||||||
this.configureFocus(focus, this.mRect, actionLeft, key, 0);
|
configureFocus(focus, mRect, actionLeft, key, 0);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -688,109 +701,109 @@ public class LeanbackKeyboardContainer {
|
|||||||
public boolean getNextFocusInDirection(int direction, LeanbackKeyboardContainer.KeyFocus startFocus, LeanbackKeyboardContainer.KeyFocus nextFocus) {
|
public boolean getNextFocusInDirection(int direction, LeanbackKeyboardContainer.KeyFocus startFocus, LeanbackKeyboardContainer.KeyFocus nextFocus) {
|
||||||
switch (startFocus.type) {
|
switch (startFocus.type) {
|
||||||
case KeyFocus.TYPE_MAIN:
|
case KeyFocus.TYPE_MAIN:
|
||||||
Key key = this.getKey(startFocus.type, startFocus.index);
|
Key key = getKey(startFocus.type, startFocus.index);
|
||||||
float var5 = (float) startFocus.rect.height() / 2.0F;
|
float centerDelta = (float) startFocus.rect.height() / 2.0F;
|
||||||
float var4 = (float) startFocus.rect.centerX();
|
float centerX = (float) startFocus.rect.centerX();
|
||||||
float var6 = (float) startFocus.rect.centerY();
|
float centerY = (float) startFocus.rect.centerY();
|
||||||
if (startFocus.code == 32) {
|
if (startFocus.code == 32) {
|
||||||
var4 = this.mX;
|
centerX = mX;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((direction & 1) != 0) {
|
if ((direction & DIRECTION_LEFT) != 0) {
|
||||||
if ((key.edgeFlags & 1) == 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) {
|
if ((key.edgeFlags & 2) != 0) {
|
||||||
this.offsetRect(this.mRect, this.mActionButtonView);
|
offsetRect(mRect, mActionButtonView);
|
||||||
var4 = (float) this.mRect.centerX();
|
centerX = (float) mRect.centerX();
|
||||||
} else {
|
} else {
|
||||||
var4 = (float) startFocus.rect.right + var5;
|
centerX = (float) startFocus.rect.right + centerDelta;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((direction & 8) != 0) {
|
if ((direction & DIRECTION_UP) != 0) {
|
||||||
var5 = (float) ((double) var6 - (double) startFocus.rect.height() * DIRECTION_STEP_MULTIPLIER);
|
centerDelta = (float) ((double) centerY - (double) startFocus.rect.height() * DIRECTION_STEP_MULTIPLIER);
|
||||||
} else {
|
} else {
|
||||||
var5 = var6;
|
centerDelta = centerY;
|
||||||
if ((direction & 2) != 0) {
|
if ((direction & DIRECTION_DOWN) != 0) {
|
||||||
var5 = (float) ((double) var6 + (double) startFocus.rect.height() * DIRECTION_STEP_MULTIPLIER);
|
centerDelta = (float) ((double) centerY + (double) startFocus.rect.height() * DIRECTION_STEP_MULTIPLIER);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.getPhysicalPosition(var4, var5, this.mTempPoint);
|
getPhysicalPosition(centerX, centerDelta, mTempPoint);
|
||||||
return this.getBestFocus(var4, var5, nextFocus);
|
return getBestFocus(centerX, centerDelta, nextFocus);
|
||||||
case KeyFocus.TYPE_VOICE:
|
case KeyFocus.TYPE_VOICE:
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
case KeyFocus.TYPE_ACTION:
|
case KeyFocus.TYPE_ACTION:
|
||||||
this.offsetRect(this.mRect, this.mMainKeyboardView);
|
offsetRect(mRect, mMainKeyboardView);
|
||||||
if ((direction & 1) != 0) {
|
if ((direction & DIRECTION_LEFT) != 0) {
|
||||||
return this.getBestFocus((float) this.mRect.right, null, nextFocus);
|
return getBestFocus((float) mRect.right, null, nextFocus);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((direction & 8) != 0) {
|
if ((direction & DIRECTION_UP) != 0) {
|
||||||
this.offsetRect(this.mRect, this.mSuggestions);
|
offsetRect(mRect, mSuggestions);
|
||||||
return this.getBestFocus((float) startFocus.rect.centerX(), (float) this.mRect.centerY(), nextFocus);
|
return getBestFocus((float) startFocus.rect.centerX(), (float) mRect.centerY(), nextFocus);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case KeyFocus.TYPE_SUGGESTION:
|
case KeyFocus.TYPE_SUGGESTION:
|
||||||
if ((direction & 2) != 0) {
|
if ((direction & DIRECTION_DOWN) != 0) {
|
||||||
this.offsetRect(this.mRect, this.mMainKeyboardView);
|
offsetRect(mRect, mMainKeyboardView);
|
||||||
return this.getBestFocus((float) startFocus.rect.centerX(), (float) this.mRect.top, nextFocus);
|
return getBestFocus((float) startFocus.rect.centerX(), (float) mRect.top, nextFocus);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((direction & 8) != 0) {
|
if ((direction & DIRECTION_UP) != 0) {
|
||||||
if (this.mEscapeNorthEnabled) {
|
if (mEscapeNorthEnabled) {
|
||||||
this.escapeNorth();
|
escapeNorth();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
boolean var7;
|
boolean left;
|
||||||
if ((direction & 1) != 0) {
|
if ((direction & DIRECTION_LEFT) != 0) {
|
||||||
var7 = true;
|
left = true;
|
||||||
} else {
|
} else {
|
||||||
var7 = false;
|
left = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean var12;
|
boolean right;
|
||||||
if ((direction & 4) != 0) {
|
if ((direction & DIRECTION_RIGHT) != 0) {
|
||||||
var12 = true;
|
right = true;
|
||||||
} else {
|
} else {
|
||||||
var12 = false;
|
right = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (var7 || var12) {
|
if (left || right) {
|
||||||
this.offsetRect(this.mRect, this.mRootView);
|
offsetRect(mRect, mRootView);
|
||||||
MarginLayoutParams var11 = (MarginLayoutParams) this.mSuggestionsContainer.getLayoutParams();
|
MarginLayoutParams params = (MarginLayoutParams) mSuggestionsContainer.getLayoutParams();
|
||||||
int var8 = this.mRect.left + var11.leftMargin;
|
int leftCalc = mRect.left + params.leftMargin;
|
||||||
int var9 = this.mRect.right - var11.rightMargin;
|
int rightCalc = mRect.right - params.rightMargin;
|
||||||
int var10 = startFocus.index;
|
int focusIdx = startFocus.index;
|
||||||
byte var13;
|
byte delta;
|
||||||
if (var7) {
|
if (left) {
|
||||||
var13 = -1;
|
delta = -1;
|
||||||
} else {
|
} else {
|
||||||
var13 = 1;
|
delta = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
direction = var10 + var13;
|
int suggestIdx = focusIdx + delta;
|
||||||
View var14 = this.mSuggestions.getChildAt(direction);
|
View suggestion = mSuggestions.getChildAt(suggestIdx);
|
||||||
if (var14 != null) {
|
if (suggestion != null) {
|
||||||
this.offsetRect(this.mRect, var14);
|
offsetRect(mRect, suggestion);
|
||||||
if (this.mRect.left < var8 && this.mRect.right > var9) {
|
if (mRect.left < leftCalc && mRect.right > rightCalc) {
|
||||||
this.mRect.left = var8;
|
mRect.left = leftCalc;
|
||||||
this.mRect.right = var9;
|
mRect.right = rightCalc;
|
||||||
} else if (this.mRect.left < var8) {
|
} else if (mRect.left < leftCalc) {
|
||||||
this.mRect.right = this.mRect.width() + var8;
|
mRect.right = mRect.width() + leftCalc;
|
||||||
this.mRect.left = var8;
|
mRect.left = leftCalc;
|
||||||
} else if (this.mRect.right > var9) {
|
} else if (mRect.right > rightCalc) {
|
||||||
this.mRect.left = var9 - this.mRect.width();
|
mRect.left = rightCalc - mRect.width();
|
||||||
this.mRect.right = var9;
|
mRect.right = rightCalc;
|
||||||
}
|
}
|
||||||
|
|
||||||
var14.requestFocus();
|
suggestion.requestFocus();
|
||||||
LeanbackUtils.sendAccessibilityEvent(var14.findViewById(R.id.text), true);
|
LeanbackUtils.sendAccessibilityEvent(suggestion.findViewById(R.id.text), true);
|
||||||
this.configureFocus(nextFocus, this.mRect, direction, 3);
|
configureFocus(nextFocus, mRect, suggestIdx, KeyFocus.TYPE_SUGGESTION);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -800,72 +813,73 @@ public class LeanbackKeyboardContainer {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public CharSequence getSuggestionText(int var1) {
|
public CharSequence getSuggestionText(int idx) {
|
||||||
Object var3 = null;
|
CharSequence result = null;
|
||||||
CharSequence var2 = (CharSequence) var3;
|
if (idx >= 0) {
|
||||||
if (var1 >= 0) {
|
if (idx < this.mSuggestions.getChildCount()) {
|
||||||
var2 = (CharSequence) var3;
|
Button btn = (Button) this.mSuggestions.getChildAt(idx).findViewById(R.id.text);
|
||||||
if (var1 < this.mSuggestions.getChildCount()) {
|
if (btn != null) {
|
||||||
Button var4 = (Button) this.mSuggestions.getChildAt(var1).findViewById(R.id.text);
|
result = btn.getText();
|
||||||
var2 = (CharSequence) var3;
|
|
||||||
if (var4 != null) {
|
|
||||||
var2 = var4.getText();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return var2;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getTouchState() {
|
public int getTouchState() {
|
||||||
return this.mTouchState;
|
return mTouchState;
|
||||||
}
|
}
|
||||||
|
|
||||||
public RelativeLayout getView() {
|
public RelativeLayout getView() {
|
||||||
return this.mRootView;
|
return mRootView;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isCapsLockOn() {
|
public boolean isCapsLockOn() {
|
||||||
return this.mMainKeyboardView.getShiftState() == 2;
|
return mMainKeyboardView.getShiftState() == 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isCurrKeyShifted() {
|
public boolean isCurrKeyShifted() {
|
||||||
return this.mMainKeyboardView.isShifted();
|
return mMainKeyboardView.isShifted();
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isMiniKeyboardOnScreen() {
|
public boolean isMiniKeyboardOnScreen() {
|
||||||
return this.mMainKeyboardView.isMiniKeyboardOnScreen();
|
return mMainKeyboardView.isMiniKeyboardOnScreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isVoiceEnabled() {
|
public boolean isVoiceEnabled() {
|
||||||
return this.mVoiceEnabled;
|
return mVoiceEnabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isVoiceVisible() {
|
public boolean isVoiceVisible() {
|
||||||
return this.mVoiceButtonView.getVisibility() == 0;
|
return mVoiceButtonView.getVisibility() == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onInitInputView() {
|
public void onInitInputView() {
|
||||||
this.resetFocusCursor();
|
resetFocusCursor();
|
||||||
this.mSelector.setVisibility(View.VISIBLE);
|
mSelector.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean onKeyLongPress() {
|
public boolean onKeyLongPress() {
|
||||||
int var1 = this.mCurrKeyInfo.code;
|
int keyCode = mCurrKeyInfo.code;
|
||||||
if (var1 == -1) {
|
if (keyCode == LeanbackKeyboardView.KEYCODE_SHIFT) {
|
||||||
this.onToggleCapsLock();
|
onToggleCapsLock();
|
||||||
this.setTouchState(0);
|
setTouchState(LeanbackKeyboardContainer.TOUCH_STATE_NO_TOUCH);
|
||||||
return true;
|
return true;
|
||||||
} else if (var1 == 32) {
|
} else if (keyCode == LeanbackKeyboardView.ASCII_SPACE) {
|
||||||
this.switchToNextKeyboard();
|
switchToNextKeyboard();
|
||||||
this.setTouchState(0);
|
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;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
if (this.mCurrKeyInfo.type == 0) {
|
if (mCurrKeyInfo.type == KeyFocus.TYPE_MAIN) {
|
||||||
this.mMainKeyboardView.onKeyLongPress();
|
mMainKeyboardView.onKeyLongPress();
|
||||||
if (this.mMainKeyboardView.isMiniKeyboardOnScreen()) {
|
if (mMainKeyboardView.isMiniKeyboardOnScreen()) {
|
||||||
this.mMiniKbKeyIndex = this.mCurrKeyInfo.index;
|
mMiniKbKeyIndex = mCurrKeyInfo.index;
|
||||||
this.moveFocusToIndex(this.mMainKeyboardView.getBaseMiniKbIndex(), 0);
|
moveFocusToIndex(mMainKeyboardView.getBaseMiniKbIndex(), KeyFocus.TYPE_MAIN);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1107,6 +1121,8 @@ public class LeanbackKeyboardContainer {
|
|||||||
Keyboard keyboard = mKeyboardManager.getNextKeyboard();
|
Keyboard keyboard = mKeyboardManager.getNextKeyboard();
|
||||||
mInitialMainKeyboard = keyboard;
|
mInitialMainKeyboard = keyboard;
|
||||||
keyboardView.setKeyboard(keyboard);
|
keyboardView.setKeyboard(keyboard);
|
||||||
|
|
||||||
|
showRunOnceDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateAddonKeyboard() {
|
public void updateAddonKeyboard() {
|
||||||
@@ -1139,6 +1155,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 {
|
public interface DismissListener {
|
||||||
void onDismiss(boolean var1);
|
void onDismiss(boolean var1);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -284,50 +284,57 @@ public class LeanbackKeyboardController implements LeanbackKeyboardContainer.Voi
|
|||||||
private void handleCommitKeyboardKey(int keyCode, CharSequence text) {
|
private void handleCommitKeyboardKey(int keyCode, CharSequence text) {
|
||||||
switch (keyCode) {
|
switch (keyCode) {
|
||||||
case LeanbackKeyboardView.KEYCODE_DISMISS_MINI_KEYBOARD:
|
case LeanbackKeyboardView.KEYCODE_DISMISS_MINI_KEYBOARD:
|
||||||
this.mContainer.dismissMiniKeyboard();
|
mContainer.dismissMiniKeyboard();
|
||||||
return;
|
return;
|
||||||
case LeanbackKeyboardView.KEYCODE_VOICE:
|
case LeanbackKeyboardView.KEYCODE_VOICE:
|
||||||
this.mContainer.startVoiceRecording();
|
mContainer.startVoiceRecording();
|
||||||
return;
|
return;
|
||||||
case LeanbackKeyboardView.KEYCODE_CAPS_LOCK:
|
case LeanbackKeyboardView.KEYCODE_CAPS_LOCK:
|
||||||
this.mContainer.onShiftDoubleClick(this.mContainer.isCapsLockOn());
|
mContainer.onShiftDoubleClick(mContainer.isCapsLockOn());
|
||||||
return;
|
return;
|
||||||
case LeanbackKeyboardView.KEYCODE_DELETE:
|
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;
|
return;
|
||||||
case LeanbackKeyboardView.KEYCODE_RIGHT:
|
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;
|
return;
|
||||||
case LeanbackKeyboardView.KEYCODE_LEFT:
|
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;
|
return;
|
||||||
case LeanbackKeyboardView.KEYCODE_SYM_TOGGLE:
|
case LeanbackKeyboardView.KEYCODE_SYM_TOGGLE:
|
||||||
if (Log.isLoggable("LbKbController", Log.DEBUG)) {
|
if (Log.isLoggable("LbKbController", Log.DEBUG)) {
|
||||||
Log.d("LbKbController", "mode change");
|
Log.d("LbKbController", "mode change");
|
||||||
}
|
}
|
||||||
|
|
||||||
this.mContainer.onModeChangeClick();
|
mContainer.onModeChangeClick();
|
||||||
return;
|
return;
|
||||||
case LeanbackKeyboardView.KEYCODE_SHIFT:
|
case LeanbackKeyboardView.KEYCODE_SHIFT:
|
||||||
if (Log.isLoggable("LbKbController", Log.DEBUG)) {
|
if (Log.isLoggable("LbKbController", Log.DEBUG)) {
|
||||||
Log.d("LbKbController", "shift");
|
Log.d("LbKbController", "shift");
|
||||||
}
|
}
|
||||||
|
|
||||||
this.mContainer.onShiftClick();
|
mContainer.onShiftClick();
|
||||||
return;
|
return;
|
||||||
case LeanbackKeyboardView.ASCII_SPACE:
|
case LeanbackKeyboardView.ASCII_SPACE:
|
||||||
this.mInputListener.onEntry(InputListener.ENTRY_TYPE_STRING, keyCode, " ");
|
mInputListener.onEntry(InputListener.ENTRY_TYPE_STRING, keyCode, " ");
|
||||||
this.mContainer.onSpaceEntry();
|
mContainer.onSpaceEntry();
|
||||||
return;
|
return;
|
||||||
case LeanbackKeyboardView.ASCII_PERIOD:
|
case LeanbackKeyboardView.ASCII_PERIOD:
|
||||||
this.mInputListener.onEntry(InputListener.ENTRY_TYPE_STRING, keyCode, text);
|
mInputListener.onEntry(InputListener.ENTRY_TYPE_STRING, keyCode, text);
|
||||||
this.mContainer.onPeriodEntry();
|
mContainer.onPeriodEntry();
|
||||||
|
return;
|
||||||
|
case LeanbackKeyboardView.KEYCODE_LANG_TOGGLE:
|
||||||
|
if (Log.isLoggable("LbKbController", Log.DEBUG)) {
|
||||||
|
Log.d("LbKbController", "language change");
|
||||||
|
}
|
||||||
|
|
||||||
|
mContainer.onLangKeyClick();
|
||||||
return;
|
return;
|
||||||
default:
|
default:
|
||||||
this.mInputListener.onEntry(InputListener.ENTRY_TYPE_STRING, keyCode, text);
|
mInputListener.onEntry(InputListener.ENTRY_TYPE_STRING, keyCode, text);
|
||||||
this.mContainer.onTextEntry();
|
mContainer.onTextEntry();
|
||||||
if (this.mContainer.isMiniKeyboardOnScreen()) {
|
if (mContainer.isMiniKeyboardOnScreen()) {
|
||||||
this.mContainer.dismissMiniKeyboard();
|
mContainer.dismissMiniKeyboard();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -349,16 +356,16 @@ public class LeanbackKeyboardController implements LeanbackKeyboardContainer.Voi
|
|||||||
handled = true;
|
handled = true;
|
||||||
switch (keyCode) {
|
switch (keyCode) {
|
||||||
case KeyEvent.KEYCODE_DPAD_UP:
|
case KeyEvent.KEYCODE_DPAD_UP:
|
||||||
handled = onDirectionalMove(8);
|
handled = onDirectionalMove(LeanbackKeyboardContainer.DIRECTION_UP);
|
||||||
break;
|
break;
|
||||||
case KeyEvent.KEYCODE_DPAD_DOWN:
|
case KeyEvent.KEYCODE_DPAD_DOWN:
|
||||||
handled = onDirectionalMove(2);
|
handled = onDirectionalMove(LeanbackKeyboardContainer.DIRECTION_DOWN);
|
||||||
break;
|
break;
|
||||||
case KeyEvent.KEYCODE_DPAD_LEFT:
|
case KeyEvent.KEYCODE_DPAD_LEFT:
|
||||||
handled = onDirectionalMove(1);
|
handled = onDirectionalMove(LeanbackKeyboardContainer.DIRECTION_LEFT);
|
||||||
break;
|
break;
|
||||||
case KeyEvent.KEYCODE_DPAD_RIGHT:
|
case KeyEvent.KEYCODE_DPAD_RIGHT:
|
||||||
handled = onDirectionalMove(4);
|
handled = onDirectionalMove(LeanbackKeyboardContainer.DIRECTION_RIGHT);
|
||||||
break;
|
break;
|
||||||
case KeyEvent.KEYCODE_DPAD_CENTER:
|
case KeyEvent.KEYCODE_DPAD_CENTER:
|
||||||
case KeyEvent.KEYCODE_ENTER:
|
case KeyEvent.KEYCODE_ENTER:
|
||||||
@@ -366,7 +373,7 @@ public class LeanbackKeyboardController implements LeanbackKeyboardContainer.Voi
|
|||||||
mMoveCount = 0;
|
mMoveCount = 0;
|
||||||
mKeyDownKeyFocus = new LeanbackKeyboardContainer.KeyFocus();
|
mKeyDownKeyFocus = new LeanbackKeyboardContainer.KeyFocus();
|
||||||
mKeyDownKeyFocus.set(mContainer.getCurrFocus());
|
mKeyDownKeyFocus.set(mContainer.getCurrFocus());
|
||||||
} else if (eventRepeatCount == 1 && handleKeyLongPress(keyCode)) {
|
} else if (eventRepeatCount == 1 && handleKeyLongPress(keyCode)) { // space long press handler and others
|
||||||
mKeyDownKeyFocus = null;
|
mKeyDownKeyFocus = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -531,10 +538,10 @@ public class LeanbackKeyboardController implements LeanbackKeyboardContainer.Voi
|
|||||||
}
|
}
|
||||||
|
|
||||||
private boolean onDirectionalMove(int dir) {
|
private boolean onDirectionalMove(int dir) {
|
||||||
if (this.mContainer.getNextFocusInDirection(dir, this.mDownFocus, this.mTempFocus)) {
|
if (mContainer.getNextFocusInDirection(dir, mDownFocus, mTempFocus)) {
|
||||||
this.mContainer.setFocus(this.mTempFocus);
|
mContainer.setFocus(mTempFocus);
|
||||||
this.mDownFocus.set(this.mTempFocus);
|
mDownFocus.set(mTempFocus);
|
||||||
this.clearKeyIfNecessary();
|
clearKeyIfNecessary();
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -609,7 +616,7 @@ public class LeanbackKeyboardController implements LeanbackKeyboardContainer.Voi
|
|||||||
mInputListener.onEntry(InputListener.ENTRY_TYPE_DISMISS, LeanbackKeyboardView.SHIFT_OFF, null);
|
mInputListener.onEntry(InputListener.ENTRY_TYPE_DISMISS, LeanbackKeyboardView.SHIFT_OFF, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean onGenericMotionEvent(MotionEvent event) {
|
public boolean onGenericMotionEvent(MotionEvent event) {
|
||||||
return mSpaceTracker != null && mContext != null && mContext.isInputViewShown() && mSpaceTracker.onGenericMotionEvent(event);
|
return mSpaceTracker != null && mContext != null && mContext.isInputViewShown() && mSpaceTracker.onGenericMotionEvent(event);
|
||||||
}
|
}
|
||||||
@@ -639,38 +646,38 @@ public class LeanbackKeyboardController implements LeanbackKeyboardContainer.Voi
|
|||||||
* @return is event handled
|
* @return is event handled
|
||||||
*/
|
*/
|
||||||
public boolean onKeyDown(int keyCode, KeyEvent event) {
|
public boolean onKeyDown(int keyCode, KeyEvent event) {
|
||||||
this.mDownFocus.set(this.mContainer.getCurrFocus());
|
mDownFocus.set(mContainer.getCurrFocus());
|
||||||
if (this.mSpaceTracker != null && this.mSpaceTracker.onKeyDown(keyCode, event)) {
|
if (mSpaceTracker != null && mSpaceTracker.onKeyDown(keyCode, event)) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
if (this.isEnterKey(keyCode)) {
|
if (isEnterKey(keyCode)) {
|
||||||
this.mKeyDownReceived = true;
|
mKeyDownReceived = true;
|
||||||
if (event.getRepeatCount() == 0) {
|
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) {
|
public boolean onKeyUp(int keyCode, KeyEvent keyEvent) {
|
||||||
if (this.mSpaceTracker != null && this.mSpaceTracker.onKeyUp(var1, var2)) {
|
if (mSpaceTracker != null && mSpaceTracker.onKeyUp(keyCode, keyEvent)) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
if (this.isEnterKey(var1)) {
|
if (isEnterKey(keyCode)) {
|
||||||
if (!this.mKeyDownReceived || this.mLongPressHandled) {
|
if (!mKeyDownReceived || mLongPressHandled) {
|
||||||
this.mLongPressHandled = false;
|
mLongPressHandled = false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.mKeyDownReceived = false;
|
mKeyDownReceived = false;
|
||||||
if (this.mContainer.getTouchState() == 3) {
|
if (mContainer.getTouchState() == 3) {
|
||||||
this.mContainer.setTouchState(1);
|
mContainer.setTouchState(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.handleKeyUpEvent(var1, var2.getEventTime());
|
return handleKeyUpEvent(keyCode, keyEvent.getEventTime());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,14 @@ import java.util.Iterator;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class LeanbackKeyboardView extends FrameLayout {
|
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;
|
public static final int ASCII_SPACE = 32;
|
||||||
private static final boolean DEBUG = false;
|
private static final boolean DEBUG = false;
|
||||||
public static final int KEYCODE_CAPS_LOCK = -6;
|
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_SHIFT = -1;
|
||||||
public static final int KEYCODE_SYM_TOGGLE = -2;
|
public static final int KEYCODE_SYM_TOGGLE = -2;
|
||||||
public static final int KEYCODE_VOICE = -7;
|
public static final int KEYCODE_VOICE = -7;
|
||||||
|
public static final int KEYCODE_LANG_TOGGLE = -9;
|
||||||
private static final int NOT_A_KEY = -1;
|
private static final int NOT_A_KEY = -1;
|
||||||
public static final int SHIFT_LOCKED = 2;
|
public static final int SHIFT_LOCKED = 2;
|
||||||
public static final int SHIFT_OFF = 0;
|
public static final int SHIFT_OFF = 0;
|
||||||
@@ -260,6 +268,8 @@ public class LeanbackKeyboardView extends FrameLayout {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get index of the key under cursor
|
* Get index of the key under cursor
|
||||||
|
* <br/>
|
||||||
|
* Resulted index depends on the space key position
|
||||||
* @param x x position
|
* @param x x position
|
||||||
* @param y y position
|
* @param y y position
|
||||||
* @return index of the key
|
* @return index of the key
|
||||||
@@ -296,16 +306,16 @@ public class LeanbackKeyboardView extends FrameLayout {
|
|||||||
|
|
||||||
indexFull += mColCount * result;
|
indexFull += mColCount * result;
|
||||||
result = indexFull;
|
result = indexFull;
|
||||||
if (indexFull > ASCII_PERIOD) {
|
if (indexFull > ASCII_PERIOD) { // key goes beyond space
|
||||||
result = indexFull;
|
result = indexFull;
|
||||||
if (indexFull < 53) {
|
if (indexFull < (ASCII_PERIOD + ASCII_PERIOD_LEN)) { // key stays within space boundary
|
||||||
result = ASCII_PERIOD;
|
result = ASCII_PERIOD;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
indexFull = result;
|
indexFull = result;
|
||||||
if (result >= 53) {
|
if (result >= (ASCII_PERIOD + ASCII_PERIOD_LEN)) { // is key position after space?
|
||||||
indexFull = result - 6;
|
indexFull = result - ASCII_PERIOD_LEN + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (indexFull < 0) {
|
if (indexFull < 0) {
|
||||||
|
|||||||
@@ -56,7 +56,6 @@ public class LeanbackImeService extends InputMethodService {
|
|||||||
if (!this.enableHardwareAcceleration()) {
|
if (!this.enableHardwareAcceleration()) {
|
||||||
Log.w("LbImeService", "Could not enable hardware acceleration");
|
Log.w("LbImeService", "Could not enable hardware acceleration");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void clearSuggestionsDelayed() {
|
private void clearSuggestionsDelayed() {
|
||||||
|
|||||||
@@ -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.content.Context;
|
||||||
import android.inputmethodservice.Keyboard;
|
import android.inputmethodservice.Keyboard;
|
||||||
import com.liskovsoft.keyboardaddons.apklangfactory.keyboards.KeyboardAddOnAndBuilder;
|
import com.liskovsoft.keyboardaddons.reslangfactory.ResKeyboardFactory;
|
||||||
import com.liskovsoft.keyboardaddons.apklangfactory.keyboards.ApkLangKeyboardFactory;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -11,9 +10,9 @@ import java.util.List;
|
|||||||
public class KeyboardManager {
|
public class KeyboardManager {
|
||||||
private final Keyboard mEnglishKeyboard;
|
private final Keyboard mEnglishKeyboard;
|
||||||
private final Context mContext;
|
private final Context mContext;
|
||||||
private final List<KeyboardAddOnAndBuilder> mKeyboardBuilders;
|
private List<? extends KeyboardBuilder> mKeyboardBuilders;
|
||||||
private final List<Keyboard> mAllKeyboards;
|
private List<Keyboard> mAllKeyboards;
|
||||||
private final ApkLangKeyboardFactory mKeyboardFactory;
|
private KeyboardFactory mKeyboardFactory;
|
||||||
private int mKeyboardIndex = 0;
|
private int mKeyboardIndex = 0;
|
||||||
|
|
||||||
public KeyboardManager(Context ctx, int keyboardResId) {
|
public KeyboardManager(Context ctx, int keyboardResId) {
|
||||||
@@ -23,8 +22,11 @@ public class KeyboardManager {
|
|||||||
public KeyboardManager(Context ctx, Keyboard englishKeyboard) {
|
public KeyboardManager(Context ctx, Keyboard englishKeyboard) {
|
||||||
mContext = ctx;
|
mContext = ctx;
|
||||||
mEnglishKeyboard = englishKeyboard;
|
mEnglishKeyboard = englishKeyboard;
|
||||||
mKeyboardFactory = new ApkLangKeyboardFactory();
|
init();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void init() {
|
||||||
|
mKeyboardFactory = new ResKeyboardFactory(mContext);
|
||||||
mKeyboardBuilders = mKeyboardFactory.getAllAvailableKeyboards(mContext);
|
mKeyboardBuilders = mKeyboardFactory.getAllAvailableKeyboards(mContext);
|
||||||
mAllKeyboards = buildAllKeyboards();
|
mAllKeyboards = buildAllKeyboards();
|
||||||
}
|
}
|
||||||
@@ -33,7 +35,7 @@ public class KeyboardManager {
|
|||||||
List<Keyboard> keyboards = new ArrayList<>();
|
List<Keyboard> keyboards = new ArrayList<>();
|
||||||
keyboards.add(mEnglishKeyboard);
|
keyboards.add(mEnglishKeyboard);
|
||||||
if (!mKeyboardBuilders.isEmpty()) {
|
if (!mKeyboardBuilders.isEmpty()) {
|
||||||
for (KeyboardAddOnAndBuilder builder : mKeyboardBuilders) {
|
for (KeyboardBuilder builder : mKeyboardBuilders) {
|
||||||
keyboards.add(builder.createKeyboard());
|
keyboards.add(builder.createKeyboard());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -45,7 +47,10 @@ public class KeyboardManager {
|
|||||||
* @return keyboard
|
* @return keyboard
|
||||||
*/
|
*/
|
||||||
public Keyboard getNextKeyboard() {
|
public Keyboard getNextKeyboard() {
|
||||||
++mKeyboardIndex;
|
if (mKeyboardFactory.needUpdate()) {
|
||||||
|
init();
|
||||||
|
}
|
||||||
|
|
||||||
mKeyboardIndex = mKeyboardIndex < mAllKeyboards.size() ? mKeyboardIndex : 0;
|
mKeyboardIndex = mKeyboardIndex < mAllKeyboards.size() ? mKeyboardIndex : 0;
|
||||||
|
|
||||||
Keyboard kbd = mAllKeyboards.get(mKeyboardIndex);
|
Keyboard kbd = mAllKeyboards.get(mKeyboardIndex);
|
||||||
@@ -53,6 +58,8 @@ public class KeyboardManager {
|
|||||||
throw new IllegalStateException(String.format("Keyboard %s not initialized", mKeyboardIndex));
|
throw new IllegalStateException(String.format("Keyboard %s not initialized", mKeyboardIndex));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
++mKeyboardIndex;
|
||||||
|
|
||||||
return kbd;
|
return kbd;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -67,24 +67,6 @@ public abstract class AddOnsFactory<E extends AddOn> {
|
|||||||
|
|
||||||
private static final String sTAG = "AddOnsFactory";
|
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) {
|
public static AddOn locateAddOn(String id, Context askContext) {
|
||||||
for (AddOnsFactory<?> factory : mActiveInstances) {
|
for (AddOnsFactory<?> factory : mActiveInstances) {
|
||||||
AddOn addOn = factory.getAddOnById(id, askContext);
|
AddOn addOn = factory.getAddOnById(id, askContext);
|
||||||
|
|||||||
@@ -19,31 +19,31 @@ package com.liskovsoft.keyboardaddons.apklangfactory.keyboards;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.support.annotation.Nullable;
|
import android.support.annotation.Nullable;
|
||||||
|
|
||||||
|
import com.liskovsoft.keyboardaddons.KeyboardBuilder;
|
||||||
import com.liskovsoft.keyboardaddons.apklangfactory.addons.AddOn;
|
import com.liskovsoft.keyboardaddons.apklangfactory.addons.AddOn;
|
||||||
import com.liskovsoft.keyboardaddons.apklangfactory.addons.AddOnImpl;
|
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_";
|
public static final String KEYBOARD_PREF_PREFIX = "keyboard_";
|
||||||
|
|
||||||
private final int mResId;
|
private final int mResId;
|
||||||
private final int mLandscapeResId;
|
private final int mLandscapeResId;
|
||||||
//private final int mIconResId;
|
|
||||||
private final String mDefaultDictionary;
|
private final String mDefaultDictionary;
|
||||||
private final int mQwertyTranslationId;
|
private final int mQwertyTranslationId;
|
||||||
private final String mAdditionalIsLetterExceptions;
|
private final String mAdditionalIsLetterExceptions;
|
||||||
private final String mSentenceSeparators;
|
private final String mSentenceSeparators;
|
||||||
private final boolean mKeyboardDefaultEnabled;
|
private final boolean mKeyboardDefaultEnabled;
|
||||||
|
|
||||||
public KeyboardAddOnAndBuilder(Context askContext, Context packageContext, String id, int nameResId,
|
public ApkKeyboardAddOnAndBuilder(Context askContext, Context packageContext, String id, int nameResId,
|
||||||
int layoutResId, int landscapeLayoutResId,
|
int layoutResId, int landscapeLayoutResId,
|
||||||
String defaultDictionary, int iconResId,
|
String defaultDictionary, int iconResId,
|
||||||
int physicalTranslationResId,
|
int physicalTranslationResId,
|
||||||
String additionalIsLetterExceptions,
|
String additionalIsLetterExceptions,
|
||||||
String sentenceSeparators,
|
String sentenceSeparators,
|
||||||
String description,
|
String description,
|
||||||
int keyboardIndex,
|
int keyboardIndex,
|
||||||
boolean keyboardDefaultEnabled) {
|
boolean keyboardDefaultEnabled) {
|
||||||
super(askContext, packageContext, KEYBOARD_PREF_PREFIX + id, nameResId, description, keyboardIndex);
|
super(askContext, packageContext, KEYBOARD_PREF_PREFIX + id, nameResId, description, keyboardIndex);
|
||||||
|
|
||||||
mResId = layoutResId;
|
mResId = layoutResId;
|
||||||
@@ -74,16 +74,10 @@ public class KeyboardAddOnAndBuilder extends AddOnImpl {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
|
@Override
|
||||||
public android.inputmethodservice.Keyboard createKeyboard() {
|
public android.inputmethodservice.Keyboard createKeyboard() {
|
||||||
Context remoteContext = getPackageContext();
|
Context remoteContext = getPackageContext();
|
||||||
if (remoteContext == null) return null;
|
if (remoteContext == null) return null;
|
||||||
return new android.inputmethodservice.Keyboard(remoteContext, mLandscapeResId);
|
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.text.TextUtils;
|
||||||
import android.util.AttributeSet;
|
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.AddOn;
|
||||||
import com.liskovsoft.keyboardaddons.apklangfactory.addons.AddOnsFactory;
|
import com.liskovsoft.keyboardaddons.apklangfactory.addons.AddOnsFactory;
|
||||||
import com.liskovsoft.keyboardaddons.apklangfactory.utils.Logger;
|
import com.liskovsoft.keyboardaddons.apklangfactory.utils.Logger;
|
||||||
@@ -31,7 +33,7 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
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 TAG = "ASK_KF";
|
||||||
|
|
||||||
private static final String XML_LAYOUT_RES_ID_ATTRIBUTE = "layoutResId";
|
private static final String XML_LAYOUT_RES_ID_ATTRIBUTE = "layoutResId";
|
||||||
@@ -50,20 +52,27 @@ public class ApkLangKeyboardFactory extends AddOnsFactory<KeyboardAddOnAndBuilde
|
|||||||
0, true);
|
0, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<KeyboardAddOnAndBuilder> getAllAvailableKeyboards(Context askContext) {
|
@Override
|
||||||
return getAllAddOns(askContext);
|
public List<? extends KeyboardBuilder> getAllAvailableKeyboards(Context context) {
|
||||||
|
return getAllAddOns(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<KeyboardAddOnAndBuilder> getEnabledKeyboards(Context askContext) {
|
@Override
|
||||||
final List<KeyboardAddOnAndBuilder> allAddOns = getAllAddOns(askContext);
|
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");
|
Logger.i(TAG, "Creating enabled addons list. I have a total of " + allAddOns.size() + " addons");
|
||||||
|
|
||||||
//getting shared prefs to determine which to create.
|
//getting shared prefs to determine which to create.
|
||||||
final SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(askContext);
|
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++) {
|
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());
|
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
|
// Check if there is any keyboards created if not, lets create a default english keyboard
|
||||||
if (enabledAddOns.size() == 0) {
|
if (enabledAddOns.size() == 0) {
|
||||||
final SharedPreferences.Editor editor = sharedPreferences.edit();
|
final SharedPreferences.Editor editor = sharedPreferences.edit();
|
||||||
final KeyboardAddOnAndBuilder addOn = allAddOns.get(0);
|
final ApkKeyboardAddOnAndBuilder addOn = allAddOns.get(0);
|
||||||
editor.putBoolean(addOn.getId(), true);
|
editor.putBoolean(addOn.getId(), true);
|
||||||
editor.commit();
|
editor.commit();
|
||||||
enabledAddOns.add(addOn);
|
enabledAddOns.add(addOn);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (final KeyboardAddOnAndBuilder addOn : enabledAddOns) {
|
for (final ApkKeyboardAddOnAndBuilder addOn : enabledAddOns) {
|
||||||
Logger.d(TAG, "Factory provided addon: %s", addOn.getId());
|
Logger.d(TAG, "Factory provided addon: %s", addOn.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -90,7 +99,7 @@ public class ApkLangKeyboardFactory extends AddOnsFactory<KeyboardAddOnAndBuilde
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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 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 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);
|
//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
|
+ " landscapeResId:" + landscapeLayoutResId
|
||||||
+ " iconResId:" + iconResId + " defaultDictionary:"
|
+ " iconResId:" + iconResId + " defaultDictionary:"
|
||||||
+ defaultDictionary);
|
+ defaultDictionary);
|
||||||
return new KeyboardAddOnAndBuilder(askContext, context,
|
return new ApkKeyboardAddOnAndBuilder(askContext, context,
|
||||||
prefId, nameId, layoutResId, landscapeLayoutResId,
|
prefId, nameId, layoutResId, landscapeLayoutResId,
|
||||||
defaultDictionary, iconResId, physicalTranslationResId,
|
defaultDictionary, iconResId, physicalTranslationResId,
|
||||||
additionalIsLetterExceptions, sentenceSeparators,
|
additionalIsLetterExceptions, sentenceSeparators,
|
||||||
@@ -127,7 +136,7 @@ public class ApkLangKeyboardFactory extends AddOnsFactory<KeyboardAddOnAndBuilde
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Keyboard createKeyboard(Context context) {
|
public Keyboard createKeyboard(Context context) {
|
||||||
List<KeyboardAddOnAndBuilder> keyboardBuilders = getAllAvailableKeyboards(context);
|
List<? extends KeyboardBuilder> keyboardBuilders = getAllAvailableKeyboards(context);
|
||||||
if (keyboardBuilders.size() == 0)
|
if (keyboardBuilders.size() == 0)
|
||||||
return new Keyboard(context, 0x7f04000c); // ru keyboard resource id
|
return new Keyboard(context, 0x7f04000c); // ru keyboard resource id
|
||||||
// remember, only one external keyboard supported
|
// 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: 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,18 @@
|
|||||||
<item>1.2</item>
|
<item>1.2</item>
|
||||||
<item>1.4</item>
|
<item>1.4</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
<string-array name="additional_languages">
|
||||||
|
<item>Russian|ru</item>
|
||||||
|
<item>Ukrainian|uk</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>
|
</resources>
|
||||||
|
|||||||
@@ -2,7 +2,12 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<dimen name="key_height">28.0dip</dimen>
|
<dimen name="key_height">28.0dip</dimen>
|
||||||
<dimen name="key_width">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_horizontal_gap">12.0dip</dimen>
|
||||||
<dimen name="keyboard_vertical_gap">8.0dip</dimen>
|
<dimen name="keyboard_vertical_gap">8.0dip</dimen>
|
||||||
<dimen name="recognizer_size">96.0dip</dimen>
|
<dimen name="recognizer_size">96.0dip</dimen>
|
||||||
@@ -22,4 +27,6 @@
|
|||||||
<dimen name="key_font_size">18.0sp</dimen>
|
<dimen name="key_font_size">18.0sp</dimen>
|
||||||
<dimen name="function_key_mode_change_font_size">16.0sp</dimen>
|
<dimen name="function_key_mode_change_font_size">16.0sp</dimen>
|
||||||
<dimen name="resize_move_distance">12.0dip</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>
|
</resources>
|
||||||
|
|||||||
@@ -18,9 +18,12 @@
|
|||||||
<string name="keyboardview_keycode_delete">Delete</string>
|
<string name="keyboardview_keycode_delete">Delete</string>
|
||||||
<string name="keyboardview_keycode_mode_change">Mode change</string>
|
<string name="keyboardview_keycode_mode_change">Mode change</string>
|
||||||
<string name="keyboardview_keycode_shift">Shift</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_caps">Caps Lock</string>
|
||||||
<string name="keyboardview_keycode_left">Left</string>
|
<string name="keyboardview_keycode_left">Left</string>
|
||||||
<string name="keyboardview_keycode_right">Right</string>
|
<string name="keyboardview_keycode_right">Right</string>
|
||||||
<string name="keyboard_headset_required_to_hear_password">Plug in a headset to hear password keys spoken.</string>
|
<string name="keyboard_headset_required_to_hear_password">Plug in a headset to hear password keys spoken.</string>
|
||||||
<string name="keyboard_password_character_no_headset">Dot.</string>
|
<string name="keyboard_password_character_no_headset">Dot.</string>
|
||||||
|
<string name="language_dialog_title">Select desired keyboards</string>
|
||||||
|
<string name="language_dialog_subtitle">To open dialog next time, long press on \'world\' button</string>
|
||||||
</resources>
|
</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>
|
||||||
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>
|
||||||
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>
|
||||||
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"?>
|
<?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"
|
<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">
|
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<Row android:rowEdgeFlags="top">
|
<Row android:rowEdgeFlags="top">
|
||||||
@@ -56,7 +57,8 @@
|
|||||||
<Row android:rowEdgeFlags="bottom">
|
<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="-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="-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="-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" />
|
<Key android:codes="-4" android:keyEdgeFlags="right" android:keyLabel="@string/keyboardview_keycode_right" android:keyIcon="@drawable/ic_ime_right_arrow" />
|
||||||
</Row>
|
</Row>
|
||||||
|
|||||||
@@ -56,6 +56,7 @@
|
|||||||
<Row android:rowEdgeFlags="bottom">
|
<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="-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="-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: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="-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" />
|
<Key android:codes="-4" android:keyEdgeFlags="right" android:keyLabel="@string/keyboardview_keycode_right" android:keyIcon="@drawable/ic_ime_right_arrow" />
|
||||||
|
|||||||
BIN
screenshots/screen4.png
Normal file
|
After Width: | Height: | Size: 68 KiB |