From 98565a9c02175ac8b669e88433191a0e22a395e0 Mon Sep 17 00:00:00 2001 From: Satoshi Kataoka <satok@google.com> Date: Fri, 6 Sep 2013 15:03:19 +0900 Subject: [PATCH] Optimize tablet layout Bug: 9059539 Change-Id: Ideb6965768fcf092c081eb1d3102312c863cc5b6 --- java/res/xml-sw600dp/kbd_10_10_7_symbols.xml | 27 ------- .../xml-sw600dp/kbd_10_10_7_symbols_shift.xml | 27 ------- .../key_space_symbols.xml} | 7 +- java/res/xml-sw600dp/key_styles_common.xml | 14 ++++ java/res/xml-sw600dp/row_symbols4.xml | 48 ------------ java/res/xml-sw600dp/row_symbols_shift4.xml | 40 ---------- java/res/xml-sw600dp/rowkeys_symbols2.xml | 75 ------------------- java/res/xml-sw600dp/rowkeys_symbols3.xml | 57 -------------- .../xml-sw600dp/rowkeys_symbols_shift1.xml | 56 -------------- .../xml-sw600dp/rowkeys_symbols_shift2.xml | 52 ------------- .../xml-sw600dp/rowkeys_symbols_shift3.xml | 46 ------------ java/res/xml-sw600dp/rows_10_10_7_symbols.xml | 60 --------------- .../rows_10_10_7_symbols_shift.xml | 60 --------------- java/res/xml-sw600dp/rows_symbols.xml | 15 +++- java/res/xml-sw600dp/rows_symbols_shift.xml | 17 ++++- ...ymbols_shift.xml => key_space_symbols.xml} | 7 +- java/res/xml/keyboard_layout_set_azerty.xml | 4 +- java/res/xml/keyboard_layout_set_colemak.xml | 4 +- java/res/xml/keyboard_layout_set_dvorak.xml | 4 +- java/res/xml/keyboard_layout_set_hebrew.xml | 4 +- java/res/xml/keyboard_layout_set_spanish.xml | 4 +- java/res/xml/row_symbols4.xml | 60 +++++++-------- java/res/xml/row_symbols_shift4.xml | 30 +++----- java/res/xml/rowkeys_symbols_shift2.xml | 3 +- java/res/xml/rows_symbols.xml | 11 ++- java/res/xml/rows_symbols_shift.xml | 12 ++- .../keyboard/internal/KeyboardTextsSet.java | 2 +- .../res/values/donottranslate-more-keys.xml | 2 +- 28 files changed, 115 insertions(+), 633 deletions(-) delete mode 100644 java/res/xml-sw600dp/kbd_10_10_7_symbols.xml delete mode 100644 java/res/xml-sw600dp/kbd_10_10_7_symbols_shift.xml rename java/res/{xml/kbd_10_10_7_symbols.xml => xml-sw600dp/key_space_symbols.xml} (82%) delete mode 100644 java/res/xml-sw600dp/row_symbols4.xml delete mode 100644 java/res/xml-sw600dp/row_symbols_shift4.xml delete mode 100644 java/res/xml-sw600dp/rowkeys_symbols2.xml delete mode 100644 java/res/xml-sw600dp/rowkeys_symbols3.xml delete mode 100644 java/res/xml-sw600dp/rowkeys_symbols_shift1.xml delete mode 100644 java/res/xml-sw600dp/rowkeys_symbols_shift2.xml delete mode 100644 java/res/xml-sw600dp/rowkeys_symbols_shift3.xml delete mode 100644 java/res/xml-sw600dp/rows_10_10_7_symbols.xml delete mode 100644 java/res/xml-sw600dp/rows_10_10_7_symbols_shift.xml rename java/res/xml/{kbd_10_10_7_symbols_shift.xml => key_space_symbols.xml} (82%) diff --git a/java/res/xml-sw600dp/kbd_10_10_7_symbols.xml b/java/res/xml-sw600dp/kbd_10_10_7_symbols.xml deleted file mode 100644 index dd545b5ef8..0000000000 --- a/java/res/xml-sw600dp/kbd_10_10_7_symbols.xml +++ /dev/null @@ -1,27 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -/* -** -** Copyright 2012, 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. -*/ ---> - -<Keyboard - xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" - latin:touchPositionCorrectionData="@array/touch_position_correction_data_default" -> - <include - latin:keyboardLayout="@xml/rows_10_10_7_symbols" /> -</Keyboard> diff --git a/java/res/xml-sw600dp/kbd_10_10_7_symbols_shift.xml b/java/res/xml-sw600dp/kbd_10_10_7_symbols_shift.xml deleted file mode 100644 index c36f0097e9..0000000000 --- a/java/res/xml-sw600dp/kbd_10_10_7_symbols_shift.xml +++ /dev/null @@ -1,27 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -/* -** -** Copyright 2012, 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. -*/ ---> - -<Keyboard - xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" - latin:touchPositionCorrectionData="@array/touch_position_correction_data_default" -> - <include - latin:keyboardLayout="@xml/rows_10_10_7_symbols_shift" /> -</Keyboard> diff --git a/java/res/xml/kbd_10_10_7_symbols.xml b/java/res/xml-sw600dp/key_space_symbols.xml similarity index 82% rename from java/res/xml/kbd_10_10_7_symbols.xml rename to java/res/xml-sw600dp/key_space_symbols.xml index 4d9861b73c..07aa7d1792 100644 --- a/java/res/xml/kbd_10_10_7_symbols.xml +++ b/java/res/xml-sw600dp/key_space_symbols.xml @@ -18,10 +18,9 @@ */ --> -<Keyboard +<merge xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" - latin:touchPositionCorrectionData="@array/touch_position_correction_data_default" > <include - latin:keyboardLayout="@xml/rows_symbols" /> -</Keyboard> + latin:keyboardLayout="@xml/key_space_5kw" /> +</merge> diff --git a/java/res/xml-sw600dp/key_styles_common.xml b/java/res/xml-sw600dp/key_styles_common.xml index e2e751f681..d817add11e 100644 --- a/java/res/xml-sw600dp/key_styles_common.xml +++ b/java/res/xml-sw600dp/key_styles_common.xml @@ -21,6 +21,20 @@ <merge xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" > + <switch> + <case + latin:keyboardLayoutSetElement="alphabetManualShifted|alphabetShiftLockShifted" + > + <key-style + latin:styleName="hasShiftedLetterHintStyle" + latin:keyLabelFlags="hasShiftedLetterHint|shiftedLetterActivated" /> + </case> + <default> + <key-style + latin:styleName="hasShiftedLetterHintStyle" + latin:keyLabelFlags="hasShiftedLetterHint" /> + </default> + </switch> <!-- Functional key styles --> <!-- Base style for shift key. A single space is used for dummy label in moreKeys. --> <key-style diff --git a/java/res/xml-sw600dp/row_symbols4.xml b/java/res/xml-sw600dp/row_symbols4.xml deleted file mode 100644 index 6db090f466..0000000000 --- a/java/res/xml-sw600dp/row_symbols4.xml +++ /dev/null @@ -1,48 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -/* -** -** Copyright 2012, 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. -*/ ---> - -<merge - xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" -> - <Row - latin:keyWidth="9.0%p" - latin:backgroundType="functional" - > - <Key - latin:keyStyle="toAlphaKeyStyle" - latin:keyWidth="10.0%p" /> - <Key - latin:keyLabel="/" /> - <include - latin:keyboardLayout="@xml/key_f1" /> - <include - latin:keyXPos="28.0%p" - latin:keyboardLayout="@xml/key_space_5kw" - latin:backgroundType="normal" /> - <Key - latin:keyLabel=""" - latin:moreKeys="!text/more_keys_for_tablet_double_quote" /> - <Key - latin:keyLabel="_" /> - <!-- Note: This Spacer prevents the above key from being marked as a right edge key. --> - <Spacer - latin:keyWidth="fillRight" /> - </Row> -</merge> diff --git a/java/res/xml-sw600dp/row_symbols_shift4.xml b/java/res/xml-sw600dp/row_symbols_shift4.xml deleted file mode 100644 index 311131ecac..0000000000 --- a/java/res/xml-sw600dp/row_symbols_shift4.xml +++ /dev/null @@ -1,40 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -/* -** -** Copyright 2012, 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. -*/ ---> - -<merge - xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" -> - <Row - latin:keyWidth="9.0%p" - latin:backgroundType="functional" - > - <Key - latin:keyStyle="toAlphaKeyStyle" - latin:keyWidth="10.0%p" /> - <!-- Here is empty space. --> - <include - latin:keyXPos="28.0%p" - latin:keyboardLayout="@xml/key_space_5kw" - latin:backgroundType="normal" /> - <!-- Note: This Spacer prevents the above key from being marked as a right edge key. --> - <Spacer - latin:keyWidth="fillRight" /> - </Row> -</merge> diff --git a/java/res/xml-sw600dp/rowkeys_symbols2.xml b/java/res/xml-sw600dp/rowkeys_symbols2.xml deleted file mode 100644 index 14abb42f97..0000000000 --- a/java/res/xml-sw600dp/rowkeys_symbols2.xml +++ /dev/null @@ -1,75 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -/* -** -** Copyright 2012, 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. -*/ ---> - -<merge - xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" -> - <switch> - <case - latin:languageCode="fa" - > - <!-- U+066C: "Ù¬" ARABIC THOUSANDS SEPARATOR --> - <Key - latin:keyLabel="٬" - latin:keyHintLabel="&" - latin:keyLabelFlags="hasPopupHint|hasShiftedLetterHint" - latin:moreKeys="&" /> - </case> - <default> - <Key - latin:keyLabel="\#" /> - </default> - </switch> - <Key - latin:keyStyle="currencyKeyStyle" /> - <Key - latin:keyLabel="!text/keylabel_for_symbols_percent" - latin:moreKeys="!text/more_keys_for_symbols_percent" /> - <switch> - <case - latin:languageCode="fa" - > - <!-- U+066B: "Ù«" ARABIC DECIMAL SEPARATOR --> - <Key - latin:keyLabel="٫" - latin:keyHintLabel="\#" - latin:keyLabelFlags="hasPopupHint|hasShiftedLetterHint" - latin:moreKeys="\#" /> - </case> - <default> - <Key - latin:keyLabel="&" /> - </default> - </switch> - <Key - latin:keyLabel="*" - latin:moreKeys="!text/more_keys_for_star" /> - <!-- U+2013: "–" EN DASH - U+2014: "—" EM DASH - U+00B7: "·" MIDDLE DOT --> - <Key - latin:keyLabel="-" - latin:moreKeys="_,–,—,·" /> - <Key - latin:keyLabel="+" - latin:moreKeys="!text/more_keys_for_plus" /> - <include - latin:keyboardLayout="@xml/keys_parentheses" /> -</merge> diff --git a/java/res/xml-sw600dp/rowkeys_symbols3.xml b/java/res/xml-sw600dp/rowkeys_symbols3.xml deleted file mode 100644 index 30fba3812c..0000000000 --- a/java/res/xml-sw600dp/rowkeys_symbols3.xml +++ /dev/null @@ -1,57 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -/* -** -** Copyright 2012, 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. -*/ ---> - -<merge - xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" -> - <include - latin:keyboardLayout="@xml/keys_less_greater" /> - <!-- U+2260: "≠" NOT EQUAL TO - U+2248: "≈" ALMOST EQUAL TO --> - <Key - latin:keyLabel="=" - latin:moreKeys="≠,≈" /> - <switch> - <case - latin:mode="url" - > - <Key - latin:keyLabel="\'" /> - </case> - <default> - <Key - latin:keyLabel=":" /> - </default> - </switch> - <Key - latin:keyLabel="!text/keylabel_for_symbols_semicolon" - latin:moreKeys="!text/more_keys_for_symbols_semicolon" /> - <Key - latin:keyLabel="!text/keylabel_for_comma" - latin:moreKeys="!text/more_keys_for_comma" /> - <Key - latin:keyLabel="." /> - <Key - latin:keyLabel="!" - latin:moreKeys="!text/more_keys_for_symbols_exclamation" /> - <Key - latin:keyLabel="!text/keylabel_for_symbols_question" - latin:moreKeys="!text/more_keys_for_symbols_question" /> -</merge> diff --git a/java/res/xml-sw600dp/rowkeys_symbols_shift1.xml b/java/res/xml-sw600dp/rowkeys_symbols_shift1.xml deleted file mode 100644 index 3549fdda45..0000000000 --- a/java/res/xml-sw600dp/rowkeys_symbols_shift1.xml +++ /dev/null @@ -1,56 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -/* -** -** Copyright 2012, 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. -*/ ---> - -<merge - xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" -> - <Key - latin:keyLabel="~" /> - <Key - latin:keyLabel="`" /> - <Key - latin:keyLabel="|" /> - <!-- U+2022: "•" BULLET --> - <Key - latin:keyLabel="•" - latin:moreKeys="!text/more_keys_for_bullet" /> - <!-- U+221A: "√" SQUARE ROOT --> - <Key - latin:keyLabel="√" /> - <!-- U+03C0: "Ï€" GREEK SMALL LETTER PI - U+03A0: "Î " GREEK CAPITAL LETTER PI --> - <Key - latin:keyLabel="π" - latin:moreKeys="Π" /> - <!-- U+00F7: "÷" DIVISION SIGN --> - <Key - latin:keyLabel="÷" /> - <!-- U+00D7: "×" MULTIPLICATION SIGN --> - <Key - latin:keyLabel="×" /> - <!-- U+00A7: "§" SECTION SIGN - U+00B6: "¶" PILCROW SIGN --> - <Key - latin:keyLabel="§" - latin:moreKeys="¶" /> - <!-- U+0394: "Δ" GREEK CAPITAL LETTER DELTA --> - <Key - latin:keyLabel="Δ" /> -</merge> diff --git a/java/res/xml-sw600dp/rowkeys_symbols_shift2.xml b/java/res/xml-sw600dp/rowkeys_symbols_shift2.xml deleted file mode 100644 index 2048b73357..0000000000 --- a/java/res/xml-sw600dp/rowkeys_symbols_shift2.xml +++ /dev/null @@ -1,52 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -/* -** -** Copyright 2012, 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. -*/ ---> - -<merge - xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" -> - <Key - latin:keyStyle="moreCurrency1KeyStyle" /> - <Key - latin:keyStyle="moreCurrency2KeyStyle" /> - <Key - latin:keyStyle="moreCurrency3KeyStyle" /> - <Key - latin:keyStyle="moreCurrency4KeyStyle" /> - <!-- U+2191: "↑" UPWARDS ARROW - U+2193: "↓" DOWNWARDS ARROW - U+2190: "â†" LEFTWARDS ARROW - U+2192: "→" RIGHTWARDS ARROW --> - <Key - latin:keyLabel="^" - latin:moreKeys="↑,↓,←,→" /> - <!-- U+00B0: "°" DEGREE SIGN - U+2032: "′" PRIME - U+2033: "″" DOUBLE PRIME --> - <Key - latin:keyLabel="°" - latin:moreKeys="′,″" /> - <!-- U+00B1: "±" PLUS-MINUS SIGN - U+221E: "∞" INFINITY --> - <Key - latin:keyLabel="±" - latin:moreKeys="∞" /> - <include - latin:keyboardLayout="@xml/keys_curly_brackets" /> -</merge> diff --git a/java/res/xml-sw600dp/rowkeys_symbols_shift3.xml b/java/res/xml-sw600dp/rowkeys_symbols_shift3.xml deleted file mode 100644 index 8bd8656391..0000000000 --- a/java/res/xml-sw600dp/rowkeys_symbols_shift3.xml +++ /dev/null @@ -1,46 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -/* -** -** Copyright 2012, 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. -*/ ---> - -<merge - xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" -> - <Key - latin:keyLabel="\\" /> - <!-- U+00A9: "©" COPYRIGHT SIGN --> - <Key - latin:keyLabel="©" /> - <!-- U+00AE: "®" REGISTERED SIGN --> - <Key - latin:keyLabel="®" /> - <!-- U+2122: "â„¢" TRADE MARK SIGN --> - <Key - latin:keyLabel="™" /> - <!-- U+2105: "â„…" CARE OF --> - <Key - latin:keyLabel="℅" /> - <include - latin:keyboardLayout="@xml/keys_square_brackets" /> - <!-- U+00A1: "¡" INVERTED EXCLAMATION MARK --> - <Key - latin:keyLabel="¡" /> - <!-- U+00BF: "¿" INVERTED QUESTION MARK --> - <Key - latin:keyLabel="¿" /> -</merge> diff --git a/java/res/xml-sw600dp/rows_10_10_7_symbols.xml b/java/res/xml-sw600dp/rows_10_10_7_symbols.xml deleted file mode 100644 index 0e4710c375..0000000000 --- a/java/res/xml-sw600dp/rows_10_10_7_symbols.xml +++ /dev/null @@ -1,60 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -/* -** -** Copyright 2012, 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. -*/ ---> - -<merge - xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" -> - <include - latin:keyboardLayout="@xml/key_styles_common" /> - <include - latin:keyboardLayout="@xml/key_styles_currency" /> - <Row - latin:keyWidth="9.0%p" - > - <include - latin:keyboardLayout="@xml/rowkeys_symbols1" /> - <Key - latin:keyStyle="deleteKeyStyle" - latin:keyWidth="fillRight" /> - </Row> - <Row - latin:keyWidth="9.0%p" - > - <include - latin:keyboardLayout="@xml/rowkeys_symbols2" /> - <Key - latin:keyStyle="enterKeyStyle" - latin:keyWidth="fillRight" /> - </Row> - <Row - latin:keyWidth="9.0%p" - > - <Key - latin:keyStyle="toMoreSymbolKeyStyle" - latin:keyWidth="10.0%p" /> - <include - latin:keyboardLayout="@xml/rowkeys_symbols3" /> - <Key - latin:keyStyle="toMoreSymbolKeyStyle" - latin:keyWidth="fillRight" /> - </Row> - <include - latin:keyboardLayout="@xml/row_symbols4" /> -</merge> diff --git a/java/res/xml-sw600dp/rows_10_10_7_symbols_shift.xml b/java/res/xml-sw600dp/rows_10_10_7_symbols_shift.xml deleted file mode 100644 index 3d3b59f229..0000000000 --- a/java/res/xml-sw600dp/rows_10_10_7_symbols_shift.xml +++ /dev/null @@ -1,60 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -/* -** -** Copyright 2012, 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. -*/ ---> - -<merge - xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" -> - <include - latin:keyboardLayout="@xml/key_styles_common" /> - <include - latin:keyboardLayout="@xml/key_styles_currency" /> - <Row - latin:keyWidth="9.0%p" - > - <include - latin:keyboardLayout="@xml/rowkeys_symbols_shift1" /> - <Key - latin:keyStyle="deleteKeyStyle" - latin:keyWidth="fillRight" /> - </Row> - <Row - latin:keyWidth="9.0%p" - > - <include - latin:keyboardLayout="@xml/rowkeys_symbols_shift2" /> - <Key - latin:keyStyle="enterKeyStyle" - latin:keyWidth="fillRight" /> - </Row> - <Row - latin:keyWidth="9.0%p" - > - <Key - latin:keyStyle="backFromMoreSymbolKeyStyle" - latin:keyWidth="10.0%p" /> - <include - latin:keyboardLayout="@xml/rowkeys_symbols_shift3" /> - <Key - latin:keyStyle="backFromMoreSymbolKeyStyle" - latin:keyWidth="fillRight" /> - </Row> - <include - latin:keyboardLayout="@xml/row_symbols_shift4" /> -</merge> diff --git a/java/res/xml-sw600dp/rows_symbols.xml b/java/res/xml-sw600dp/rows_symbols.xml index 3d0593dab4..fbd8492cd1 100644 --- a/java/res/xml-sw600dp/rows_symbols.xml +++ b/java/res/xml-sw600dp/rows_symbols.xml @@ -50,12 +50,23 @@ <Key latin:keyStyle="toMoreSymbolKeyStyle" latin:keyWidth="10.0%p" /> + <Key + latin:keyLabel="\\" /> + <Key + latin:keyLabel="=" /> <include latin:keyboardLayout="@xml/rowkeys_symbols3" /> <Key latin:keyStyle="toMoreSymbolKeyStyle" latin:keyWidth="fillRight" /> </Row> - <include - latin:keyboardLayout="@xml/row_symbols4" /> + <Row + latin:keyWidth="9.0%p" + > + <Key + latin:keyStyle="toAlphaKeyStyle" + latin:keyWidth="10.0%p" /> + <include + latin:keyboardLayout="@xml/row_symbols4" /> + </Row> </merge> diff --git a/java/res/xml-sw600dp/rows_symbols_shift.xml b/java/res/xml-sw600dp/rows_symbols_shift.xml index 0050c0c154..aad047ff6b 100644 --- a/java/res/xml-sw600dp/rows_symbols_shift.xml +++ b/java/res/xml-sw600dp/rows_symbols_shift.xml @@ -52,10 +52,23 @@ latin:keyWidth="10.0%p" /> <include latin:keyboardLayout="@xml/rowkeys_symbols_shift3" /> + <!-- U+00A1: "¡" INVERTED EXCLAMATION MARK --> + <Key + latin:keyLabel="¡" /> + <!-- U+00BF: "¿" INVERTED QUESTION MARK --> + <Key + latin:keyLabel="¿" /> <Key latin:keyStyle="backFromMoreSymbolKeyStyle" latin:keyWidth="fillRight" /> </Row> - <include - latin:keyboardLayout="@xml/row_symbols_shift4" /> + <Row + latin:keyWidth="9.0%p" + > + <Key + latin:keyStyle="toAlphaKeyStyle" + latin:keyWidth="10%p" /> + <include + latin:keyboardLayout="@xml/row_symbols_shift4" /> + </Row> </merge> diff --git a/java/res/xml/kbd_10_10_7_symbols_shift.xml b/java/res/xml/key_space_symbols.xml similarity index 82% rename from java/res/xml/kbd_10_10_7_symbols_shift.xml rename to java/res/xml/key_space_symbols.xml index a2d67caf40..1efc4ff4e6 100644 --- a/java/res/xml/kbd_10_10_7_symbols_shift.xml +++ b/java/res/xml/key_space_symbols.xml @@ -18,10 +18,9 @@ */ --> -<Keyboard +<merge xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" - latin:touchPositionCorrectionData="@array/touch_position_correction_data_default" > <include - latin:keyboardLayout="@xml/rows_symbols_shift" /> -</Keyboard> + latin:keyboardLayout="@xml/key_space_3kw" /> +</merge> diff --git a/java/res/xml/keyboard_layout_set_azerty.xml b/java/res/xml/keyboard_layout_set_azerty.xml index 4d144edbc0..38797f91af 100644 --- a/java/res/xml/keyboard_layout_set_azerty.xml +++ b/java/res/xml/keyboard_layout_set_azerty.xml @@ -26,10 +26,10 @@ latin:enableProximityCharsCorrection="true" /> <Element latin:elementName="symbols" - latin:elementKeyboard="@xml/kbd_10_10_7_symbols" /> + latin:elementKeyboard="@xml/kbd_symbols" /> <Element latin:elementName="symbolsShifted" - latin:elementKeyboard="@xml/kbd_10_10_7_symbols_shift" /> + latin:elementKeyboard="@xml/kbd_symbols_shift" /> <Element latin:elementName="phone" latin:elementKeyboard="@xml/kbd_phone" /> diff --git a/java/res/xml/keyboard_layout_set_colemak.xml b/java/res/xml/keyboard_layout_set_colemak.xml index c18f13225f..3061872a80 100644 --- a/java/res/xml/keyboard_layout_set_colemak.xml +++ b/java/res/xml/keyboard_layout_set_colemak.xml @@ -26,10 +26,10 @@ latin:enableProximityCharsCorrection="true" /> <Element latin:elementName="symbols" - latin:elementKeyboard="@xml/kbd_10_10_7_symbols" /> + latin:elementKeyboard="@xml/kbd_symbols" /> <Element latin:elementName="symbolsShifted" - latin:elementKeyboard="@xml/kbd_10_10_7_symbols_shift" /> + latin:elementKeyboard="@xml/kbd_symbols_shift" /> <Element latin:elementName="phone" latin:elementKeyboard="@xml/kbd_phone" /> diff --git a/java/res/xml/keyboard_layout_set_dvorak.xml b/java/res/xml/keyboard_layout_set_dvorak.xml index eb8e0c5399..31aeec5257 100644 --- a/java/res/xml/keyboard_layout_set_dvorak.xml +++ b/java/res/xml/keyboard_layout_set_dvorak.xml @@ -26,10 +26,10 @@ latin:enableProximityCharsCorrection="true" /> <Element latin:elementName="symbols" - latin:elementKeyboard="@xml/kbd_10_10_7_symbols" /> + latin:elementKeyboard="@xml/kbd_symbols" /> <Element latin:elementName="symbolsShifted" - latin:elementKeyboard="@xml/kbd_10_10_7_symbols_shift" /> + latin:elementKeyboard="@xml/kbd_symbols_shift" /> <Element latin:elementName="phone" latin:elementKeyboard="@xml/kbd_phone" /> diff --git a/java/res/xml/keyboard_layout_set_hebrew.xml b/java/res/xml/keyboard_layout_set_hebrew.xml index 212816dfe8..d5b25b36c8 100644 --- a/java/res/xml/keyboard_layout_set_hebrew.xml +++ b/java/res/xml/keyboard_layout_set_hebrew.xml @@ -26,10 +26,10 @@ latin:enableProximityCharsCorrection="true" /> <Element latin:elementName="symbols" - latin:elementKeyboard="@xml/kbd_10_10_7_symbols" /> + latin:elementKeyboard="@xml/kbd_symbols" /> <Element latin:elementName="symbolsShifted" - latin:elementKeyboard="@xml/kbd_10_10_7_symbols_shift" /> + latin:elementKeyboard="@xml/kbd_symbols_shift" /> <Element latin:elementName="phone" latin:elementKeyboard="@xml/kbd_phone" /> diff --git a/java/res/xml/keyboard_layout_set_spanish.xml b/java/res/xml/keyboard_layout_set_spanish.xml index 57cef52342..c454de3b4c 100644 --- a/java/res/xml/keyboard_layout_set_spanish.xml +++ b/java/res/xml/keyboard_layout_set_spanish.xml @@ -26,10 +26,10 @@ latin:enableProximityCharsCorrection="true" /> <Element latin:elementName="symbols" - latin:elementKeyboard="@xml/kbd_10_10_7_symbols" /> + latin:elementKeyboard="@xml/kbd_symbols" /> <Element latin:elementName="symbolsShifted" - latin:elementKeyboard="@xml/kbd_10_10_7_symbols_shift" /> + latin:elementKeyboard="@xml/kbd_symbols_shift" /> <Element latin:elementName="phone" latin:elementKeyboard="@xml/kbd_phone" /> diff --git a/java/res/xml/row_symbols4.xml b/java/res/xml/row_symbols4.xml index 72be06d6e7..0bf412fffb 100644 --- a/java/res/xml/row_symbols4.xml +++ b/java/res/xml/row_symbols4.xml @@ -18,39 +18,29 @@ */ --> -<merge - xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" -> - <Row - latin:keyWidth="10%p" - > - <Key - latin:keyStyle="toAlphaKeyStyle" - latin:keyWidth="15%p" /> - <Key - latin:keyLabel="_" - latin:backgroundType="functional" /> - <Key - latin:keyLabel="/" - latin:backgroundType="functional" /> - <switch> - <case - latin:hasShortcutKey="true" - > - <Key - latin:keyStyle="shortcutKeyStyle" /> - </case> - <!-- latin:hasShortcutKey="false" --> - <default> - </default> - </switch> - <include - latin:keyXPos="35%p" - latin:keyboardLayout="@xml/key_space_3kw" /> - <include - latin:keyboardLayout="@xml/keys_comma_period" /> - <Key - latin:keyStyle="emojiKeyStyle" - latin:keyWidth="fillRight" /> - </Row> +<merge xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" > + + <Key + latin:backgroundType="functional" + latin:keyLabel="_" /> + <Key + latin:backgroundType="functional" + latin:keyLabel="/" /> + + <switch> + <case latin:hasShortcutKey="true" > + <Key latin:keyStyle="shortcutKeyStyle" /> + </case> + <!-- latin:hasShortcutKey="false" --> + <default> + </default> + </switch> + + <include latin:keyboardLayout="@xml/key_space_symbols" /> + <include latin:keyboardLayout="@xml/keys_comma_period" /> + + <Key + latin:keyStyle="emojiKeyStyle" + latin:keyWidth="fillRight" /> + </merge> diff --git a/java/res/xml/row_symbols_shift4.xml b/java/res/xml/row_symbols_shift4.xml index 9b71f6aa49..57a2ec09cf 100644 --- a/java/res/xml/row_symbols_shift4.xml +++ b/java/res/xml/row_symbols_shift4.xml @@ -17,25 +17,15 @@ ** limitations under the License. */ --> +<merge xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" > + + <include latin:keyboardLayout="@xml/keys_less_greater" /> + <include + latin:keyboardLayout="@xml/key_space_symbols" /> + <include latin:keyboardLayout="@xml/keys_comma_period" /> + + <Key + latin:keyStyle="enterKeyStyle" + latin:keyWidth="fillRight" /> -<merge - xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" -> - <Row - latin:keyWidth="10%p" - > - <Key - latin:keyStyle="toAlphaKeyStyle" - latin:keyWidth="15%p" /> - <include - latin:keyboardLayout="@xml/keys_less_greater" /> - <include - latin:keyXPos="35%p" - latin:keyboardLayout="@xml/key_space_3kw" /> - <include - latin:keyboardLayout="@xml/keys_comma_period" /> - <Key - latin:keyStyle="enterKeyStyle" - latin:keyWidth="fillRight" /> - </Row> </merge> diff --git a/java/res/xml/rowkeys_symbols_shift2.xml b/java/res/xml/rowkeys_symbols_shift2.xml index fc84355a54..36f92143f5 100644 --- a/java/res/xml/rowkeys_symbols_shift2.xml +++ b/java/res/xml/rowkeys_symbols_shift2.xml @@ -22,8 +22,7 @@ xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" > <Key - latin:keyStyle="moreCurrency1KeyStyle" - latin:keyXPos="5%p" /> + latin:keyStyle="moreCurrency1KeyStyle" /> <Key latin:keyStyle="moreCurrency2KeyStyle" /> <Key diff --git a/java/res/xml/rows_symbols.xml b/java/res/xml/rows_symbols.xml index e50c10de6f..3f102e277d 100644 --- a/java/res/xml/rows_symbols.xml +++ b/java/res/xml/rows_symbols.xml @@ -52,6 +52,13 @@ latin:keyWidth="fillRight" latin:visualInsetsLeft="1%p" /> </Row> - <include - latin:keyboardLayout="@xml/row_symbols4" /> + <Row + latin:keyWidth="10%p" + > + <Key + latin:keyStyle="toAlphaKeyStyle" + latin:keyWidth="15%p" /> + <include + latin:keyboardLayout="@xml/row_symbols4" /> + </Row> </merge> diff --git a/java/res/xml/rows_symbols_shift.xml b/java/res/xml/rows_symbols_shift.xml index 9c03d90b58..45ada2a617 100644 --- a/java/res/xml/rows_symbols_shift.xml +++ b/java/res/xml/rows_symbols_shift.xml @@ -35,6 +35,7 @@ latin:keyWidth="10%p" > <include + latin:keyXPos="5%p" latin:keyboardLayout="@xml/rowkeys_symbols_shift2" /> </Row> <Row @@ -51,6 +52,13 @@ latin:keyWidth="fillRight" latin:visualInsetsLeft="1%p" /> </Row> - <include - latin:keyboardLayout="@xml/row_symbols_shift4" /> + <Row + latin:keyWidth="10%p" + > + <Key + latin:keyStyle="toAlphaKeyStyle" + latin:keyWidth="15%p" /> + <include + latin:keyboardLayout="@xml/row_symbols_shift4" /> + </Row> </merge> diff --git a/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsSet.java b/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsSet.java index 845cd282d7..7008b06197 100644 --- a/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsSet.java +++ b/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsSet.java @@ -383,7 +383,7 @@ public final class KeyboardTextsSet { // Label for "switch to more symbol" modifier key. Must be short to fit on key! /* 124 */ "= \\ <", // Label for "switch to more symbol" modifier key on tablets. Must be short to fit on key! - /* 125 */ "~ \\ {", + /* 125 */ "~ [ {", // Label for "Tab" key. Must be short to fit on key! /* 126 */ "Tab", // Label for "switch to phone numeric" key. Must be short to fit on key! diff --git a/tools/make-keyboard-text/res/values/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values/donottranslate-more-keys.xml index 107f57b660..a4c2f126d4 100644 --- a/tools/make-keyboard-text/res/values/donottranslate-more-keys.xml +++ b/tools/make-keyboard-text/res/values/donottranslate-more-keys.xml @@ -190,7 +190,7 @@ <!-- Label for "switch to more symbol" modifier key. Must be short to fit on key! --> <string name="label_to_more_symbol_key">= \\ <</string> <!-- Label for "switch to more symbol" modifier key on tablets. Must be short to fit on key! --> - <string name="label_to_more_symbol_for_tablet_key">~ \\ {</string> + <string name="label_to_more_symbol_for_tablet_key">~ [ {</string> <!-- Label for "Tab" key. Must be short to fit on key! --> <string name="label_tab_key">Tab</string> <!-- Label for "switch to phone numeric" key. Must be short to fit on key! --> -- GitLab