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