diff --git a/java/res/values/attrs.xml b/java/res/values/attrs.xml
index 16ff5077b..d79338a50 100644
--- a/java/res/values/attrs.xml
+++ b/java/res/values/attrs.xml
@@ -175,13 +175,6 @@
-
-
-
-
-
-
-
@@ -248,16 +241,6 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/java/res/xml-sw600dp/kbd_number.xml b/java/res/xml-sw600dp/kbd_number.xml
index b3a1010d7..46114dedf 100644
--- a/java/res/xml-sw600dp/kbd_number.xml
+++ b/java/res/xml-sw600dp/kbd_number.xml
@@ -30,11 +30,12 @@
-
+
+
+ latin:keyStyle="num1KeyStyle" />
+ latin:keyWidth="fillRight" />
+
+
+ latin:keyStyle="num4KeyStyle" />
+ latin:keyWidth="fillRight" />
+
+
+ latin:keyStyle="num7KeyStyle" />
+
+
-
+ latin:keyWidth="11.00%p" />
-
+
+
+ latin:keyWidth="fillBoth" />
+
+
+ latin:keyWidth="fillBoth" />
-
+
+
+
+
-
+ latin:keyWidth="11.00%p" />
diff --git a/java/res/xml-sw600dp/kbd_phone.xml b/java/res/xml-sw600dp/kbd_phone.xml
index dd53a206a..7b584c142 100644
--- a/java/res/xml-sw600dp/kbd_phone.xml
+++ b/java/res/xml-sw600dp/kbd_phone.xml
@@ -26,12 +26,13 @@
latin:keyboardLayout="@xml/kbd_key_styles" />
-
+
+
+ latin:keyWidth="fillBoth" />
+
+
+ latin:keyWidth="fillBoth" />
-
+ latin:keyWidth="11.0%p" />
+
+
-
+ latin:keyWidth="11.00%p" />
-
+
+
+ latin:keyWidth="fillBoth" />
+
+
+ latin:keyWidth="fillBoth" />
-
+ latin:keyWidth="11.00%p" />
+
+
-
+ latin:keyWidth="11.00%p" />
diff --git a/java/res/xml-sw600dp/kbd_qwerty_f2.xml b/java/res/xml-sw600dp/kbd_qwerty_f2.xml
index 7638ee4b4..3ea11805f 100644
--- a/java/res/xml-sw600dp/kbd_qwerty_f2.xml
+++ b/java/res/xml-sw600dp/kbd_qwerty_f2.xml
@@ -27,8 +27,7 @@
>
+ latin:keyWidth="fillBoth" />
+ latin:keyWidth="fillBoth" />
@@ -57,15 +55,13 @@
>
+ latin:keyWidth="fillBoth" />
+ latin:keyWidth="fillBoth" />
diff --git a/java/res/xml-sw600dp/kbd_qwerty_row1.xml b/java/res/xml-sw600dp/kbd_qwerty_row1.xml
index b781d681e..c7dfcc83d 100644
--- a/java/res/xml-sw600dp/kbd_qwerty_row1.xml
+++ b/java/res/xml-sw600dp/kbd_qwerty_row1.xml
@@ -23,12 +23,10 @@
>
+ latin:popupCharacters="@string/alternates_for_q" />
@@ -59,7 +57,6 @@
+ latin:keyWidth="fillBoth" />
diff --git a/java/res/xml-sw600dp/kbd_qwerty_row2.xml b/java/res/xml-sw600dp/kbd_qwerty_row2.xml
index 05b005af1..78004fe4f 100644
--- a/java/res/xml-sw600dp/kbd_qwerty_row2.xml
+++ b/java/res/xml-sw600dp/kbd_qwerty_row2.xml
@@ -27,8 +27,7 @@
+ latin:keyXPos="4.5%p" />
@@ -53,7 +52,6 @@
+ latin:keyWidth="fillBoth" />
diff --git a/java/res/xml-sw600dp/kbd_qwerty_row3.xml b/java/res/xml-sw600dp/kbd_qwerty_row3.xml
index b4eed8a7c..456f3c8ca 100644
--- a/java/res/xml-sw600dp/kbd_qwerty_row3.xml
+++ b/java/res/xml-sw600dp/kbd_qwerty_row3.xml
@@ -26,8 +26,7 @@
>
+ latin:keyWidth="10.0%p" />
diff --git a/java/res/xml-sw600dp/kbd_qwerty_row4.xml b/java/res/xml-sw600dp/kbd_qwerty_row4.xml
index 5cd47d913..f22b69f73 100644
--- a/java/res/xml-sw600dp/kbd_qwerty_row4.xml
+++ b/java/res/xml-sw600dp/kbd_qwerty_row4.xml
@@ -21,15 +21,13 @@
-
+ latin:keyWidth="13.0%p" />
diff --git a/java/res/xml-sw600dp/kbd_row3_smiley.xml b/java/res/xml-sw600dp/kbd_row3_smiley.xml
index 5e9584f2d..0ae3ae474 100644
--- a/java/res/xml-sw600dp/kbd_row3_smiley.xml
+++ b/java/res/xml-sw600dp/kbd_row3_smiley.xml
@@ -28,8 +28,7 @@
+ latin:keyWidth="fillBoth" />
+ latin:keyWidth="fillBoth" />
+ latin:keyWidth="fillBoth" />
+ latin:keyWidth="fillBoth" />
diff --git a/java/res/xml-sw600dp/kbd_rows_arabic.xml b/java/res/xml-sw600dp/kbd_rows_arabic.xml
index 4c1909438..4c20f51ca 100644
--- a/java/res/xml-sw600dp/kbd_rows_arabic.xml
+++ b/java/res/xml-sw600dp/kbd_rows_arabic.xml
@@ -27,8 +27,7 @@
latin:keyWidth="8.0%p"
>
+ latin:keyLabel="ض" />
+ latin:keyWidth="fillBoth" />
+ latin:keyWidth="fillBoth" />
+ latin:keyLabel="\@" />
+ latin:popupCharacters="_" />
+ latin:popupCharacters="+" />
+ latin:keyStyle="smileyKeyStyle" />
+ latin:popupCharacters="@string/alternates_for_a" />
@@ -61,8 +59,7 @@
+ latin:keyWidth="fillBoth" />
+ latin:keyXPos="5.0%p" />
@@ -98,16 +94,14 @@
+ latin:keyWidth="fillBoth" />
+ latin:keyWidth="10.0%p" />
diff --git a/java/res/xml-sw600dp/kbd_rows_hebrew.xml b/java/res/xml-sw600dp/kbd_rows_hebrew.xml
index 87409159e..fc2247cb0 100644
--- a/java/res/xml-sw600dp/kbd_rows_hebrew.xml
+++ b/java/res/xml-sw600dp/kbd_rows_hebrew.xml
@@ -25,7 +25,6 @@
latin:keyboardLayout="@xml/kbd_key_styles" />
@@ -48,8 +47,7 @@
+ latin:keyWidth="fillBoth" />
+ latin:keyWidth="10.0%p" />
+ latin:keyWidth="10.0%p" />
+ latin:keyWidth="10.0%p" />
+ latin:keyWidth="10.0%p" />
+ latin:keyWidth="fillBoth" />
diff --git a/java/res/xml-sw600dp/kbd_rows_qwertz.xml b/java/res/xml-sw600dp/kbd_rows_qwertz.xml
index 7ec895e0a..3d177e72d 100644
--- a/java/res/xml-sw600dp/kbd_rows_qwertz.xml
+++ b/java/res/xml-sw600dp/kbd_rows_qwertz.xml
@@ -25,12 +25,10 @@
latin:keyboardLayout="@xml/kbd_key_styles" />
+ latin:popupCharacters="@string/alternates_for_q" />
@@ -61,8 +59,7 @@
+ latin:keyWidth="fillBoth" />
@@ -71,8 +68,7 @@
>
+ latin:keyWidth="10.0%p" />
diff --git a/java/res/xml-sw600dp/kbd_rows_russian.xml b/java/res/xml-sw600dp/kbd_rows_russian.xml
index 445298982..7588f6ccb 100644
--- a/java/res/xml-sw600dp/kbd_rows_russian.xml
+++ b/java/res/xml-sw600dp/kbd_rows_russian.xml
@@ -25,11 +25,9 @@
latin:keyboardLayout="@xml/kbd_key_styles" />
+ latin:keyLabel="й" />
+ latin:keyWidth="fillBoth" />
+ latin:keyWidth="fillBoth" />
+ latin:keyStyle="shiftKeyStyle" />
+ latin:popupCharacters="@string/alternates_for_q" />
@@ -63,8 +61,7 @@
+ latin:keyWidth="fillBoth" />
+ latin:popupCharacters="@string/alternates_for_a" />
@@ -104,16 +100,14 @@
+ latin:keyWidth="fillBoth" />
+ latin:keyWidth="10.0%p" />
+ latin:keyXPos="2.15%p" />
+ latin:keyWidth="fillBoth" />
+ latin:keyLabel="а" />
+ latin:keyWidth="fillBoth" />
+ latin:keyWidth="8.0%p" />
+ latin:keyXPos="5.0%p" />
@@ -59,8 +58,7 @@
+ latin:keyWidth="fillBoth" />
diff --git a/java/res/xml-sw600dp/kbd_symbols.xml b/java/res/xml-sw600dp/kbd_symbols.xml
index 03d37b007..fc89cd3c5 100644
--- a/java/res/xml-sw600dp/kbd_symbols.xml
+++ b/java/res/xml-sw600dp/kbd_symbols.xml
@@ -25,14 +25,12 @@
latin:keyboardLayout="@xml/kbd_key_styles" />
-
+ latin:popupCharacters="@string/alternates_for_symbols_1" />
@@ -63,8 +61,7 @@
+ latin:keyWidth="fillBoth" />
+ latin:keyWidth="fillBoth" />
+ latin:keyWidth="10.0%p" />
@@ -147,15 +142,13 @@
latin:keyLabel="/"
latin:keyWidth="fillRight" />
-
+ latin:keyWidth="13.0%p" />
-
@@ -60,8 +59,7 @@
+ latin:keyWidth="fillBoth" />
+ latin:keyWidth="fillBoth" />
+ latin:keyWidth="10.0%p" />
-
+ latin:keyWidth="13.0%p" />
-
+ latin:keyWidth="11.172%p" />
@@ -47,13 +45,14 @@
+ latin:keyWidth="fillRight" />
+
+
+ latin:keyStyle="num4KeyStyle" />
+ latin:keyWidth="fillRight" />
+
+
+ latin:keyStyle="num7KeyStyle" />
-
+
+
-
-
+
+
-
+ latin:keyWidth="11.172%p" />
+ latin:keyWidth="fillRight" />
+
+
+ latin:keyWidth="fillRight" />
-
+
+
-
+
+
-
@@ -193,6 +188,11 @@
latin:keyStyle="settingsKeyStyle"
latin:keyWidth="8.047%p" />
+
+
+
+
+
+
+
+
diff --git a/java/res/xml-sw768dp/kbd_phone.xml b/java/res/xml-sw768dp/kbd_phone.xml
index 0935992fd..945b641ea 100644
--- a/java/res/xml-sw768dp/kbd_phone.xml
+++ b/java/res/xml-sw768dp/kbd_phone.xml
@@ -26,13 +26,11 @@
latin:keyboardLayout="@xml/kbd_key_styles" />
-
+ latin:keyWidth="11.172%p" />
+ latin:keyWidth="fillRight" />
+ latin:keyWidth="11.172%p" />
+ latin:keyWidth="fillRight" />
-
+
+
-
+
+
-
@@ -112,6 +107,11 @@
latin:keyStyle="settingsKeyStyle"
latin:keyWidth="8.047%p" />
+
+
+
+
+
+
+
+
diff --git a/java/res/xml-sw768dp/kbd_phone_symbols.xml b/java/res/xml-sw768dp/kbd_phone_symbols.xml
index 6ee57d6a5..693400e67 100644
--- a/java/res/xml-sw768dp/kbd_phone_symbols.xml
+++ b/java/res/xml-sw768dp/kbd_phone_symbols.xml
@@ -26,13 +26,11 @@
latin:keyboardLayout="@xml/kbd_key_styles" />
-
+ latin:keyWidth="11.172%p" />
+ latin:keyWidth="fillRight" />
+ latin:keyWidth="11.172%p" />
+ latin:keyWidth="fillRight" />
-
+
+
-
+
+
-
@@ -124,6 +119,11 @@
latin:keyStyle="settingsKeyStyle"
latin:keyWidth="8.047%p" />
+
+
+
+
+
+
+
+
diff --git a/java/res/xml-sw768dp/kbd_qwerty_row1.xml b/java/res/xml-sw768dp/kbd_qwerty_row1.xml
index 3727cf34e..0fdb463f1 100644
--- a/java/res/xml-sw768dp/kbd_qwerty_row1.xml
+++ b/java/res/xml-sw768dp/kbd_qwerty_row1.xml
@@ -21,15 +21,13 @@
-
+ latin:keyWidth="7.969%p" />
@@ -63,7 +61,6 @@
+ latin:keyWidth="fillBoth"/>
diff --git a/java/res/xml-sw768dp/kbd_qwerty_row2.xml b/java/res/xml-sw768dp/kbd_qwerty_row2.xml
index 45af120e2..7f7dd57f0 100644
--- a/java/res/xml-sw768dp/kbd_qwerty_row2.xml
+++ b/java/res/xml-sw768dp/kbd_qwerty_row2.xml
@@ -27,8 +27,7 @@
+ latin:keyWidth="11.172%p"/>
@@ -56,7 +55,6 @@
+ latin:keyWidth="fillBoth" />
diff --git a/java/res/xml-sw768dp/kbd_qwerty_row3.xml b/java/res/xml-sw768dp/kbd_qwerty_row3.xml
index 9041a7764..677235f63 100644
--- a/java/res/xml-sw768dp/kbd_qwerty_row3.xml
+++ b/java/res/xml-sw768dp/kbd_qwerty_row3.xml
@@ -26,8 +26,7 @@
>
+ latin:keyWidth="13.829%p"/>
@@ -51,7 +50,6 @@
+ latin:keyWidth="fillBoth" />
diff --git a/java/res/xml-sw768dp/kbd_qwerty_row4.xml b/java/res/xml-sw768dp/kbd_qwerty_row4.xml
index 48201c9ec..d463de9a6 100644
--- a/java/res/xml-sw768dp/kbd_qwerty_row4.xml
+++ b/java/res/xml-sw768dp/kbd_qwerty_row4.xml
@@ -21,7 +21,6 @@
-
diff --git a/java/res/xml-sw768dp/kbd_rows_arabic.xml b/java/res/xml-sw768dp/kbd_rows_arabic.xml
index f3283ae94..2f10d54e8 100644
--- a/java/res/xml-sw768dp/kbd_rows_arabic.xml
+++ b/java/res/xml-sw768dp/kbd_rows_arabic.xml
@@ -29,8 +29,7 @@
+ latin:keyWidth="7.500%p" />
+ latin:keyWidth="fillBoth" />
+ latin:keyWidth="9.375%p" />
+ latin:keyWidth="fillBoth" />
+ latin:keyWidth="7.969%p" />
@@ -64,8 +63,7 @@
+ latin:keyWidth="fillBoth" />
+ latin:keyWidth="10.167%p" />
@@ -100,21 +97,18 @@
latin:keyLabel="l"
latin:popupCharacters="@string/alternates_for_l" />
+ latin:keyLabel="m" />
+ latin:keyWidth="fillBoth" />
+ latin:keyWidth="13.829%p" />
@@ -161,8 +155,7 @@
+ latin:keyWidth="fillBoth" />
diff --git a/java/res/xml-sw768dp/kbd_rows_hebrew.xml b/java/res/xml-sw768dp/kbd_rows_hebrew.xml
index 0ef68b648..bacc6a13b 100644
--- a/java/res/xml-sw768dp/kbd_rows_hebrew.xml
+++ b/java/res/xml-sw768dp/kbd_rows_hebrew.xml
@@ -29,8 +29,7 @@
+ latin:keyWidth="7.969%p" />
+ latin:keyWidth="fillBoth" />
+ latin:keyWidth="11.172%p" />
+ latin:keyWidth="fillBoth" />
diff --git a/java/res/xml-sw768dp/kbd_rows_qwertz.xml b/java/res/xml-sw768dp/kbd_rows_qwertz.xml
index 6567c3166..5556d1f3d 100644
--- a/java/res/xml-sw768dp/kbd_rows_qwertz.xml
+++ b/java/res/xml-sw768dp/kbd_rows_qwertz.xml
@@ -29,8 +29,7 @@
+ latin:keyWidth="7.969%p" />
@@ -64,8 +63,7 @@
+ latin:keyWidth="fillBoth" />
@@ -74,8 +72,7 @@
>
+ latin:keyWidth="13.829%p" />
@@ -119,8 +116,7 @@
+ latin:keyWidth="fillBoth" />
diff --git a/java/res/xml-sw768dp/kbd_rows_russian.xml b/java/res/xml-sw768dp/kbd_rows_russian.xml
index 35b2c8a1a..82ceaeadc 100644
--- a/java/res/xml-sw768dp/kbd_rows_russian.xml
+++ b/java/res/xml-sw768dp/kbd_rows_russian.xml
@@ -23,14 +23,12 @@
>
-
+ latin:keyLabelOption="alignLeft" />
+ latin:keyWidth="fillBoth" />
+ latin:keyWidth="9.375%p" />
+ latin:keyWidth="fillBoth" />
+ latin:keyWidth="12.750%p" />
+ latin:keyWidth="fillBoth" />
diff --git a/java/res/xml-sw768dp/kbd_rows_scandinavian.xml b/java/res/xml-sw768dp/kbd_rows_scandinavian.xml
index c20dceea8..743c6bd26 100644
--- a/java/res/xml-sw768dp/kbd_rows_scandinavian.xml
+++ b/java/res/xml-sw768dp/kbd_rows_scandinavian.xml
@@ -29,8 +29,7 @@
+ latin:keyWidth="7.500%p" />
@@ -66,8 +65,7 @@
+ latin:keyWidth="fillBoth" />
+ latin:keyWidth="9.375%p" />
@@ -110,16 +107,14 @@
+ latin:keyWidth="fillBoth" />
+ latin:keyWidth="12.750%p" />
@@ -143,8 +138,7 @@
+ latin:keyWidth="fillRight" />
diff --git a/java/res/xml-sw768dp/kbd_rows_serbian.xml b/java/res/xml-sw768dp/kbd_rows_serbian.xml
index f1576de45..c07176ef6 100644
--- a/java/res/xml-sw768dp/kbd_rows_serbian.xml
+++ b/java/res/xml-sw768dp/kbd_rows_serbian.xml
@@ -23,14 +23,12 @@
>
-
+ latin:keyLabelOption="alignLeft" />
+ latin:keyWidth="fillRight" />
+ latin:keyWidth="11.172%p" />
+ latin:keyWidth="fillBoth" />
+ latin:keyWidth="13.829%p" />
+ latin:keyWidth="fillRight" />
diff --git a/java/res/xml-sw768dp/kbd_rows_spanish.xml b/java/res/xml-sw768dp/kbd_rows_spanish.xml
index 300592e6a..510cafbfd 100644
--- a/java/res/xml-sw768dp/kbd_rows_spanish.xml
+++ b/java/res/xml-sw768dp/kbd_rows_spanish.xml
@@ -31,8 +31,7 @@
+ latin:keyWidth="10.167%p" />
@@ -62,8 +61,7 @@
+ latin:keyWidth="fillBoth" />
diff --git a/java/res/xml-sw768dp/kbd_symbols.xml b/java/res/xml-sw768dp/kbd_symbols.xml
index 44ee2fd0d..ba0715cd4 100644
--- a/java/res/xml-sw768dp/kbd_symbols.xml
+++ b/java/res/xml-sw768dp/kbd_symbols.xml
@@ -25,15 +25,13 @@
latin:keyboardLayout="@xml/kbd_key_styles" />
-
+ latin:keyWidth="7.969%p" />
@@ -67,8 +65,7 @@
+ latin:keyWidth="fillRight" />
+ latin:keyWidth="11.172%p" />
+ latin:keyWidth="fillBoth" />
+ latin:keyWidth="13.829%p" />
@@ -154,10 +148,8 @@
+ latin:keyWidth="fillBoth" />
-
diff --git a/java/res/xml-sw768dp/kbd_symbols_shift.xml b/java/res/xml-sw768dp/kbd_symbols_shift.xml
index b36814104..1ddd64be3 100644
--- a/java/res/xml-sw768dp/kbd_symbols_shift.xml
+++ b/java/res/xml-sw768dp/kbd_symbols_shift.xml
@@ -23,15 +23,13 @@
>
-
+ latin:keyWidth="7.969%p" />
+ latin:keyWidth="fillBoth" />
+ latin:keyWidth="11.172%p" />
@@ -106,16 +102,14 @@
+ latin:keyWidth="fillBoth" />
+ latin:keyWidth="13.829%p" />
+ latin:keyWidth="fillBoth" />
-
diff --git a/java/res/xml/kbd_number.xml b/java/res/xml/kbd_number.xml
index 4d7b6d9a9..aabf0eb7a 100644
--- a/java/res/xml/kbd_number.xml
+++ b/java/res/xml/kbd_number.xml
@@ -30,12 +30,9 @@
-
+
+ latin:keyStyle="num1KeyStyle" />
+ latin:keyStyle="num4KeyStyle" />
+ latin:keyStyle="num7KeyStyle" />
+ latin:keyWidth="fillRight" />
-
+
+ latin:keyWidth="fillRight" />
-
+
+ latin:keyStyle="numKeyStyle" />
@@ -94,14 +82,12 @@
+ latin:keyWidth="fillRight" />
+ latin:keyStyle="numKeyStyle" />
@@ -111,14 +97,12 @@
+ latin:keyWidth="fillRight" />
+ latin:keyStyle="numKeyStyle" />
@@ -127,15 +111,11 @@
latin:keyStyle="numKeyStyle" />
+ latin:keyWidth="fillRight" />
-
+
+ latin:keyStyle="numSpaceKeyStyle" />
@@ -144,8 +124,7 @@
latin:keyStyle="numKeyStyle" />
+ latin:keyWidth="fillRight" />
diff --git a/java/res/xml/kbd_phone.xml b/java/res/xml/kbd_phone.xml
index c6508fb03..4588ab2c9 100644
--- a/java/res/xml/kbd_phone.xml
+++ b/java/res/xml/kbd_phone.xml
@@ -26,12 +26,9 @@
latin:keyboardLayout="@xml/kbd_key_styles" />
-
+
+ latin:keyStyle="num1KeyStyle" />
+ latin:keyWidth="fillRight" />
+ latin:keyStyle="num4KeyStyle" />
+ latin:keyWidth="fillRight" />
+ latin:keyStyle="num7KeyStyle" />
+ latin:keyWidth="fillRight" />
-
+
+ latin:keyStyle="numSwitchToAltKeyStyle" />
+ latin:keyWidth="fillRight" />
diff --git a/java/res/xml/kbd_phone_symbols.xml b/java/res/xml/kbd_phone_symbols.xml
index 5d9912229..89a9bd058 100644
--- a/java/res/xml/kbd_phone_symbols.xml
+++ b/java/res/xml/kbd_phone_symbols.xml
@@ -26,13 +26,10 @@
latin:keyboardLayout="@xml/kbd_key_styles" />
-
+
+ latin:keyStyle="numKeyStyle" />
@@ -42,13 +39,11 @@
+ latin:keyWidth="fillRight" />
+ latin:keyLabel="N" />
+ latin:keyWidth="fillRight" />
+ latin:keyStyle="numStarKeyStyle" />
+ latin:keyWidth="fillRight" />
-
+
+ latin:keyStyle="numSwitchToNumericKeyStyle" />
@@ -94,7 +83,6 @@
latin:keyStyle="numSpaceKeyStyle" />
+ latin:keyWidth="fillRight" />
diff --git a/java/res/xml/kbd_qwerty_row1.xml b/java/res/xml/kbd_qwerty_row1.xml
index cfd2efd2a..daa138255 100644
--- a/java/res/xml/kbd_qwerty_row1.xml
+++ b/java/res/xml/kbd_qwerty_row1.xml
@@ -23,13 +23,11 @@
>
+ latin:popupCharacters="@string/alternates_for_q" />
+ latin:keyWidth="fillRight" />
diff --git a/java/res/xml/kbd_qwerty_row2.xml b/java/res/xml/kbd_qwerty_row2.xml
index 57bbad75a..6e4872e08 100644
--- a/java/res/xml/kbd_qwerty_row2.xml
+++ b/java/res/xml/kbd_qwerty_row2.xml
@@ -27,8 +27,7 @@
+ latin:keyXPos="5%p" />
@@ -49,8 +48,7 @@
latin:popupCharacters="@string/alternates_for_k" />
+ latin:popupCharacters="@string/alternates_for_l" />
diff --git a/java/res/xml/kbd_qwerty_row3.xml b/java/res/xml/kbd_qwerty_row3.xml
index 98f0404c0..6a2035543 100644
--- a/java/res/xml/kbd_qwerty_row3.xml
+++ b/java/res/xml/kbd_qwerty_row3.xml
@@ -27,8 +27,7 @@
+ latin:visualInsetsRight="1%p" />
@@ -50,7 +49,6 @@
+ latin:visualInsetsLeft="1%p" />
diff --git a/java/res/xml/kbd_qwerty_row4.xml b/java/res/xml/kbd_qwerty_row4.xml
index 298f0f61e..771333ca9 100644
--- a/java/res/xml/kbd_qwerty_row4.xml
+++ b/java/res/xml/kbd_qwerty_row4.xml
@@ -23,7 +23,6 @@
>
+ latin:keyWidth="13.75%p" />
@@ -49,8 +47,7 @@
+ latin:keyWidth="15%p" />
+ latin:keyWidth="fillRight" />
+ latin:keyWidth="fillRight" />
diff --git a/java/res/xml/kbd_rows_arabic.xml b/java/res/xml/kbd_rows_arabic.xml
index 07e62741d..e9de4ad0d 100644
--- a/java/res/xml/kbd_rows_arabic.xml
+++ b/java/res/xml/kbd_rows_arabic.xml
@@ -29,8 +29,7 @@
+ latin:popupCharacters="1,١" />
+ latin:keyWidth="fillRight" />
+ latin:keyLabel="ش" />
+ latin:popupCharacters="@string/alternates_for_q" />
+ latin:keyWidth="fillRight" />
@@ -79,8 +76,7 @@
+ latin:visualInsetsRight="1%p" />
@@ -102,8 +98,7 @@
+ latin:visualInsetsLeft="1%p" />
diff --git a/java/res/xml/kbd_rows_russian.xml b/java/res/xml/kbd_rows_russian.xml
index 2c10c3141..216d74946 100644
--- a/java/res/xml/kbd_rows_russian.xml
+++ b/java/res/xml/kbd_rows_russian.xml
@@ -25,14 +25,12 @@
latin:keyboardLayout="@xml/kbd_key_styles" />
+ latin:keyWidth="8.75%p" />
+ latin:keyWidth="fillRight" />
+ latin:keyWidth="8.75%p" />
+ latin:keyWidth="fillRight" />
+ latin:keyWidth="11.75%p" />
+ latin:keyWidth="fillRight" />
diff --git a/java/res/xml/kbd_rows_scandinavian.xml b/java/res/xml/kbd_rows_scandinavian.xml
index 3f2560128..7e8902e0b 100644
--- a/java/res/xml/kbd_rows_scandinavian.xml
+++ b/java/res/xml/kbd_rows_scandinavian.xml
@@ -25,14 +25,12 @@
latin:keyboardLayout="@xml/kbd_key_styles" />
+ latin:keyWidth="8.75%p" />
+ latin:keyWidth="fillRight" />
+ latin:keyWidth="8.75%p" />
@@ -109,8 +105,7 @@
+ latin:keyWidth="fillRight" />
diff --git a/java/res/xml/kbd_rows_serbian.xml b/java/res/xml/kbd_rows_serbian.xml
index 2bed276d3..73c807f95 100644
--- a/java/res/xml/kbd_rows_serbian.xml
+++ b/java/res/xml/kbd_rows_serbian.xml
@@ -25,13 +25,11 @@
latin:keyboardLayout="@xml/kbd_key_styles" />
+ latin:popupCharacters="1" />
+ latin:keyWidth="fillRight" />
+ latin:keyLabel="а" />
+ latin:keyWidth="fillRight" />
+ latin:keyStyle="shiftKeyStyle" />
+ latin:keyWidth="fillRight" />
diff --git a/java/res/xml/kbd_rows_spanish.xml b/java/res/xml/kbd_rows_spanish.xml
index c5ead10da..6d007187f 100644
--- a/java/res/xml/kbd_rows_spanish.xml
+++ b/java/res/xml/kbd_rows_spanish.xml
@@ -30,8 +30,7 @@
>
+ latin:popupCharacters="@string/alternates_for_a" />
@@ -54,8 +53,7 @@
latin:keyLabel="l"
latin:popupCharacters="@string/alternates_for_l" />
+ latin:keyLabel="ñ" />
diff --git a/java/res/xml/kbd_symbols.xml b/java/res/xml/kbd_symbols.xml
index 7c0cee60b..7bb8d0200 100644
--- a/java/res/xml/kbd_symbols.xml
+++ b/java/res/xml/kbd_symbols.xml
@@ -26,13 +26,10 @@
latin:keyboardLayout="@xml/kbd_key_styles" />
-
+
+ latin:popupCharacters="@string/alternates_for_symbols_1" />
@@ -60,13 +57,11 @@
+ latin:keyWidth="fillRight" />
+ latin:keyLabel="\@" />
+ latin:keyWidth="fillRight" />
+ latin:visualInsetsRight="1%p" />
@@ -125,8 +118,7 @@
+ latin:visualInsetsLeft="1%p" />
diff --git a/java/res/xml/kbd_symbols_row4.xml b/java/res/xml/kbd_symbols_row4.xml
index 24313acb5..3fda8883e 100644
--- a/java/res/xml/kbd_symbols_row4.xml
+++ b/java/res/xml/kbd_symbols_row4.xml
@@ -23,7 +23,6 @@
>
+ latin:keyWidth="13.75%p" />
@@ -49,8 +47,7 @@
+ latin:keyWidth="15%p" />
+ latin:keyWidth="fillRight" />
+ latin:keyWidth="fillRight" />
diff --git a/java/res/xml/kbd_symbols_shift.xml b/java/res/xml/kbd_symbols_shift.xml
index f22d45aff..f4ccd6c09 100644
--- a/java/res/xml/kbd_symbols_shift.xml
+++ b/java/res/xml/kbd_symbols_shift.xml
@@ -24,12 +24,9 @@
>
-
+
+ latin:keyLabel="~" />
+ latin:keyWidth="fillRight" />
+ latin:keyStyle="nonSpecialBackgroundTabKeyStyle" />
@@ -87,15 +82,13 @@
latin:keyLabel="[" />
+ latin:keyWidth="fillRight" />
+ latin:visualInsetsRight="1%p" />
@@ -120,8 +113,7 @@
+ latin:visualInsetsLeft="1%p" />
diff --git a/java/res/xml/kbd_symbols_shift_row4.xml b/java/res/xml/kbd_symbols_shift_row4.xml
index 90a96e4bc..35d444a75 100644
--- a/java/res/xml/kbd_symbols_shift_row4.xml
+++ b/java/res/xml/kbd_symbols_shift_row4.xml
@@ -23,7 +23,6 @@
>
+ latin:keyWidth="13.75%p" />
@@ -53,8 +51,7 @@
+ latin:keyWidth="15%p" />
+ latin:keyWidth="fillRight" />
+ latin:keyWidth="fillRight" />
diff --git a/java/src/com/android/inputmethod/keyboard/Key.java b/java/src/com/android/inputmethod/keyboard/Key.java
index 45bf68cdf..33ab511a5 100644
--- a/java/src/com/android/inputmethod/keyboard/Key.java
+++ b/java/src/com/android/inputmethod/keyboard/Key.java
@@ -95,7 +95,7 @@ public class Key {
* {@link Keyboard#EDGE_LEFT}, {@link Keyboard#EDGE_RIGHT},
* {@link Keyboard#EDGE_TOP} and {@link Keyboard#EDGE_BOTTOM}.
*/
- public final int mEdgeFlags;
+ private int mEdgeFlags;
/** Whether this is a functional key which has different key top than normal key */
public final boolean mFunctional;
/** Whether this key repeats itself when held down */
@@ -273,8 +273,7 @@ public class Key {
mFunctional = style.getBoolean(keyAttr, R.styleable.Keyboard_Key_isFunctional, false);
mSticky = style.getBoolean(keyAttr, R.styleable.Keyboard_Key_isSticky, false);
mEnabled = style.getBoolean(keyAttr, R.styleable.Keyboard_Key_enabled, true);
- mEdgeFlags = style.getFlag(keyAttr, R.styleable.Keyboard_Key_keyEdgeFlags, 0)
- | row.mRowEdgeFlags;
+ mEdgeFlags = 0;
final KeyboardIconsSet iconsSet = mKeyboard.mIconsSet;
mVisualInsetsLeft = KeyboardParser.getDimensionOrFraction(keyAttr,
@@ -316,6 +315,10 @@ public class Key {
}
}
+ public void addEdgeFlags(int flags) {
+ mEdgeFlags |= flags;
+ }
+
public CharSequence getCaseAdjustedLabel() {
return mKeyboard.adjustLabelCase(mLabel);
}
@@ -441,15 +444,18 @@ public class Key {
* assume that all points between the key and the edge are considered to be on the key.
*/
public boolean isOnKey(int x, int y) {
- final int flags = mEdgeFlags;
- final boolean leftEdge = (flags & Keyboard.EDGE_LEFT) != 0;
- final boolean rightEdge = (flags & Keyboard.EDGE_RIGHT) != 0;
- final boolean topEdge = (flags & Keyboard.EDGE_TOP) != 0;
- final boolean bottomEdge = (flags & Keyboard.EDGE_BOTTOM) != 0;
final int left = mX - mGap / 2;
final int right = left + mWidth + mGap;
final int top = mY;
final int bottom = top + mHeight + mKeyboard.getVerticalGap();
+ final int flags = mEdgeFlags;
+ if (flags == 0) {
+ return x >= left && x <= right && y >= top && y <= bottom;
+ }
+ final boolean leftEdge = (flags & Keyboard.EDGE_LEFT) != 0;
+ final boolean rightEdge = (flags & Keyboard.EDGE_RIGHT) != 0;
+ final boolean topEdge = (flags & Keyboard.EDGE_TOP) != 0;
+ final boolean bottomEdge = (flags & Keyboard.EDGE_BOTTOM) != 0;
// In order to mitigate rounding errors, we use (left <= x <= right) here.
return (x >= left || leftEdge) && (x <= right || rightEdge)
&& (y >= top || topEdge) && (y <= bottom || bottomEdge);
diff --git a/java/src/com/android/inputmethod/keyboard/internal/KeyboardParser.java b/java/src/com/android/inputmethod/keyboard/internal/KeyboardParser.java
index e35db8955..fcda91990 100644
--- a/java/src/com/android/inputmethod/keyboard/internal/KeyboardParser.java
+++ b/java/src/com/android/inputmethod/keyboard/internal/KeyboardParser.java
@@ -135,6 +135,8 @@ public class KeyboardParser {
private int mMaxRowWidth = 0;
private int mTotalHeight = 0;
private Row mCurrentRow = null;
+ private boolean mLeftEdge;
+ private Key mRightEdgeKey = null;
private final KeyStyles mKeyStyles = new KeyStyles();
public KeyboardParser(Keyboard keyboard, Context context) {
@@ -623,6 +625,8 @@ public class KeyboardParser {
mCurrentX = 0;
setSpacer(mCurrentX, mHorizontalEdgesPadding);
mCurrentRow = row;
+ mLeftEdge = true;
+ mRightEdgeKey = null;
}
private void endRow() {
@@ -633,10 +637,19 @@ public class KeyboardParser {
mMaxRowWidth = mCurrentX;
mCurrentY += mCurrentRow.mDefaultHeight;
mCurrentRow = null;
+ if (mRightEdgeKey != null) {
+ mRightEdgeKey.addEdgeFlags(Keyboard.EDGE_RIGHT);
+ mRightEdgeKey = null;
+ }
}
private void endKey(Key key) {
mCurrentX = key.mX - key.mGap / 2 + key.mWidth + key.mGap;
+ if (mLeftEdge) {
+ key.addEdgeFlags(Keyboard.EDGE_LEFT);
+ mLeftEdge = false;
+ }
+ mRightEdgeKey = key;
}
private void endKeyboard(int defaultVerticalGap) {
@@ -646,6 +659,8 @@ public class KeyboardParser {
private void setSpacer(int keyXPos, int width) {
mCurrentX = keyXPos + width;
+ mLeftEdge = false;
+ mRightEdgeKey = null;
}
public static int getDimensionOrFraction(TypedArray a, int index, int base, int defValue) {
diff --git a/java/src/com/android/inputmethod/keyboard/internal/Row.java b/java/src/com/android/inputmethod/keyboard/internal/Row.java
index 06aadcc05..b34d6d06f 100644
--- a/java/src/com/android/inputmethod/keyboard/internal/Row.java
+++ b/java/src/com/android/inputmethod/keyboard/internal/Row.java
@@ -38,11 +38,6 @@ public class Row {
public final int mDefaultHorizontalGap;
/** Vertical gap following this row. */
public final int mVerticalGap;
- /**
- * Edge flags for this row of keys. Possible values that can be assigned are
- * {@link Keyboard#EDGE_TOP EDGE_TOP} and {@link Keyboard#EDGE_BOTTOM EDGE_BOTTOM}
- */
- public final int mRowEdgeFlags;
private final Keyboard mKeyboard;
@@ -61,10 +56,6 @@ public class Row {
mVerticalGap = KeyboardParser.getDimensionOrFraction(a,
R.styleable.Keyboard_verticalGap, keyboardHeight, keyboard.getVerticalGap());
a.recycle();
- a = res.obtainAttributes(Xml.asAttributeSet(parser),
- R.styleable.Keyboard_Row);
- mRowEdgeFlags = a.getInt(R.styleable.Keyboard_Row_rowEdgeFlags, 0);
- a.recycle();
}
public Keyboard getKeyboard() {