aboutsummaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
Diffstat (limited to 'java')
-rw-r--r--java/res/drawable-hdpi/more_keys_divider.pngbin0 -> 1034 bytes
-rw-r--r--java/res/drawable-mdpi/more_keys_divider.pngbin0 -> 2940 bytes
-rw-r--r--java/res/drawable-xhdpi/more_keys_divider.pngbin0 -> 1053 bytes
-rw-r--r--java/res/values-be/donottranslate-more-keys.xml4
-rw-r--r--java/res/values-ky/donottranslate-more-keys.xml6
-rw-r--r--java/res/values-mk/donottranslate-more-keys.xml48
-rw-r--r--java/res/values-ru/donottranslate-more-keys.xml2
-rw-r--r--java/res/values-uk/donottranslate-more-keys.xml4
-rw-r--r--java/res/values/donottranslate-more-keys.xml30
-rw-r--r--java/res/xml-el/keyboard_set.xml42
-rw-r--r--java/res/xml-mk/keyboard_set.xml42
-rw-r--r--java/res/xml-sw600dp/rows_greek.xml170
-rw-r--r--java/res/xml-sw600dp/rows_serbian.xml18
-rw-r--r--java/res/xml-sw600dp/rows_slavic.xml16
-rw-r--r--java/res/xml-sw768dp/rows_greek.xml177
-rw-r--r--java/res/xml-sw768dp/rows_serbian.xml17
-rw-r--r--java/res/xml-sw768dp/rows_slavic.xml16
-rw-r--r--java/res/xml/kbd_greek.xml26
-rw-r--r--java/res/xml/key_styles_enter.xml2
-rw-r--r--java/res/xml/method.xml17
-rw-r--r--java/res/xml/rows_greek.xml185
-rw-r--r--java/res/xml/rows_serbian.xml18
-rw-r--r--java/res/xml/rows_slavic.xml20
-rw-r--r--java/src/com/android/inputmethod/keyboard/Key.java9
-rw-r--r--java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java7
-rw-r--r--java/src/com/android/inputmethod/keyboard/MoreKeysKeyboard.java64
-rw-r--r--java/src/com/android/inputmethod/latin/suggestions/MoreSuggestions.java4
27 files changed, 856 insertions, 88 deletions
diff --git a/java/res/drawable-hdpi/more_keys_divider.png b/java/res/drawable-hdpi/more_keys_divider.png
new file mode 100644
index 000000000..a5912f95c
--- /dev/null
+++ b/java/res/drawable-hdpi/more_keys_divider.png
Binary files differ
diff --git a/java/res/drawable-mdpi/more_keys_divider.png b/java/res/drawable-mdpi/more_keys_divider.png
new file mode 100644
index 000000000..a46284f21
--- /dev/null
+++ b/java/res/drawable-mdpi/more_keys_divider.png
Binary files differ
diff --git a/java/res/drawable-xhdpi/more_keys_divider.png b/java/res/drawable-xhdpi/more_keys_divider.png
new file mode 100644
index 000000000..178594bf0
--- /dev/null
+++ b/java/res/drawable-xhdpi/more_keys_divider.png
Binary files differ
diff --git a/java/res/values-be/donottranslate-more-keys.xml b/java/res/values-be/donottranslate-more-keys.xml
index 0917f11ec..1550ddb17 100644
--- a/java/res/values-be/donottranslate-more-keys.xml
+++ b/java/res/values-be/donottranslate-more-keys.xml
@@ -19,7 +19,7 @@
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- U+045E: "ў" CYRILLIC SMALL LETTER SHORT U -->
- <string name="keylabel_for_slavic_shcha">&#x045E;</string>
+ <string name="keylabel_for_cyrillic_shcha">&#x045E;</string>
<!-- U+0456: "і" CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I -->
- <string name="keylabel_for_slavic_i">&#x0456;</string>
+ <string name="keylabel_for_cyrillic_i">&#x0456;</string>
</resources>
diff --git a/java/res/values-ky/donottranslate-more-keys.xml b/java/res/values-ky/donottranslate-more-keys.xml
index 824620987..b67a9f15d 100644
--- a/java/res/values-ky/donottranslate-more-keys.xml
+++ b/java/res/values-ky/donottranslate-more-keys.xml
@@ -19,9 +19,9 @@
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- U+04AF: "ү" CYRILLIC SMALL LETTER STRAIGHT U -->
- <string name="more_keys_for_slavic_u">&#x04AF;</string>
+ <string name="more_keys_for_cyrillic_u">&#x04AF;</string>
<!-- U+04A3: "ң" CYRILLIC SMALL LETTER EN WITH DESCENDER -->
- <string name="more_keys_for_slavic_en">&#x04A3;</string>
+ <string name="more_keys_for_cyrillic_en">&#x04A3;</string>
<!-- U+04E9: "ө" CYRILLIC SMALL LETTER BARRED O -->
- <string name="more_keys_for_slavic_o">&#x04E9;</string>
+ <string name="more_keys_for_cyrillic_o">&#x04E9;</string>
</resources>
diff --git a/java/res/values-mk/donottranslate-more-keys.xml b/java/res/values-mk/donottranslate-more-keys.xml
new file mode 100644
index 000000000..e96a306b6
--- /dev/null
+++ b/java/res/values-mk/donottranslate-more-keys.xml
@@ -0,0 +1,48 @@
+<?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.
+*/
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <!-- NOTE: Macedonian layouts are based on Serbian ones with the following key replacements. -->
+ <!-- U+0455: "ѕ" CYRILLIC SMALL LETTER DZE -->
+ <string name="keylabel_for_cyrillic_ze">&#x0455;</string>
+ <!-- U+045C: "ќ" CYRILLIC SMALL LETTER KJE -->
+ <string name="keylabel_for_cyrillic_tshe">&#x045C;</string>
+ <!-- U+0437: "з" CYRILLIC SMALL LETTER ZE -->
+ <string name="keylabel_for_cyrillic_dze">&#x0437;</string>
+ <!-- U+0453: "ѓ" CYRILLIC SMALL LETTER GJE -->
+ <string name="keylabel_for_cyrillic_dje">&#x0453;</string>
+ <!-- U+0450: "ѐ" CYRILLIC SMALL LETTER IE WITH GRAVE -->
+ <string name="more_keys_for_cyrillic_ie">&#x0450;</string>
+ <!-- U+045D: "ѝ" CYRILLIC SMALL LETTER I WITH GRAVE -->
+ <string name="more_keys_for_cyrillic_i">&#x045D;</string>
+ <!-- U+2018: "‘" LEFT SINGLE QUOTATION MARK
+ U+2019: "’" RIGHT SINGLE QUOTATION MARK
+ U+201A: "‚" SINGLE LOW-9 QUOTATION MARK
+ U+201B: "‛" SINGLE HIGH-REVERSED-9 QUOTATION MARK
+ U+201C: "“" LEFT DOUBLE QUOTATION MARK
+ U+201D: "”" RIGHT DOUBLE QUOTATION MARK
+ U+201E: "„" DOUBLE LOW-9 QUOTATION MARK
+ U+201F: "‟" DOUBLE HIGH-REVERSED-9 QUOTATION MARK -->
+ <!-- TODO: Neither DroidSans nor Roboto have the glyph for U+201F DOUBLE HIGH-REVERSED-9 QUOTATION MARK. -->
+ <!-- <string name="more_keys_for_double_quote">!fixedColumnOrder!6,&#x201E;,&#x201C;,&#x201D;,&#x201F;,&#x00AB;,&#x00BB;</string> -->
+ <string name="more_keys_for_double_quote">!fixedColumnOrder!5,&#x201E;,&#x201C;,&#x201D;,&#x00AB;,&#x00BB;</string>
+ <!-- TODO: Neither DroidSans nor Roboto have the glyph for U+201F DOUBLE HIGH-REVERSED-9 QUOTATION MARK. -->
+ <!-- <string name="more_keys_for_tablet_double_quote">!fixedColumnOrder!6,&#x201C;,&#x201D;,&#x201E;,&#x201F;,&#x00AB;,&#x00BB;,&#x2018;,&#x2019;,&#x201A;,&#x201B;</string> -->
+ <string name="more_keys_for_tablet_double_quote">!fixedColumnOrder!5,&#x201E;,&#x201C;,&#x201D;,&#x00AB;,&#x00BB;,&#x2018;,&#x2019;,&#x201A;,&#x201B;</string>
+</resources>
diff --git a/java/res/values-ru/donottranslate-more-keys.xml b/java/res/values-ru/donottranslate-more-keys.xml
index 45c4551a1..a1a22e5aa 100644
--- a/java/res/values-ru/donottranslate-more-keys.xml
+++ b/java/res/values-ru/donottranslate-more-keys.xml
@@ -19,5 +19,5 @@
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- U+0451: "ё" CYRILLIC SMALL LETTER IO -->
- <string name="more_keys_for_slavic_ye">&#x0451;</string>
+ <string name="more_keys_for_cyrillic_ye">&#x0451;</string>
</resources>
diff --git a/java/res/values-uk/donottranslate-more-keys.xml b/java/res/values-uk/donottranslate-more-keys.xml
index 3208a6649..323eaafbb 100644
--- a/java/res/values-uk/donottranslate-more-keys.xml
+++ b/java/res/values-uk/donottranslate-more-keys.xml
@@ -19,7 +19,7 @@
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- U+0456: "і" CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I -->
- <string name="keylabel_for_slavic_yery">&#x0456;</string>
+ <string name="keylabel_for_cyrillic_yery">&#x0456;</string>
<!-- U+0457: "ї" CYRILLIC SMALL LETTER YI -->
- <string name="more_keys_for_slavic_yery">&#x0457;</string>
+ <string name="more_keys_for_cyrillic_yery">&#x0457;</string>
</resources>
diff --git a/java/res/values/donottranslate-more-keys.xml b/java/res/values/donottranslate-more-keys.xml
index afce24515..6577acdb9 100644
--- a/java/res/values/donottranslate-more-keys.xml
+++ b/java/res/values/donottranslate-more-keys.xml
@@ -41,20 +41,30 @@
<string name="more_keys_for_scandinavia_row2_10"></string>
<string name="more_keys_for_scandinavia_row2_11"></string>
<!-- U+0449: "щ" CYRILLIC SMALL LETTER SHCHA -->
- <string name="keylabel_for_slavic_shcha">&#x0449;</string>
+ <string name="keylabel_for_cyrillic_shcha">&#x0449;</string>
<!-- U+044B: "ы" CYRILLIC SMALL LETTER YERU -->
- <string name="keylabel_for_slavic_yery">&#x044B;</string>
+ <string name="keylabel_for_cyrillic_yery">&#x044B;</string>
<!-- U+0438: "и" CYRILLIC SMALL LETTER I -->
- <string name="keylabel_for_slavic_i">&#x0438;</string>
- <string name="more_keys_for_slavic_u"></string>
- <string name="more_keys_for_slavic_ye"></string>
- <string name="more_keys_for_slavic_en"></string>
+ <string name="keylabel_for_cyrillic_i">&#x0438;</string>
+ <!-- U+0437: "з" CYRILLIC SMALL LETTER ZE -->
+ <string name="keylabel_for_cyrillic_ze">&#x0437;</string>
+ <!-- U+045B: "ћ" CYRILLIC SMALL LETTER TSHE -->
+ <string name="keylabel_for_cyrillic_tshe">&#x045B;</string>
+ <!-- U+0455: "ѕ" CYRILLIC SMALL LETTER DZE -->
+ <string name="keylabel_for_cyrillic_dze">&#x0455;</string>
+ <!-- U+0452: "ђ" CYRILLIC SMALL LETTER DJE -->
+ <string name="keylabel_for_cyrillic_dje">&#x0452;</string>
+ <string name="more_keys_for_cyrillic_u"></string>
+ <string name="more_keys_for_cyrillic_ye"></string>
+ <string name="more_keys_for_cyrillic_en"></string>
<!-- U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN -->
- <string name="more_keys_for_slavic_ha">&#x044A;</string>
- <string name="more_keys_for_slavic_yery"></string>
- <string name="more_keys_for_slavic_o"></string>
+ <string name="more_keys_for_cyrillic_ha">&#x044A;</string>
+ <string name="more_keys_for_cyrillic_yery"></string>
+ <string name="more_keys_for_cyrillic_o"></string>
<!-- U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN -->
- <string name="more_keys_for_slavic_soft_sign">&#x044A;</string>
+ <string name="more_keys_for_cyrillic_soft_sign">&#x044A;</string>
+ <string name="more_keys_for_cyrillic_ie"></string>
+ <string name="more_keys_for_cyrillic_i"></string>
<!-- U+00A2: "¢" CENT SIGN
U+00A3: "£" POUND SIGN
U+20AC: "€" EURO SIGN
diff --git a/java/res/xml-el/keyboard_set.xml b/java/res/xml-el/keyboard_set.xml
new file mode 100644
index 000000000..19ecb771b
--- /dev/null
+++ b/java/res/xml-el/keyboard_set.xml
@@ -0,0 +1,42 @@
+<?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.
+*/
+-->
+
+<KeyboardSet
+ xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
+ latin:keyboardLocale="el">
+ <Element
+ latin:elementName="alphabet"
+ latin:elementKeyboard="@xml/kbd_greek" />
+ <Element
+ latin:elementName="symbols"
+ latin:elementKeyboard="@xml/kbd_symbols" />
+ <Element
+ latin:elementName="symbolsShifted"
+ latin:elementKeyboard="@xml/kbd_symbols_shift" />
+ <Element
+ latin:elementName="phone"
+ latin:elementKeyboard="@xml/kbd_phone" />
+ <Element
+ latin:elementName="phoneSymbols"
+ latin:elementKeyboard="@xml/kbd_phone_symbols" />
+ <Element
+ latin:elementName="number"
+ latin:elementKeyboard="@xml/kbd_number" />
+</KeyboardSet>
diff --git a/java/res/xml-mk/keyboard_set.xml b/java/res/xml-mk/keyboard_set.xml
new file mode 100644
index 000000000..31199cb0a
--- /dev/null
+++ b/java/res/xml-mk/keyboard_set.xml
@@ -0,0 +1,42 @@
+<?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.
+*/
+-->
+
+<KeyboardSet
+ xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
+ latin:keyboardLocale="mk">
+ <Element
+ latin:elementName="alphabet"
+ latin:elementKeyboard="@xml/kbd_serbian" />
+ <Element
+ latin:elementName="symbols"
+ latin:elementKeyboard="@xml/kbd_symbols" />
+ <Element
+ latin:elementName="symbolsShifted"
+ latin:elementKeyboard="@xml/kbd_symbols_shift" />
+ <Element
+ latin:elementName="phone"
+ latin:elementKeyboard="@xml/kbd_phone" />
+ <Element
+ latin:elementName="phoneSymbols"
+ latin:elementKeyboard="@xml/kbd_phone_symbols" />
+ <Element
+ latin:elementName="number"
+ latin:elementKeyboard="@xml/kbd_number" />
+</KeyboardSet>
diff --git a/java/res/xml-sw600dp/rows_greek.xml b/java/res/xml-sw600dp/rows_greek.xml
new file mode 100644
index 000000000..c77627e59
--- /dev/null
+++ b/java/res/xml-sw600dp/rows_greek.xml
@@ -0,0 +1,170 @@
+<?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" />
+ <Row
+ latin:keyWidth="9.0%p"
+ >
+ <Key
+ latin:keyLabel=";" />
+ <!-- TODO: Should find a way to compound Greek dialytika tonos and other Greek letters. -->
+ <!--
+ <switch>
+ <case
+ latin:keyboardSetElement="alphabetManualShifted|alphabetShiftLockShifted"
+ >
+ U+0385: "΅" GREEK DIALYTIKA TONOS
+ <Key
+ latin:keyLabel="&#x0385;" />
+ </case>
+ <default>
+ -->
+ <!-- U+03C2: "ς" GREEK SMALL LETTER FINAL SIGMA -->
+ <Key
+ latin:keyLabel="&#x03C2;"
+ latin:keyLabelFlags="preserveCase" />
+ <!--
+ </default>
+ </switch>
+ -->
+ <!-- U+03B5: "ε" GREEK SMALL LETTER EPSILON
+ U+03AD: "έ" GREEK SMALL LETTER EPSILON WITH TONOS -->
+ <Key
+ latin:keyLabel="&#x03B5;"
+ latin:moreKeys="&#x03AD;" />
+ <!-- U+03C1: "ρ" GREEK SMALL LETTER RHO -->
+ <Key
+ latin:keyLabel="&#x03C1;" />
+ <!-- U+03C4: "τ" GREEK SMALL LETTER TAU -->
+ <Key
+ latin:keyLabel="&#x03C4;" />
+ <!-- U+03C5: "υ" GREEK SMALL LETTER UPSILON
+ U+03CD: "ύ" GREEK SMALL LETTER UPSILON WITH TONOS
+ U+03CB: "ϋ" GREEK SMALL LETTER UPSILON WITH DIALYTIKA
+ U+03B0: "ΰ" GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS -->
+ <Key
+ latin:keyLabel="&#x03C5;"
+ latin:moreKeys="&#x03CD;,&#x03CB;,&#x03B0;" />
+ <!-- U+03B8: "θ" GREEK SMALL LETTER THETA -->
+ <Key
+ latin:keyLabel="&#x03B8;" />
+ <!-- U+03B9: "ι" GREEK SMALL LETTER IOTA
+ U+03AF: "ί" GREEK SMALL LETTER IOTA WITH TONOS
+ U+03CA: "ϊ" GREEK SMALL LETTER IOTA WITH DIALYTIKA
+ U+0390: "ΐ" GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS -->
+ <Key
+ latin:keyLabel="&#x03B9;"
+ latin:moreKeys="&#x03AF;,&#x03CA;,&#x0390;" />
+ <!-- U+03BF: "ο" GREEK SMALL LETTER OMICRON
+ U+03CC: "ό" GREEK SMALL LETTER OMICRON WITH TONOS -->
+ <Key
+ latin:keyLabel="&#x03BF;"
+ latin:moreKeys="&#x03CC;" />
+ <!-- U+03C0: "π" GREEK SMALL LETTER PI -->
+ <Key
+ latin:keyLabel="&#x03C0;" />
+ <Key
+ latin:keyStyle="deleteKeyStyle"
+ latin:keyXPos="-10.0%p"
+ latin:keyWidth="fillBoth" />
+ </Row>
+ <Row
+ latin:keyWidth="9.0%p"
+ >
+ <!-- U+03B1: "α" GREEK SMALL LETTER ALPHA
+ U+03AC: "ά" GREEK SMALL LETTER ALPHA WITH TONOS -->
+ <Key
+ latin:keyLabel="&#x03B1;"
+ latin:moreKeys="&#x03AC;"
+ latin:keyXPos="4.5%p" />
+ <!-- U+03C3: "σ" GREEK SMALL LETTER SIGMA -->
+ <Key
+ latin:keyLabel="&#x03C3;" />
+ <!-- U+03B4: "δ" GREEK SMALL LETTER DELTA -->
+ <Key
+ latin:keyLabel="&#x03B4;" />
+ <!-- U+03C6: "φ" GREEK SMALL LETTER PHI -->
+ <Key
+ latin:keyLabel="&#x03C6;" />
+ <!-- U+03B3: "γ" GREEK SMALL LETTER GAMMA -->
+ <Key
+ latin:keyLabel="&#x03B3;" />
+ <!-- U+03B7: "η" GREEK SMALL LETTER ETA
+ U+03AE: "ή" GREEK SMALL LETTER ETA WITH TONOS -->
+ <Key
+ latin:keyLabel="&#x03B7;"
+ latin:moreKeys="&#x03AE;" />
+ <!-- U+03BE: "ξ" GREEK SMALL LETTER XI -->
+ <Key
+ latin:keyLabel="&#x03BE;" />
+ <!-- U+03BA: "κ" GREEK SMALL LETTER KAPPA -->
+ <Key
+ latin:keyLabel="&#x03BA;" />
+ <!-- U+03BB: "λ" GREEK SMALL LETTER LAMDA -->
+ <Key
+ latin:keyLabel="&#x03BB;" />
+ <Key
+ latin:keyStyle="enterKeyStyle"
+ latin:keyXPos="-14.6%p"
+ latin:keyWidth="fillBoth" />
+ </Row>
+ <Row
+ latin:keyWidth="8.9%p"
+ >
+ <Key
+ latin:keyStyle="shiftKeyStyle"
+ latin:keyWidth="10.0%p" />
+ <!-- U+03B6: "ζ" GREEK SMALL LETTER ZETA -->
+ <Key
+ latin:keyLabel="&#x03B6;" />
+ <!-- U+03C7: "χ" GREEK SMALL LETTER CHI -->
+ <Key
+ latin:keyLabel="&#x03C7;" />
+ <!-- U+03C8: "ψ" GREEK SMALL LETTER PSI -->
+ <Key
+ latin:keyLabel="&#x03C8;" />
+ <!-- U+03C9: "ω" GREEK SMALL LETTER OMEGA
+ U+03CE: "ώ" GREEK SMALL LETTER OMEGA WITH TONOS -->
+ <Key
+ latin:keyLabel="&#x03C9;"
+ latin:moreKeys="&#x03CE;" />
+ <!-- U+03B2: "β" GREEK SMALL LETTER BETA -->
+ <Key
+ latin:keyLabel="&#x03B2;" />
+ <!-- U+03BD: "ν" GREEK SMALL LETTER NU -->
+ <Key
+ latin:keyLabel="&#x03BD;" />
+ <!-- U+03BC: "μ" GREEK SMALL LETTER MU -->
+ <Key
+ latin:keyLabel="&#x03BC;" />
+ <include
+ latin:keyboardLayout="@xml/keys_comma_period" />
+ <include
+ latin:keyboardLayout="@xml/key_smiley"
+ latin:keyXPos="-8.9%p"
+ latin:keyWidth="fillBoth" />
+ </Row>
+ <include
+ latin:keyboardLayout="@xml/row_qwerty4" />
+</merge>
diff --git a/java/res/xml-sw600dp/rows_serbian.xml b/java/res/xml-sw600dp/rows_serbian.xml
index 5730aa050..989fa488c 100644
--- a/java/res/xml-sw600dp/rows_serbian.xml
+++ b/java/res/xml-sw600dp/rows_serbian.xml
@@ -35,22 +35,23 @@
latin:keyLabel="&#x045A;" />
<!-- U+0435: "е" CYRILLIC SMALL LETTER IE -->
<Key
- latin:keyLabel="&#x0435;" />
+ latin:keyLabel="&#x0435;"
+ latin:moreKeys="@string/more_keys_for_cyrillic_ie" />
<!-- U+0440: "р" CYRILLIC SMALL LETTER ER -->
<Key
latin:keyLabel="&#x0440;" />
<!-- U+0442: "т" CYRILLIC SMALL LETTER TE -->
<Key
latin:keyLabel="&#x0442;" />
- <!-- U+0437: "з" CYRILLIC SMALL LETTER ZE -->
<Key
- latin:keyLabel="&#x0437;" />
+ latin:keyLabel="@string/keylabel_for_cyrillic_ze" />
<!-- U+0443: "у" CYRILLIC SMALL LETTER U -->
<Key
latin:keyLabel="&#x0443;" />
<!-- U+0438: "и" CYRILLIC SMALL LETTER I -->
<Key
- latin:keyLabel="&#x0438;" />
+ latin:keyLabel="&#x0438;"
+ latin:moreKeys="@string/more_keys_for_cyrillic_i" />
<!-- U+043E: "о" CYRILLIC SMALL LETTER O -->
<Key
latin:keyLabel="&#x043E;" />
@@ -98,9 +99,8 @@
<!-- U+0447: "ч" CYRILLIC SMALL LETTER CHE -->
<Key
latin:keyLabel="&#x0447;" />
- <!-- U+045B: "ћ" CYRILLIC SMALL LETTER TSHE -->
<Key
- latin:keyLabel="&#x045B;" />
+ latin:keyLabel="@string/keylabel_for_cyrillic_tshe" />
<Key
latin:keyStyle="enterKeyStyle"
latin:keyXPos="-14.6%p"
@@ -112,9 +112,8 @@
<Key
latin:keyStyle="shiftKeyStyle"
latin:keyWidth="8.0%p" />
- <!-- U+0455: "ѕ" CYRILLIC SMALL LETTER DZE -->
<Key
- latin:keyLabel="&#x0455;" />
+ latin:keyLabel="@string/keylabel_for_cyrillic_dze" />
<!-- U+045F: "џ" CYRILLIC SMALL LETTER DZHE -->
<Key
latin:keyLabel="&#x045F;" />
@@ -133,9 +132,8 @@
<!-- U+043C: "м" CYRILLIC SMALL LETTER EM -->
<Key
latin:keyLabel="&#x043C;" />
- <!-- U+0452: "ђ" CYRILLIC SMALL LETTER DJE -->
<Key
- latin:keyLabel="&#x0452;" />
+ latin:keyLabel="@string/keylabel_for_cyrillic_dje" />
<!-- U+0436: "ж" CYRILLIC SMALL LETTER ZHE -->
<Key
latin:keyLabel="&#x0436;" />
diff --git a/java/res/xml-sw600dp/rows_slavic.xml b/java/res/xml-sw600dp/rows_slavic.xml
index 58f0b3900..7ff63bc0e 100644
--- a/java/res/xml-sw600dp/rows_slavic.xml
+++ b/java/res/xml-sw600dp/rows_slavic.xml
@@ -35,18 +35,18 @@
<!-- U+0443: "у" CYRILLIC SMALL LETTER U -->
<Key
latin:keyLabel="&#x0443;"
- latin:moreKeys="@string/more_keys_for_slavic_u" />
+ latin:moreKeys="@string/more_keys_for_cyrillic_u" />
<!-- U+043A: "к" CYRILLIC SMALL LETTER KA -->
<Key
latin:keyLabel="&#x043A;" />
<!-- U+0435: "е" CYRILLIC SMALL LETTER IE -->
<Key
latin:keyLabel="&#x0435;"
- latin:moreKeys="@string/more_keys_for_slavic_ye" />
+ latin:moreKeys="@string/more_keys_for_cyrillic_ye" />
<!-- U+043D: "н" CYRILLIC SMALL LETTER EN -->
<Key
latin:keyLabel="&#x043D;"
- latin:moreKeys="@string/more_keys_for_slavic_en" />
+ latin:moreKeys="@string/more_keys_for_cyrillic_en" />
<!-- U+0433: "г" CYRILLIC SMALL LETTER GHE -->
<Key
latin:keyLabel="&#x0433;" />
@@ -54,7 +54,7 @@
<Key
latin:keyLabel="&#x0448;" />
<Key
- latin:keyLabel="@string/keylabel_for_slavic_shcha" />
+ latin:keyLabel="@string/keylabel_for_cyrillic_shcha" />
<!-- U+0437: "з" CYRILLIC SMALL LETTER ZE -->
<Key
latin:keyLabel="&#x0437;" />
@@ -77,8 +77,8 @@
latin:keyLabel="&#x0444;"
latin:keyXPos="2.25%p" />
<Key
- latin:keyLabel="@string/keylabel_for_slavic_yery"
- latin:moreKeys="@string/more_keys_for_slavic_yery" />
+ latin:keyLabel="@string/keylabel_for_cyrillic_yery"
+ latin:moreKeys="@string/more_keys_for_cyrillic_yery" />
<!-- U+0432: "в" CYRILLIC SMALL LETTER VE -->
<Key
latin:keyLabel="&#x0432;" />
@@ -94,7 +94,7 @@
<!-- U+043E: "о" CYRILLIC SMALL LETTER O -->
<Key
latin:keyLabel="&#x043E;"
- latin:moreKeys="@string/more_keys_for_slavic_o" />
+ latin:moreKeys="@string/more_keys_for_cyrillic_o" />
<!-- U+043B: "л" CYRILLIC SMALL LETTER EL -->
<Key
latin:keyLabel="&#x043B;" />
@@ -130,7 +130,7 @@
<Key
latin:keyLabel="&#x043C;" />
<Key
- latin:keyLabel="@string/keylabel_for_slavic_i" />
+ latin:keyLabel="@string/keylabel_for_cyrillic_i" />
<!-- U+0442: "т" CYRILLIC SMALL LETTER TE -->
<Key
latin:keyLabel="&#x0442;" />
diff --git a/java/res/xml-sw768dp/rows_greek.xml b/java/res/xml-sw768dp/rows_greek.xml
new file mode 100644
index 000000000..e9a76a588
--- /dev/null
+++ b/java/res/xml-sw768dp/rows_greek.xml
@@ -0,0 +1,177 @@
+<?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" />
+ <Row
+ latin:keyWidth="8.282%p"
+ >
+ <Key
+ latin:keyStyle="tabKeyStyle"
+ latin:keyLabelFlags="alignLeft"
+ latin:keyWidth="7.969%p" />
+ <Key
+ latin:keyLabel=";" />
+ <!-- TODO: Should find a way to compound Greek dialytika tonos and other Greek letters. -->
+ <!--
+ <switch>
+ <case
+ latin:keyboardSetElement="alphabetManualShifted|alphabetShiftLockShifted"
+ >
+ U+0385: "΅" GREEK DIALYTIKA TONOS
+ <Key
+ latin:keyLabel="&#x0385;" />
+ </case>
+ <default>
+ -->
+ <!-- U+03C2: "ς" GREEK SMALL LETTER FINAL SIGMA -->
+ <Key
+ latin:keyLabel="&#x03C2;"
+ latin:keyLabelFlags="preserveCase" />
+ <!--
+ </default>
+ </switch>
+ -->
+ <!-- U+03B5: "ε" GREEK SMALL LETTER EPSILON
+ U+03AD: "έ" GREEK SMALL LETTER EPSILON WITH TONOS -->
+ <Key
+ latin:keyLabel="&#x03B5;"
+ latin:moreKeys="&#x03AD;" />
+ <!-- U+03C1: "ρ" GREEK SMALL LETTER RHO -->
+ <Key
+ latin:keyLabel="&#x03C1;" />
+ <!-- U+03C4: "τ" GREEK SMALL LETTER TAU -->
+ <Key
+ latin:keyLabel="&#x03C4;" />
+ <!-- U+03C5: "υ" GREEK SMALL LETTER UPSILON
+ U+03CD: "ύ" GREEK SMALL LETTER UPSILON WITH TONOS
+ U+03CB: "ϋ" GREEK SMALL LETTER UPSILON WITH DIALYTIKA
+ U+03B0: "ΰ" GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS -->
+ <Key
+ latin:keyLabel="&#x03C5;"
+ latin:moreKeys="&#x03CD;,&#x03CB;,&#x03B0;" />
+ <!-- U+03B8: "θ" GREEK SMALL LETTER THETA -->
+ <Key
+ latin:keyLabel="&#x03B8;" />
+ <!-- U+03B9: "ι" GREEK SMALL LETTER IOTA
+ U+03AF: "ί" GREEK SMALL LETTER IOTA WITH TONOS
+ U+03CA: "ϊ" GREEK SMALL LETTER IOTA WITH DIALYTIKA
+ U+0390: "ΐ" GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS -->
+ <Key
+ latin:keyLabel="&#x03B9;"
+ latin:moreKeys="&#x03AF;,&#x03CA;,&#x0390;" />
+ <!-- U+03BF: "ο" GREEK SMALL LETTER OMICRON
+ U+03CC: "ό" GREEK SMALL LETTER OMICRON WITH TONOS -->
+ <Key
+ latin:keyLabel="&#x03BF;"
+ latin:moreKeys="&#x03CC;" />
+ <!-- U+03C0: "π" GREEK SMALL LETTER PI -->
+ <Key
+ latin:keyLabel="&#x03C0;" />
+ <Key
+ latin:keyStyle="deleteKeyStyle"
+ latin:keyXPos="-9.219%p"
+ latin:keyWidth="fillBoth" />
+ </Row>
+ <Row
+ latin:keyWidth="8.125%p"
+ >
+ <Key
+ latin:keyStyle="toSymbolKeyStyle"
+ latin:keyLabelFlags="alignLeft"
+ latin:keyWidth="11.172%p"/>
+ <!-- U+03B1: "α" GREEK SMALL LETTER ALPHA
+ U+03AC: "ά" GREEK SMALL LETTER ALPHA WITH TONOS -->
+ <Key
+ latin:keyLabel="&#x03B1;"
+ latin:moreKeys="&#x03AC;" />
+ <!-- U+03C3: "σ" GREEK SMALL LETTER SIGMA -->
+ <Key
+ latin:keyLabel="&#x03C3;" />
+ <!-- U+03B4: "δ" GREEK SMALL LETTER DELTA -->
+ <Key
+ latin:keyLabel="&#x03B4;" />
+ <!-- U+03C6: "φ" GREEK SMALL LETTER PHI -->
+ <Key
+ latin:keyLabel="&#x03C6;" />
+ <!-- U+03B3: "γ" GREEK SMALL LETTER GAMMA -->
+ <Key
+ latin:keyLabel="&#x03B3;" />
+ <!-- U+03B7: "η" GREEK SMALL LETTER ETA
+ U+03AE: "ή" GREEK SMALL LETTER ETA WITH TONOS -->
+ <Key
+ latin:keyLabel="&#x03B7;"
+ latin:moreKeys="&#x03AE;" />
+ <!-- U+03BE: "ξ" GREEK SMALL LETTER XI -->
+ <Key
+ latin:keyLabel="&#x03BE;" />
+ <!-- U+03BA: "κ" GREEK SMALL LETTER KAPPA -->
+ <Key
+ latin:keyLabel="&#x03BA;" />
+ <!-- U+03BB: "λ" GREEK SMALL LETTER LAMDA -->
+ <Key
+ latin:keyLabel="&#x03BB;" />
+ <Key
+ latin:keyStyle="enterKeyStyle"
+ latin:keyXPos="-15.704%p"
+ latin:keyWidth="fillBoth" />
+ </Row>
+ <Row
+ latin:keyWidth="8.047%p"
+ >
+ <Key
+ latin:keyStyle="shiftKeyStyle"
+ latin:keyWidth="13.829%p" />
+ <!-- U+03B6: "ζ" GREEK SMALL LETTER ZETA -->
+ <Key
+ latin:keyLabel="&#x03B6;" />
+ <!-- U+03C7: "χ" GREEK SMALL LETTER CHI -->
+ <Key
+ latin:keyLabel="&#x03C7;" />
+ <!-- U+03C8: "ψ" GREEK SMALL LETTER PSI -->
+ <Key
+ latin:keyLabel="&#x03C8;" />
+ <!-- U+03C9: "ω" GREEK SMALL LETTER OMEGA
+ U+03CE: "ώ" GREEK SMALL LETTER OMEGA WITH TONOS -->
+ <Key
+ latin:keyLabel="&#x03C9;"
+ latin:moreKeys="&#x03CE;" />
+ <!-- U+03B2: "β" GREEK SMALL LETTER BETA -->
+ <Key
+ latin:keyLabel="&#x03B2;" />
+ <!-- U+03BD: "ν" GREEK SMALL LETTER NU -->
+ <Key
+ latin:keyLabel="&#x03BD;" />
+ <!-- U+03BC: "μ" GREEK SMALL LETTER MU -->
+ <Key
+ latin:keyLabel="&#x03BC;" />
+ <include
+ latin:keyboardLayout="@xml/keys_comma_period" />
+ <Key
+ latin:keyStyle="shiftKeyStyle"
+ latin:keyXPos="-13.750%p"
+ latin:keyWidth="fillBoth" />
+ </Row>
+ <include
+ latin:keyboardLayout="@xml/row_qwerty4" />
+</merge>
diff --git a/java/res/xml-sw768dp/rows_serbian.xml b/java/res/xml-sw768dp/rows_serbian.xml
index 39907c867..62668e5cc 100644
--- a/java/res/xml-sw768dp/rows_serbian.xml
+++ b/java/res/xml-sw768dp/rows_serbian.xml
@@ -37,22 +37,23 @@
latin:keyLabel="&#x045A;" />
<!-- U+0435: "е" CYRILLIC SMALL LETTER IE -->
<Key
- latin:keyLabel="&#x0435;" />
+ latin:keyLabel="&#x0435;"
+ latin:moreKeys="@string/more_keys_for_cyrillic_ie" />
<!-- U+0440: "р" CYRILLIC SMALL LETTER ER -->
<Key
latin:keyLabel="&#x0440;" />
<!-- U+0442: "т" CYRILLIC SMALL LETTER TE -->
<Key
latin:keyLabel="&#x0442;" />
- <!-- U+0437: "з" CYRILLIC SMALL LETTER ZE -->
<Key
- latin:keyLabel="&#x0437;" />
+ latin:keyLabel="@string/keylabel_for_cyrillic_ze" />
<!-- U+0443: "у" CYRILLIC SMALL LETTER U -->
<Key
latin:keyLabel="&#x0443;" />
<!-- U+0438: "и" CYRILLIC SMALL LETTER I -->
<Key
- latin:keyLabel="&#x0438;" />
+ latin:keyLabel="&#x0438;"
+ latin:moreKeys="@string/more_keys_for_cyrillic_i" />
<!-- U+043E: "о" CYRILLIC SMALL LETTER O -->
<Key
latin:keyLabel="&#x043E;" />
@@ -107,9 +108,8 @@
<!-- U+0447: "ч" CYRILLIC SMALL LETTER CHE -->
<Key
latin:keyLabel="&#x0447;" />
- <!-- U+045B: "ћ" CYRILLIC SMALL LETTER TSHE -->
<Key
- latin:keyLabel="&#x045B;" />
+ latin:keyLabel="@string/keylabel_for_cyrillic_tshe" />
<Key
latin:keyStyle="deleteKeyStyle"
latin:keyXPos="-9.219%p"
@@ -121,9 +121,8 @@
<Key
latin:keyStyle="shiftKeyStyle"
latin:keyWidth="13.829%p" />
- <!-- U+0455: "ѕ" CYRILLIC SMALL LETTER DZE -->
<Key
- latin:keyLabel="&#x0455;" />
+ latin:keyLabel="@string/keylabel_for_cyrillic_dze" />
<!-- U+045F: "џ" CYRILLIC SMALL LETTER DZHE -->
<Key
latin:keyLabel="&#x045F;" />
@@ -142,6 +141,8 @@
<!-- U+043C: "м" CYRILLIC SMALL LETTER EM -->
<Key
latin:keyLabel="&#x043C;" />
+ <Key
+ latin:keyLabel="@string/keylabel_for_cyrillic_dje" />
<include
latin:keyboardLayout="@xml/keys_comma_period" />
<Key
diff --git a/java/res/xml-sw768dp/rows_slavic.xml b/java/res/xml-sw768dp/rows_slavic.xml
index 26857aebc..3611ef6b3 100644
--- a/java/res/xml-sw768dp/rows_slavic.xml
+++ b/java/res/xml-sw768dp/rows_slavic.xml
@@ -38,18 +38,18 @@
<!-- U+0443: "у" CYRILLIC SMALL LETTER U -->
<Key
latin:keyLabel="&#x0443;"
- latin:moreKeys="@string/more_keys_for_slavic_u" />
+ latin:moreKeys="@string/more_keys_for_cyrillic_u" />
<!-- U+043A: "к" CYRILLIC SMALL LETTER KA -->
<Key
latin:keyLabel="&#x043A;" />
<!-- U+0435: "е" CYRILLIC SMALL LETTER IE -->
<Key
latin:keyLabel="&#x0435;"
- latin:moreKeys="@string/more_keys_for_slavic_ye" />
+ latin:moreKeys="@string/more_keys_for_cyrillic_ye" />
<!-- U+043D: "н" CYRILLIC SMALL LETTER EN -->
<Key
latin:keyLabel="&#x043D;"
- latin:moreKeys="@string/more_keys_for_slavic_en" />
+ latin:moreKeys="@string/more_keys_for_cyrillic_en" />
<!-- U+0433: "г" CYRILLIC SMALL LETTER GHE -->
<Key
latin:keyLabel="&#x0433;" />
@@ -57,7 +57,7 @@
<Key
latin:keyLabel="&#x0448;" />
<Key
- latin:keyLabel="@string/keylabel_for_slavic_shcha" />
+ latin:keyLabel="@string/keylabel_for_cyrillic_shcha" />
<!-- U+0437: "з" CYRILLIC SMALL LETTER ZE -->
<Key
latin:keyLabel="&#x0437;" />
@@ -82,8 +82,8 @@
<Key
latin:keyLabel="&#x0444;" />
<Key
- latin:keyLabel="@string/keylabel_for_slavic_yery"
- latin:moreKeys="@string/more_keys_for_slavic_yery" />
+ latin:keyLabel="@string/keylabel_for_cyrillic_yery"
+ latin:moreKeys="@string/more_keys_for_cyrillic_yery" />
<!-- U+0432: "в" CYRILLIC SMALL LETTER VE -->
<Key
latin:keyLabel="&#x0432;" />
@@ -99,7 +99,7 @@
<!-- U+043E: "о" CYRILLIC SMALL LETTER O -->
<Key
latin:keyLabel="&#x043E;"
- latin:moreKeys="@string/more_keys_for_slavic_o" />
+ latin:moreKeys="@string/more_keys_for_cyrillic_o" />
<!-- U+043B: "л" CYRILLIC SMALL LETTER EL -->
<Key
latin:keyLabel="&#x043B;" />
@@ -136,7 +136,7 @@
<Key
latin:keyLabel="&#x043C;" />
<Key
- latin:keyLabel="@string/keylabel_for_slavic_i" />
+ latin:keyLabel="@string/keylabel_for_cyrillic_i" />
<!-- U+0442: "т" CYRILLIC SMALL LETTER TE -->
<Key
latin:keyLabel="&#x0442;" />
diff --git a/java/res/xml/kbd_greek.xml b/java/res/xml/kbd_greek.xml
new file mode 100644
index 000000000..7056efb00
--- /dev/null
+++ b/java/res/xml/kbd_greek.xml
@@ -0,0 +1,26 @@
+<?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"
+>
+ <include
+ latin:keyboardLayout="@xml/rows_greek" />
+</Keyboard>
diff --git a/java/res/xml/key_styles_enter.xml b/java/res/xml/key_styles_enter.xml
index 61efb89b6..03bcb8620 100644
--- a/java/res/xml/key_styles_enter.xml
+++ b/java/res/xml/key_styles_enter.xml
@@ -49,7 +49,7 @@
<key-style
latin:styleName="navigateMoreKeysStyle"
latin:keyLabelFlags="hasPopupHint|preserveCase"
- latin:moreKeys="!fixedColumnOrder!2,@string/action_previous_as_more_key,@string/action_next_as_more_key" />
+ latin:moreKeys="!fixedColumnOrder!2,!needsDividers!,@string/action_previous_as_more_key,@string/action_next_as_more_key" />
</case>
<case
latin:navigateNext="true"
diff --git a/java/res/xml/method.xml b/java/res/xml/method.xml
index 98dc7667e..8b1a3ef77 100644
--- a/java/res/xml/method.xml
+++ b/java/res/xml/method.xml
@@ -20,8 +20,9 @@
<!-- The attributes in this XML file provide configuration information -->
<!-- for the Input Method Manager. -->
-<!-- Keyboard: en_US, en_GB, ar, be, bg, cs, da, de, de(QWERTY), es, es_US, et, fi, fr, fr_CA,
- fr_CH, hr, hu, it, iw, ka, ky, lt, lv, nb, nl, pl, pt, ro, ru, sk, sl, sr, sv, tr, uk, vi -->
+<!-- Keyboard: en_US, en_GB, ar, be, bg, cs, da, de, de(QWERTY), el, es, es_US, et, fi, fr, fr_CA,
+ fr_CH, hr, hu, it, iw, ka, ky, lt, lv, mk, nb, nl, pl, pt, ro, ru, sk, sl, sr, sv, tr, uk,
+ vi -->
<!-- TODO: use <lang>_keyboard icon instead of a common keyboard icon. -->
<!-- If IME doesn't have an applicable subtype, the first subtype will be used as a default
subtype.-->
@@ -84,6 +85,12 @@
/>
<subtype android:icon="@drawable/ic_subtype_keyboard"
android:label="@string/subtype_generic"
+ android:imeSubtypeLocale="el"
+ android:imeSubtypeMode="keyboard"
+ android:imeSubtypeExtraValue="SupportTouchPositionCorrection"
+ />
+ <subtype android:icon="@drawable/ic_subtype_keyboard"
+ android:label="@string/subtype_generic"
android:imeSubtypeLocale="es"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="AsciiCapable,SupportTouchPositionCorrection"
@@ -169,6 +176,12 @@
/>
<subtype android:icon="@drawable/ic_subtype_keyboard"
android:label="@string/subtype_generic"
+ android:imeSubtypeLocale="mk"
+ android:imeSubtypeMode="keyboard"
+ android:imeSubtypeExtraValue="SupportTouchPositionCorrection"
+ />
+ <subtype android:icon="@drawable/ic_subtype_keyboard"
+ android:label="@string/subtype_generic"
android:imeSubtypeLocale="nb"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="AsciiCapable,SupportTouchPositionCorrection"
diff --git a/java/res/xml/rows_greek.xml b/java/res/xml/rows_greek.xml
new file mode 100644
index 000000000..1602c507e
--- /dev/null
+++ b/java/res/xml/rows_greek.xml
@@ -0,0 +1,185 @@
+<?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" />
+ <Row
+ latin:keyWidth="10%p"
+ >
+ <Key
+ latin:keyLabel=";"
+ latin:keyHintLabel="1"
+ latin:additionalMoreKeys="1" />
+ <!-- TODO: Should find a way to compound Greek dialytika tonos and other Greek letters. -->
+ <!--
+ <switch>
+ <case
+ latin:keyboardSetElement="alphabetManualShifted|alphabetShiftLockShifted"
+ >
+ U+0385: "΅" GREEK DIALYTIKA TONOS
+ <Key
+ latin:keyLabel="&#x0385;"
+ latin:keyHintLabel="2"
+ latin:additionalMoreKeys="2" />
+ </case>
+ <default>
+ -->
+ <!-- U+03C2: "ς" GREEK SMALL LETTER FINAL SIGMA -->
+ <Key
+ latin:keyLabel="&#x03C2;"
+ latin:keyLabelFlags="preserveCase"
+ latin:keyHintLabel="2"
+ latin:additionalMoreKeys="2" />
+ <!--
+ </default>
+ </switch>
+ -->
+ <!-- U+03B5: "ε" GREEK SMALL LETTER EPSILON
+ U+03AD: "έ" GREEK SMALL LETTER EPSILON WITH TONOS -->
+ <Key
+ latin:keyLabel="&#x03B5;"
+ latin:keyHintLabel="3"
+ latin:additionalMoreKeys="3"
+ latin:moreKeys="&#x03AD;" />
+ <!-- U+03C1: "ρ" GREEK SMALL LETTER RHO -->
+ <Key
+ latin:keyLabel="&#x03C1;"
+ latin:keyHintLabel="4"
+ latin:additionalMoreKeys="4" />
+ <!-- U+03C4: "τ" GREEK SMALL LETTER TAU -->
+ <Key
+ latin:keyLabel="&#x03C4;"
+ latin:keyHintLabel="5"
+ latin:additionalMoreKeys="5" />
+ <!-- U+03C5: "υ" GREEK SMALL LETTER UPSILON
+ U+03CD: "ύ" GREEK SMALL LETTER UPSILON WITH TONOS
+ U+03CB: "ϋ" GREEK SMALL LETTER UPSILON WITH DIALYTIKA
+ U+03B0: "ΰ" GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS -->
+ <Key
+ latin:keyLabel="&#x03C5;"
+ latin:keyHintLabel="6"
+ latin:additionalMoreKeys="6"
+ latin:moreKeys="&#x03CD;,&#x03CB;,&#x03B0;" />
+ <!-- U+03B8: "θ" GREEK SMALL LETTER THETA -->
+ <Key
+ latin:keyLabel="&#x03B8;"
+ latin:keyHintLabel="7"
+ latin:additionalMoreKeys="7" />
+ <!-- U+03B9: "ι" GREEK SMALL LETTER IOTA
+ U+03AF: "ί" GREEK SMALL LETTER IOTA WITH TONOS
+ U+03CA: "ϊ" GREEK SMALL LETTER IOTA WITH DIALYTIKA
+ U+0390: "ΐ" GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS -->
+ <Key
+ latin:keyLabel="&#x03B9;"
+ latin:keyHintLabel="8"
+ latin:additionalMoreKeys="8"
+ latin:moreKeys="&#x03AF;,&#x03CA;,&#x0390;" />
+ <!-- U+03BF: "ο" GREEK SMALL LETTER OMICRON
+ U+03CC: "ό" GREEK SMALL LETTER OMICRON WITH TONOS -->
+ <Key
+ latin:keyLabel="&#x03BF;"
+ latin:keyHintLabel="9"
+ latin:additionalMoreKeys="9"
+ latin:moreKeys="&#x03CC;" />
+ <!-- U+03C0: "π" GREEK SMALL LETTER PI -->
+ <Key
+ latin:keyLabel="&#x03C0;"
+ latin:keyHintLabel="0"
+ latin:additionalMoreKeys="0"
+ latin:keyWidth="fillRight" />
+ </Row>
+ <Row
+ latin:keyWidth="10%p"
+ >
+ <!-- U+03B1: "α" GREEK SMALL LETTER ALPHA
+ U+03AC: "ά" GREEK SMALL LETTER ALPHA WITH TONOS -->
+ <Key
+ latin:keyLabel="&#x03B1;"
+ latin:moreKeys="&#x03AC;"
+ latin:keyXPos="5%p" />
+ <!-- U+03C3: "σ" GREEK SMALL LETTER SIGMA -->
+ <Key
+ latin:keyLabel="&#x03C3;" />
+ <!-- U+03B4: "δ" GREEK SMALL LETTER DELTA -->
+ <Key
+ latin:keyLabel="&#x03B4;" />
+ <!-- U+03C6: "φ" GREEK SMALL LETTER PHI -->
+ <Key
+ latin:keyLabel="&#x03C6;" />
+ <!-- U+03B3: "γ" GREEK SMALL LETTER GAMMA -->
+ <Key
+ latin:keyLabel="&#x03B3;" />
+ <!-- U+03B7: "η" GREEK SMALL LETTER ETA
+ U+03AE: "ή" GREEK SMALL LETTER ETA WITH TONOS -->
+ <Key
+ latin:keyLabel="&#x03B7;"
+ latin:moreKeys="&#x03AE;" />
+ <!-- U+03BE: "ξ" GREEK SMALL LETTER XI -->
+ <Key
+ latin:keyLabel="&#x03BE;" />
+ <!-- U+03BA: "κ" GREEK SMALL LETTER KAPPA -->
+ <Key
+ latin:keyLabel="&#x03BA;" />
+ <!-- U+03BB: "λ" GREEK SMALL LETTER LAMDA -->
+ <Key
+ latin:keyLabel="&#x03BB;" />
+ <!-- Here is 5%p space -->
+ </Row>
+ <Row
+ latin:keyWidth="10%p"
+ >
+ <Key
+ latin:keyStyle="shiftKeyStyle"
+ latin:keyWidth="15%p"
+ latin:visualInsetsRight="1%p" />
+ <!-- U+03B6: "ζ" GREEK SMALL LETTER ZETA -->
+ <Key
+ latin:keyLabel="&#x03B6;" />
+ <!-- U+03C7: "χ" GREEK SMALL LETTER CHI -->
+ <Key
+ latin:keyLabel="&#x03C7;" />
+ <!-- U+03C8: "ψ" GREEK SMALL LETTER PSI -->
+ <Key
+ latin:keyLabel="&#x03C8;" />
+ <!-- U+03C9: "ω" GREEK SMALL LETTER OMEGA
+ U+03CE: "ώ" GREEK SMALL LETTER OMEGA WITH TONOS -->
+ <Key
+ latin:keyLabel="&#x03C9;"
+ latin:moreKeys="&#x03CE;" />
+ <!-- U+03B2: "β" GREEK SMALL LETTER BETA -->
+ <Key
+ latin:keyLabel="&#x03B2;" />
+ <!-- U+03BD: "ν" GREEK SMALL LETTER NU -->
+ <Key
+ latin:keyLabel="&#x03BD;" />
+ <!-- U+03BC: "μ" GREEK SMALL LETTER MU -->
+ <Key
+ latin:keyLabel="&#x03BC;" />
+ <Key
+ latin:keyStyle="deleteKeyStyle"
+ latin:keyWidth="fillRight"
+ latin:visualInsetsLeft="1%p" />
+ </Row>
+ <include
+ latin:keyboardLayout="@xml/row_qwerty4" />
+</merge>
diff --git a/java/res/xml/rows_serbian.xml b/java/res/xml/rows_serbian.xml
index cf52fe0cc..ed33dc751 100644
--- a/java/res/xml/rows_serbian.xml
+++ b/java/res/xml/rows_serbian.xml
@@ -40,7 +40,8 @@
<Key
latin:keyLabel="&#x0435;"
latin:keyHintLabel="3"
- latin:additionalMoreKeys="3" />
+ latin:additionalMoreKeys="3"
+ latin:moreKeys="@string/more_keys_for_cyrillic_ie" />
<!-- U+0440: "р" CYRILLIC SMALL LETTER ER -->
<Key
latin:keyLabel="&#x0440;"
@@ -51,9 +52,8 @@
latin:keyLabel="&#x0442;"
latin:keyHintLabel="5"
latin:additionalMoreKeys="5" />
- <!-- U+0437: "з" CYRILLIC SMALL LETTER ZE -->
<Key
- latin:keyLabel="&#x0437;"
+ latin:keyLabel="@string/keylabel_for_cyrillic_ze"
latin:keyHintLabel="6"
latin:additionalMoreKeys="6" />
<!-- U+0443: "у" CYRILLIC SMALL LETTER U -->
@@ -65,7 +65,8 @@
<Key
latin:keyLabel="&#x0438;"
latin:keyHintLabel="8"
- latin:additionalMoreKeys="8" />
+ latin:additionalMoreKeys="8"
+ latin:moreKeys="@string/more_keys_for_cyrillic_i" />
<!-- U+043E: "о" CYRILLIC SMALL LETTER O -->
<Key
latin:keyLabel="&#x043E;"
@@ -114,9 +115,8 @@
<!-- U+0447: "ч" CYRILLIC SMALL LETTER CHE -->
<Key
latin:keyLabel="&#x0447;" />
- <!-- U+045B: "ћ" CYRILLIC SMALL LETTER TSHE -->
<Key
- latin:keyLabel="&#x045B;"
+ latin:keyLabel="@string/keylabel_for_cyrillic_tshe"
latin:keyWidth="fillRight" />
</Row>
<Row
@@ -125,9 +125,8 @@
<Key
latin:keyStyle="shiftKeyStyle"
latin:keyWidth="11.75%p" />
- <!-- U+0455: "ѕ" CYRILLIC SMALL LETTER DZE -->
<Key
- latin:keyLabel="&#x0455;" />
+ latin:keyLabel="@string/keylabel_for_cyrillic_dze" />
<!-- U+045F: "џ" CYRILLIC SMALL LETTER DZHE -->
<Key
latin:keyLabel="&#x045F;" />
@@ -146,9 +145,8 @@
<!-- U+043C: "м" CYRILLIC SMALL LETTER EM -->
<Key
latin:keyLabel="&#x043C;" />
- <!-- U+0452: "ђ" CYRILLIC SMALL LETTER DJE -->
<Key
- latin:keyLabel="&#x0452;" />
+ latin:keyLabel="@string/keylabel_for_cyrillic_dje" />
<!-- U+0436: "ж" CYRILLIC SMALL LETTER ZHE -->
<Key
latin:keyLabel="&#x0436;" />
diff --git a/java/res/xml/rows_slavic.xml b/java/res/xml/rows_slavic.xml
index 4099edd3f..d75f2091a 100644
--- a/java/res/xml/rows_slavic.xml
+++ b/java/res/xml/rows_slavic.xml
@@ -41,7 +41,7 @@
latin:keyLabel="&#x0443;"
latin:keyHintLabel="3"
latin:additionalMoreKeys="3"
- latin:moreKeys="@string/more_keys_for_slavic_u" />
+ latin:moreKeys="@string/more_keys_for_cyrillic_u" />
<!-- U+043A: "к" CYRILLIC SMALL LETTER KA -->
<Key
latin:keyLabel="&#x043A;"
@@ -52,13 +52,13 @@
latin:keyLabel="&#x0435;"
latin:keyHintLabel="5"
latin:additionalMoreKeys="5"
- latin:moreKeys="@string/more_keys_for_slavic_ye" />
+ latin:moreKeys="@string/more_keys_for_cyrillic_ye" />
<!-- U+043D: "н" CYRILLIC SMALL LETTER EN -->
<Key
latin:keyLabel="&#x043D;"
latin:keyHintLabel="6"
latin:additionalMoreKeys="6"
- latin:moreKeys="@string/more_keys_for_slavic_en" />
+ latin:moreKeys="@string/more_keys_for_cyrillic_en" />
<!-- U+0433: "г" CYRILLIC SMALL LETTER GHE -->
<Key
latin:keyLabel="&#x0433;"
@@ -70,7 +70,7 @@
latin:keyHintLabel="8"
latin:additionalMoreKeys="8" />
<Key
- latin:keyLabel="@string/keylabel_for_slavic_shcha"
+ latin:keyLabel="@string/keylabel_for_cyrillic_shcha"
latin:keyHintLabel="9"
latin:additionalMoreKeys="9" />
<!-- U+0437: "з" CYRILLIC SMALL LETTER ZE -->
@@ -81,7 +81,7 @@
<!-- U+0445: "х" CYRILLIC SMALL LETTER HA -->
<Key
latin:keyLabel="&#x0445;"
- latin:moreKeys="@string/more_keys_for_slavic_ha"
+ latin:moreKeys="@string/more_keys_for_cyrillic_ha"
latin:keyWidth="fillRight" />
</Row>
<Row
@@ -91,8 +91,8 @@
<Key
latin:keyLabel="&#x0444;" />
<Key
- latin:keyLabel="@string/keylabel_for_slavic_yery"
- latin:moreKeys="@string/more_keys_for_slavic_yery" />
+ latin:keyLabel="@string/keylabel_for_cyrillic_yery"
+ latin:moreKeys="@string/more_keys_for_cyrillic_yery" />
<!-- U+0432: "в" CYRILLIC SMALL LETTER VE -->
<Key
latin:keyLabel="&#x0432;" />
@@ -108,7 +108,7 @@
<!-- U+043E: "о" CYRILLIC SMALL LETTER O -->
<Key
latin:keyLabel="&#x043E;"
- latin:moreKeys="@string/more_keys_for_slavic_o" />
+ latin:moreKeys="@string/more_keys_for_cyrillic_o" />
<!-- U+043B: "л" CYRILLIC SMALL LETTER EL -->
<Key
latin:keyLabel="&#x043B;" />
@@ -142,14 +142,14 @@
<Key
latin:keyLabel="&#x043C;" />
<Key
- latin:keyLabel="@string/keylabel_for_slavic_i" />
+ latin:keyLabel="@string/keylabel_for_cyrillic_i" />
<!-- U+0442: "т" CYRILLIC SMALL LETTER TE -->
<Key
latin:keyLabel="&#x0442;" />
<!-- U+044C: "ь" CYRILLIC SMALL LETTER SOFT SIGN -->
<Key
latin:keyLabel="&#x044C;"
- latin:moreKeys="@string/more_keys_for_slavic_soft_sign" />
+ latin:moreKeys="@string/more_keys_for_cyrillic_soft_sign" />
<!-- U+0431: "б" CYRILLIC SMALL LETTER BE -->
<Key
latin:keyLabel="&#x0431;" />
diff --git a/java/src/com/android/inputmethod/keyboard/Key.java b/java/src/com/android/inputmethod/keyboard/Key.java
index f1611d9ee..a719b4aa7 100644
--- a/java/src/com/android/inputmethod/keyboard/Key.java
+++ b/java/src/com/android/inputmethod/keyboard/Key.java
@@ -108,9 +108,11 @@ public class Key {
private static final int MORE_KEYS_COLUMN_MASK = 0x000000ff;
private static final int MORE_KEYS_FLAGS_FIXED_COLUMN_ORDER = 0x80000000;
private static final int MORE_KEYS_FLAGS_HAS_LABELS = 0x40000000;
+ private static final int MORE_KEYS_FLAGS_NEEDS_DIVIDERS = 0x40000000;
private static final String MORE_KEYS_AUTO_COLUMN_ORDER = "!autoColumnOrder!";
private static final String MORE_KEYS_FIXED_COLUMN_ORDER = "!fixedColumnOrder!";
private static final String MORE_KEYS_HAS_LABELS = "!hasLabels!";
+ private static final String MORE_KEYS_NEEDS_DIVIDERS = "!needsDividers!";
/** Background type that represents different key background visual than normal one. */
public final int mBackgroundType;
@@ -253,6 +255,9 @@ public class Key {
if (KeySpecParser.getBooleanValue(moreKeys, MORE_KEYS_HAS_LABELS)) {
moreKeysColumn |= MORE_KEYS_FLAGS_HAS_LABELS;
}
+ if (KeySpecParser.getBooleanValue(moreKeys, MORE_KEYS_NEEDS_DIVIDERS)) {
+ moreKeysColumn |= MORE_KEYS_FLAGS_NEEDS_DIVIDERS;
+ }
mMoreKeysColumnAndFlags = moreKeysColumn;
final String[] additionalMoreKeys = style.getStringArray(
@@ -539,6 +544,10 @@ public class Key {
return (mMoreKeysColumnAndFlags & MORE_KEYS_FLAGS_HAS_LABELS) != 0;
}
+ public boolean needsDividersInMoreKeys() {
+ return (mMoreKeysColumnAndFlags & MORE_KEYS_FLAGS_NEEDS_DIVIDERS) != 0;
+ }
+
public Drawable getIcon(KeyboardIconsSet iconSet) {
return iconSet.getIconDrawable(mIconId);
}
diff --git a/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java b/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java
index 89dad7be5..e7676c6ad 100644
--- a/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java
+++ b/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java
@@ -481,8 +481,11 @@ public class LatinKeyboardView extends KeyboardView implements PointerTracker.Ke
*/
protected boolean onLongPress(Key parentKey, PointerTracker tracker) {
final int primaryCode = parentKey.mCode;
- if (parentKey.mAltCode != Keyboard.CODE_UNSPECIFIED) {
- // Long press on a key that has altCode defined.
+ if (parentKey.mMoreKeys == null && !parentKey.altCodeWhileTyping()
+ && parentKey.mAltCode != Keyboard.CODE_UNSPECIFIED) {
+ // Long press on a key that has no more keys and not altCodeWhileTyping but altCode
+ // defined, such as "0 +" key on phone layout and "/ :" key on datetime
+ // layout.
tracker.onLongPressed();
invokeCodeInput(parentKey.mAltCode);
invokeReleaseKey(primaryCode);
diff --git a/java/src/com/android/inputmethod/keyboard/MoreKeysKeyboard.java b/java/src/com/android/inputmethod/keyboard/MoreKeysKeyboard.java
index abbdfddfe..9f735cff7 100644
--- a/java/src/com/android/inputmethod/keyboard/MoreKeysKeyboard.java
+++ b/java/src/com/android/inputmethod/keyboard/MoreKeysKeyboard.java
@@ -17,8 +17,10 @@
package com.android.inputmethod.keyboard;
import android.graphics.Paint;
+import android.graphics.drawable.Drawable;
import com.android.inputmethod.keyboard.internal.KeySpecParser;
+import com.android.inputmethod.keyboard.internal.KeyboardIconsSet;
import com.android.inputmethod.latin.R;
import com.android.inputmethod.latin.Utils;
@@ -36,8 +38,10 @@ public class MoreKeysKeyboard extends Keyboard {
public static class Builder extends Keyboard.Builder<Builder.MoreKeysKeyboardParams> {
private final Key mParentKey;
+ private final Drawable mDivider;
private static final float LABEL_PADDING_RATIO = 0.2f;
+ private static final float DIVIDER_RATIO = 0.2f;
public static class MoreKeysKeyboardParams extends Keyboard.Params {
public boolean mIsFixedOrder;
@@ -47,6 +51,8 @@ public class MoreKeysKeyboard extends Keyboard {
public int mTopKeys;
public int mLeftKeys;
public int mRightKeys; // includes default key.
+ public int mDividerWidth;
+ public int mColumnWidth;
public MoreKeysKeyboardParams() {
super();
@@ -62,9 +68,11 @@ public class MoreKeysKeyboard extends Keyboard {
* @param coordXInParent coordinate x of the key preview in parent keyboard.
* @param parentKeyboardWidth parent keyboard width in pixel.
* @param isFixedColumnOrder if true, more keys should be laid out in fixed order.
+ * @param dividerWidth width of divider, zero for no dividers.
*/
public void setParameters(int numKeys, int maxColumns, int keyWidth, int rowHeight,
- int coordXInParent, int parentKeyboardWidth, boolean isFixedColumnOrder) {
+ int coordXInParent, int parentKeyboardWidth, boolean isFixedColumnOrder,
+ int dividerWidth) {
mIsFixedOrder = isFixedColumnOrder;
if (parentKeyboardWidth / keyWidth < maxColumns) {
throw new IllegalArgumentException(
@@ -116,7 +124,9 @@ public class MoreKeysKeyboard extends Keyboard {
// Adjustment of the top row.
mTopRowAdjustment = mIsFixedOrder ? getFixedOrderTopRowAdjustment()
: getAutoOrderTopRowAdjustment();
- mBaseWidth = mOccupiedWidth = mNumColumns * mDefaultKeyWidth;
+ mDividerWidth = dividerWidth;
+ mColumnWidth = mDefaultKeyWidth + mDividerWidth;
+ mBaseWidth = mOccupiedWidth = mNumColumns * mColumnWidth - mDividerWidth;
// Need to subtract the bottom row's gutter only.
mBaseHeight = mOccupiedHeight = mNumRows * mDefaultRowHeight - mVerticalGap
+ mTopPadding + mBottomPadding;
@@ -214,13 +224,13 @@ public class MoreKeysKeyboard extends Keyboard {
}
public int getDefaultKeyCoordX() {
- return mLeftKeys * mDefaultKeyWidth;
+ return mLeftKeys * mColumnWidth;
}
public int getX(int n, int row) {
- final int x = getColumnPos(n) * mDefaultKeyWidth + getDefaultKeyCoordX();
+ final int x = getColumnPos(n) * mColumnWidth + getDefaultKeyCoordX();
if (isTopRow(row)) {
- return x + mTopRowAdjustment * (mDefaultKeyWidth / 2);
+ return x + mTopRowAdjustment * (mColumnWidth / 2);
}
return x;
}
@@ -267,9 +277,19 @@ public class MoreKeysKeyboard extends Keyboard {
width = getMaxKeyWidth(view, parentKey, mParams.mDefaultKeyWidth);
height = parentKeyboard.mMostCommonKeyHeight;
}
+ final int dividerWidth;
+ if (parentKey.needsDividersInMoreKeys()) {
+ mDivider = mResources.getDrawable(R.drawable.more_keys_divider);
+ // TODO: Drawable itself should have an alpha value.
+ mDivider.setAlpha(128);
+ dividerWidth = (int)(width * DIVIDER_RATIO);
+ } else {
+ mDivider = null;
+ dividerWidth = 0;
+ }
mParams.setParameters(parentKey.mMoreKeys.length, parentKey.getMoreKeysColumn(),
width, height, parentKey.mX + parentKey.mWidth / 2, view.getMeasuredWidth(),
- parentKey.isFixedColumnOrderMoreKeys());
+ parentKey.isFixedColumnOrderMoreKeys(), dividerWidth);
}
private static int getMaxKeyWidth(KeyboardView view, Key parentKey, int minKeyWidth) {
@@ -295,6 +315,21 @@ public class MoreKeysKeyboard extends Keyboard {
return maxWidth;
}
+ private static class MoreKeyDivider extends Key.Spacer {
+ private final Drawable mIcon;
+
+ public MoreKeyDivider(MoreKeysKeyboardParams params, Drawable icon, int x, int y) {
+ super(params, x, y, params.mDividerWidth, params.mDefaultRowHeight);
+ mIcon = icon;
+ }
+
+ @Override
+ public Drawable getIcon(KeyboardIconsSet iconSet) {
+ // KeyboardIconsSet is unused. Use the icon that has been passed to the constructor.
+ return mIcon;
+ }
+ }
+
@Override
public MoreKeysKeyboard build() {
final MoreKeysKeyboardParams params = mParams;
@@ -306,11 +341,22 @@ public class MoreKeysKeyboard extends Keyboard {
for (int n = 0; n < moreKeys.length; n++) {
final String moreKeySpec = moreKeys[n];
final int row = n / params.mNumColumns;
- final Key key = new Key(mResources, params, moreKeySpec, params.getX(n, row),
- params.getY(row), params.mDefaultKeyWidth, params.mDefaultRowHeight,
- moreKeyFlags);
+ final int x = params.getX(n, row);
+ final int y = params.getY(row);
+ final Key key = new Key(mResources, params, moreKeySpec, x, y,
+ params.mDefaultKeyWidth, params.mDefaultRowHeight, moreKeyFlags);
params.markAsEdgeKey(key, row);
params.onAddKey(key);
+
+ final int pos = params.getColumnPos(n);
+ // The "pos" value represents the offset from the default position. Negative means
+ // left of the default position.
+ if (params.mDividerWidth > 0 && pos != 0) {
+ final int dividerX = (pos > 0) ? x - params.mDividerWidth
+ : x + params.mDefaultKeyWidth;
+ final Key divider = new MoreKeyDivider(params, mDivider, dividerX, y);
+ params.onAddKey(divider);
+ }
}
return new MoreKeysKeyboard(params);
}
diff --git a/java/src/com/android/inputmethod/latin/suggestions/MoreSuggestions.java b/java/src/com/android/inputmethod/latin/suggestions/MoreSuggestions.java
index 0bd6abe09..cb1b49c67 100644
--- a/java/src/com/android/inputmethod/latin/suggestions/MoreSuggestions.java
+++ b/java/src/com/android/inputmethod/latin/suggestions/MoreSuggestions.java
@@ -34,7 +34,7 @@ import com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo;
public class MoreSuggestions extends Keyboard {
public static final int SUGGESTION_CODE_BASE = 1024;
- private MoreSuggestions(Builder.MoreSuggestionsParam params) {
+ MoreSuggestions(Builder.MoreSuggestionsParam params) {
super(params);
}
@@ -63,7 +63,7 @@ public class MoreSuggestions extends Keyboard {
paint.setAntiAlias(true);
final Resources res = view.getContext().getResources();
mDivider = res.getDrawable(R.drawable.more_suggestions_divider);
- // TODO: Drawable itself should has an alpha value.
+ // TODO: Drawable itself should have an alpha value.
mDivider.setAlpha(128);
mDividerWidth = mDivider.getIntrinsicWidth();
final int padding = (int) res.getDimension(