Add language switch key to symbols and symbols shifted layout
Bug: 6370179 Change-Id: I061559ea5d0cb11a059de4b6e741f9c17ee69a27main
parent
a4b846ac73
commit
3ce085079f
|
@ -21,6 +21,9 @@
|
||||||
<merge
|
<merge
|
||||||
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
|
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
|
||||||
>
|
>
|
||||||
|
<Spacer
|
||||||
|
latin:keyWidth="0dp"
|
||||||
|
latin:keyXPos="30.750%p" />
|
||||||
<switch>
|
<switch>
|
||||||
<case
|
<case
|
||||||
latin:languageCode="fa"
|
latin:languageCode="fa"
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<merge
|
<merge
|
||||||
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
|
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
|
||||||
>
|
>
|
||||||
<Row
|
<Row
|
||||||
latin:keyWidth="8.9%p"
|
latin:keyWidth="8.9%p"
|
||||||
|
@ -31,10 +31,8 @@
|
||||||
latin:keyStyle="tabKeyStyle" />
|
latin:keyStyle="tabKeyStyle" />
|
||||||
<Key
|
<Key
|
||||||
latin:keyLabel="\@" />
|
latin:keyLabel="\@" />
|
||||||
<Key
|
<include
|
||||||
latin:keyStyle="spaceKeyStyle"
|
latin:keyboardLayout="@xml/key_space" />
|
||||||
latin:keyXPos="30.750%p"
|
|
||||||
latin:keyWidth="39.750%p" />
|
|
||||||
<Key
|
<Key
|
||||||
latin:keyLabel="""
|
latin:keyLabel="""
|
||||||
latin:moreKeys="!text/more_keys_for_tablet_double_quote" />
|
latin:moreKeys="!text/more_keys_for_tablet_double_quote" />
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<merge
|
<merge
|
||||||
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
|
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
|
||||||
>
|
>
|
||||||
<Row
|
<Row
|
||||||
latin:keyWidth="8.9%p"
|
latin:keyWidth="8.9%p"
|
||||||
|
@ -29,10 +29,8 @@
|
||||||
latin:keyWidth="13.0%p" />
|
latin:keyWidth="13.0%p" />
|
||||||
<Key
|
<Key
|
||||||
latin:keyStyle="tabKeyStyle" />
|
latin:keyStyle="tabKeyStyle" />
|
||||||
<Key
|
<include
|
||||||
latin:keyStyle="spaceKeyStyle"
|
latin:keyboardLayout="@xml/key_space" />
|
||||||
latin:keyXPos="30.750%p"
|
|
||||||
latin:keyWidth="39.750%p" />
|
|
||||||
<Spacer
|
<Spacer
|
||||||
latin:keyXPos="-10.00%p"
|
latin:keyXPos="-10.00%p"
|
||||||
latin:keyWidth="0%p" />
|
latin:keyWidth="0%p" />
|
||||||
|
|
|
@ -21,13 +21,15 @@
|
||||||
<merge
|
<merge
|
||||||
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
|
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
|
||||||
>
|
>
|
||||||
|
<Spacer
|
||||||
|
latin:keyWidth="0dp"
|
||||||
|
latin:keyXPos="31.250%p" />
|
||||||
<switch>
|
<switch>
|
||||||
<case
|
<case
|
||||||
latin:languageCode="fa"
|
latin:languageCode="fa"
|
||||||
>
|
>
|
||||||
<Key
|
<Key
|
||||||
latin:keyStyle="spaceKeyStyle"
|
latin:keyStyle="spaceKeyStyle"
|
||||||
latin:keyXPos="31.250%p"
|
|
||||||
latin:keyWidth="29.453%p" />
|
latin:keyWidth="29.453%p" />
|
||||||
<!-- U+200C: "" ZERO WIDTH NON-JOINER
|
<!-- U+200C: "" ZERO WIDTH NON-JOINER
|
||||||
U+200D: "" ZERO WIDTH JOINER -->
|
U+200D: "" ZERO WIDTH JOINER -->
|
||||||
|
@ -37,7 +39,6 @@
|
||||||
<default>
|
<default>
|
||||||
<Key
|
<Key
|
||||||
latin:keyStyle="spaceKeyStyle"
|
latin:keyStyle="spaceKeyStyle"
|
||||||
latin:keyXPos="31.250%p"
|
|
||||||
latin:keyWidth="37.500%p" />
|
latin:keyWidth="37.500%p" />
|
||||||
</default>
|
</default>
|
||||||
</switch>
|
</switch>
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<merge
|
<merge
|
||||||
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
|
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
|
||||||
>
|
>
|
||||||
<Row
|
<Row
|
||||||
latin:keyWidth="8.047%p"
|
latin:keyWidth="8.047%p"
|
||||||
|
@ -31,10 +31,8 @@
|
||||||
latin:keyXPos="15.157%p" />
|
latin:keyXPos="15.157%p" />
|
||||||
<Key
|
<Key
|
||||||
latin:keyLabel="\@" />
|
latin:keyLabel="\@" />
|
||||||
<Key
|
<include
|
||||||
latin:keyStyle="spaceKeyStyle"
|
latin:keyboardLayout="@xml/key_space" />
|
||||||
latin:keyXPos="31.250%p"
|
|
||||||
latin:keyWidth="37.500%p" />
|
|
||||||
<Key
|
<Key
|
||||||
latin:keyLabel="""
|
latin:keyLabel="""
|
||||||
latin:moreKeys="!text/more_keys_for_tablet_double_quote" />
|
latin:moreKeys="!text/more_keys_for_tablet_double_quote" />
|
||||||
|
|
|
@ -19,17 +19,15 @@
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<merge
|
<merge
|
||||||
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
|
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
|
||||||
>
|
>
|
||||||
<Row
|
<Row
|
||||||
latin:keyWidth="8.047%p"
|
latin:keyWidth="8.047%p"
|
||||||
>
|
>
|
||||||
<include
|
<include
|
||||||
latin:keyboardLayout="@xml/key_settings" />
|
latin:keyboardLayout="@xml/key_settings" />
|
||||||
<Key
|
<include
|
||||||
latin:keyStyle="spaceKeyStyle"
|
latin:keyboardLayout="@xml/key_space" />
|
||||||
latin:keyXPos="31.250%p"
|
|
||||||
latin:keyWidth="37.500%p" />
|
|
||||||
<switch>
|
<switch>
|
||||||
<case
|
<case
|
||||||
latin:shortcutKeyEnabled="true"
|
latin:shortcutKeyEnabled="true"
|
||||||
|
|
|
@ -21,6 +21,9 @@
|
||||||
<merge
|
<merge
|
||||||
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
|
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
|
||||||
>
|
>
|
||||||
|
<Spacer
|
||||||
|
latin:keyWidth="0dp"
|
||||||
|
latin:keyXPos="25%p" />
|
||||||
<switch>
|
<switch>
|
||||||
<case
|
<case
|
||||||
latin:languageCode="fa"
|
latin:languageCode="fa"
|
||||||
|
|
|
@ -43,9 +43,8 @@
|
||||||
latin:keyStyle="f1MoreKeysStyle" />
|
latin:keyStyle="f1MoreKeysStyle" />
|
||||||
</default>
|
</default>
|
||||||
</switch>
|
</switch>
|
||||||
<Key
|
<include
|
||||||
latin:keyStyle="spaceKeyStyle"
|
latin:keyboardLayout="@xml/key_space" />
|
||||||
latin:keyWidth="50%p" />
|
|
||||||
<Key
|
<Key
|
||||||
latin:keyStyle="punctuationKeyStyle" />
|
latin:keyStyle="punctuationKeyStyle" />
|
||||||
<Key
|
<Key
|
||||||
|
|
|
@ -35,9 +35,8 @@
|
||||||
<Key
|
<Key
|
||||||
latin:keyLabel="„"
|
latin:keyLabel="„"
|
||||||
latin:backgroundType="functional" />
|
latin:backgroundType="functional" />
|
||||||
<Key
|
<include
|
||||||
latin:keyStyle="spaceKeyStyle"
|
latin:keyboardLayout="@xml/key_space" />
|
||||||
latin:keyWidth="50%p" />
|
|
||||||
<!-- U+2026: "…" HORIZONTAL ELLIPSIS -->
|
<!-- U+2026: "…" HORIZONTAL ELLIPSIS -->
|
||||||
<Key
|
<Key
|
||||||
latin:keyLabel="…"
|
latin:keyLabel="…"
|
||||||
|
|
|
@ -313,8 +313,11 @@ public class Keyboard {
|
||||||
|
|
||||||
public void onAddKey(Key newKey) {
|
public void onAddKey(Key newKey) {
|
||||||
final Key key = (mKeysCache != null) ? mKeysCache.get(newKey) : newKey;
|
final Key key = (mKeysCache != null) ? mKeysCache.get(newKey) : newKey;
|
||||||
mKeys.add(key);
|
final boolean zeroWidthSpacer = key.isSpacer() && key.mWidth == 0;
|
||||||
updateHistogram(key);
|
if (!zeroWidthSpacer) {
|
||||||
|
mKeys.add(key);
|
||||||
|
updateHistogram(key);
|
||||||
|
}
|
||||||
if (key.mCode == Keyboard.CODE_SHIFT) {
|
if (key.mCode == Keyboard.CODE_SHIFT) {
|
||||||
mShiftKeys.add(key);
|
mShiftKeys.add(key);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue