aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2012-03-12 16:30:59 +0900
committerTadashi G. Takaoka <takaoka@google.com>2012-03-12 17:45:57 +0900
commitb03529aa0119d38054fe825156669c45f7a6c8c3 (patch)
tree76dbbf54e79fcd308fd993a0989d294572335b61
parentb6895aec05dc7ae4326fc874d9e79f06f25d8d94 (diff)
downloadlatinime-b03529aa0119d38054fe825156669c45f7a6c8c3.tar.gz
latinime-b03529aa0119d38054fe825156669c45f7a6c8c3.tar.xz
latinime-b03529aa0119d38054fe825156669c45f7a6c8c3.zip
Support disableAdditionalMoreKeys and disableKeyLabelHint
Change-Id: Idfa586417acd4a223380d52f044e3a86eb780b21
-rw-r--r--java/res/values/attrs.xml4
-rw-r--r--java/res/xml-sw600dp/rowkeys_azerty1.xml53
-rw-r--r--java/res/xml-sw600dp/rowkeys_bulgarian1.xml59
-rw-r--r--java/res/xml-sw600dp/rowkeys_east_slavic1.xml59
-rw-r--r--java/res/xml-sw600dp/rowkeys_georgian1.xml111
-rw-r--r--java/res/xml-sw600dp/rowkeys_greek1.xml80
-rw-r--r--java/res/xml-sw600dp/rowkeys_qwerty1.xml51
-rw-r--r--java/res/xml-sw600dp/rowkeys_qwertz1.xml51
-rw-r--r--java/res/xml-sw600dp/rowkeys_south_slavic1.xml58
-rw-r--r--java/res/xml-sw600dp/rows_azerty.xml3
-rw-r--r--java/res/xml-sw600dp/rows_bulgarian.xml3
-rw-r--r--java/res/xml-sw600dp/rows_east_slavic.xml3
-rw-r--r--java/res/xml-sw600dp/rows_georgian.xml3
-rw-r--r--java/res/xml-sw600dp/rows_greek.xml3
-rw-r--r--java/res/xml-sw600dp/rows_nordic.xml3
-rw-r--r--java/res/xml-sw600dp/rows_qwerty.xml3
-rw-r--r--java/res/xml-sw600dp/rows_qwertz.xml3
-rw-r--r--java/res/xml-sw600dp/rows_south_slavic.xml3
-rw-r--r--java/res/xml-sw600dp/rows_spanish.xml3
-rw-r--r--java/res/xml-sw768dp/rows_azerty.xml3
-rw-r--r--java/res/xml-sw768dp/rows_bulgarian.xml3
-rw-r--r--java/res/xml-sw768dp/rows_east_slavic.xml3
-rw-r--r--java/res/xml-sw768dp/rows_georgian.xml3
-rw-r--r--java/res/xml-sw768dp/rows_greek.xml3
-rw-r--r--java/res/xml-sw768dp/rows_nordic.xml3
-rw-r--r--java/res/xml-sw768dp/rows_qwerty.xml3
-rw-r--r--java/res/xml-sw768dp/rows_qwertz.xml3
-rw-r--r--java/res/xml-sw768dp/rows_south_slavic.xml3
-rw-r--r--java/res/xml-sw768dp/rows_spanish.xml3
-rw-r--r--java/src/com/android/inputmethod/keyboard/Key.java22
-rw-r--r--java/src/com/android/inputmethod/keyboard/Keyboard.java22
31 files changed, 82 insertions, 548 deletions
diff --git a/java/res/values/attrs.xml b/java/res/values/attrs.xml
index 5720a9a6a..d47858d2e 100644
--- a/java/res/values/attrs.xml
+++ b/java/res/values/attrs.xml
@@ -281,6 +281,10 @@
<flag name="shiftedLetterActivated" value="0x10000" />
<!-- If true, use EditorInfo.actionLabel for the key label. -->
<flag name="fromCustomActionLabel" value="0x20000" />
+ <!-- If true, disable keyHintLabel. -->
+ <flag name="disableKeyHintLabel" value="0x40000000" />
+ <!-- If true, disable additionalMoreKeys. -->
+ <flag name="disableAdditionalMoreKeys" value="0x80000000" />
</attr>
<!-- The icon to display on the key instead of the label. -->
<attr name="keyIcon" format="enum">
diff --git a/java/res/xml-sw600dp/rowkeys_azerty1.xml b/java/res/xml-sw600dp/rowkeys_azerty1.xml
deleted file mode 100644
index ef35f25ce..000000000
--- a/java/res/xml-sw600dp/rowkeys_azerty1.xml
+++ /dev/null
@@ -1,53 +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="a"
- latin:moreKeys="@string/more_keys_for_a" />
- <Key
- latin:keyLabel="z"
- latin:moreKeys="@string/more_keys_for_z" />
- <Key
- latin:keyLabel="e"
- latin:moreKeys="@string/more_keys_for_e" />
- <Key
- latin:keyLabel="r"
- latin:moreKeys="@string/more_keys_for_r" />
- <Key
- latin:keyLabel="t"
- latin:moreKeys="@string/more_keys_for_t" />
- <Key
- latin:keyLabel="y"
- latin:moreKeys="@string/more_keys_for_y" />
- <Key
- latin:keyLabel="u"
- latin:moreKeys="@string/more_keys_for_u" />
- <Key
- latin:keyLabel="i"
- latin:moreKeys="@string/more_keys_for_i" />
- <Key
- latin:keyLabel="o"
- latin:moreKeys="@string/more_keys_for_o" />
- <Key
- latin:keyLabel="p" />
-</merge>
diff --git a/java/res/xml-sw600dp/rowkeys_bulgarian1.xml b/java/res/xml-sw600dp/rowkeys_bulgarian1.xml
deleted file mode 100644
index 3e1b2e5cc..000000000
--- a/java/res/xml-sw600dp/rowkeys_bulgarian1.xml
+++ /dev/null
@@ -1,59 +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"
->
- <!-- U+0447: "ч" CYRILLIC SMALL LETTER CHE -->
- <Key
- latin:keyLabel="&#x0447;" />
- <!-- U+0448: "ш" CYRILLIC SMALL LETTER SHA -->
- <Key
- latin:keyLabel="&#x0448;" />
- <!-- U+0435: "е" CYRILLIC SMALL LETTER IE -->
- <Key
- latin:keyLabel="&#x0435;" />
- <!-- U+0440: "р" CYRILLIC SMALL LETTER ER -->
- <Key
- latin:keyLabel="&#x0440;" />
- <!-- U+0442: "т" CYRILLIC SMALL LETTER TE -->
- <Key
- latin:keyLabel="&#x0442;" />
- <!-- U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN -->
- <Key
- latin:keyLabel="&#x044A;" />
- <!-- U+0443: "у" CYRILLIC SMALL LETTER U -->
- <Key
- latin:keyLabel="&#x0443;" />
- <!-- U+0438: "и" CYRILLIC SMALL LETTER I
- U+045D: "ѝ" CYRILLIC SMALL LETTER I WITH GRAVE -->
- <Key
- latin:keyLabel="&#x0438;"
- latin:moreKeys="&#x045D;" />
- <!-- U+043E: "о" CYRILLIC SMALL LETTER O -->
- <Key
- latin:keyLabel="&#x043E;" />
- <!-- U+043F: "п" CYRILLIC SMALL LETTER PE -->
- <Key
- latin:keyLabel="&#x043F;" />
- <!-- U+044F: "я" CYRILLIC SMALL LETTER YA -->
- <Key
- latin:keyLabel="&#x044F;" />
-</merge>
diff --git a/java/res/xml-sw600dp/rowkeys_east_slavic1.xml b/java/res/xml-sw600dp/rowkeys_east_slavic1.xml
deleted file mode 100644
index 6ceb97017..000000000
--- a/java/res/xml-sw600dp/rowkeys_east_slavic1.xml
+++ /dev/null
@@ -1,59 +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"
->
- <!-- U+0439: "й" CYRILLIC SMALL LETTER SHORT I -->
- <Key
- latin:keyLabel="&#x0439;" />
- <!-- U+0446: "ц" CYRILLIC SMALL LETTER TSE -->
- <Key
- latin:keyLabel="&#x0446;" />
- <!-- U+0443: "у" CYRILLIC SMALL LETTER U -->
- <Key
- latin:keyLabel="&#x0443;"
- 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_cyrillic_ye" />
- <!-- U+043D: "н" CYRILLIC SMALL LETTER EN -->
- <Key
- latin:keyLabel="&#x043D;"
- latin:moreKeys="@string/more_keys_for_cyrillic_en" />
- <!-- U+0433: "г" CYRILLIC SMALL LETTER GHE -->
- <Key
- latin:keyLabel="&#x0433;" />
- <!-- U+0448: "ш" CYRILLIC SMALL LETTER SHA -->
- <Key
- latin:keyLabel="&#x0448;" />
- <Key
- latin:keyLabel="@string/keylabel_for_cyrillic_shcha" />
- <!-- U+0437: "з" CYRILLIC SMALL LETTER ZE -->
- <Key
- latin:keyLabel="&#x0437;" />
- <!-- U+0445: "х" CYRILLIC SMALL LETTER HA -->
- <Key
- latin:keyLabel="&#x0445;" />
-</merge>
diff --git a/java/res/xml-sw600dp/rowkeys_georgian1.xml b/java/res/xml-sw600dp/rowkeys_georgian1.xml
deleted file mode 100644
index 86ce6a118..000000000
--- a/java/res/xml-sw600dp/rowkeys_georgian1.xml
+++ /dev/null
@@ -1,111 +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:keyboardSetElement="alphabetManualShifted|alphabetShiftLockShifted"
- >
- <Key
- latin:keyLabel="Q"
- latin:keyLabelFlags="preserveCase" />
- <!-- U+10ED: "ჭ" GEORGIAN LETTER CHAR -->
- <Key
- latin:keyLabel="&#x10ED;"
- latin:keyLabelFlags="preserveCase" />
- <Key
- latin:keyLabel="E"
- latin:keyLabelFlags="preserveCase" />
- <!-- U+10E6: "ღ" GEORGIAN LETTER GHAN -->
- <Key
- latin:keyLabel="&#x10E6;"
- latin:keyLabelFlags="preserveCase" />
- <!-- U+10D7: "თ" GEORGIAN LETTER TAN -->
- <Key
- latin:keyLabel="&#x10D7;"
- latin:keyLabelFlags="preserveCase" />
- <Key
- latin:keyLabel="Y"
- latin:keyLabelFlags="preserveCase" />
- <Key
- latin:keyLabel="U"
- latin:keyLabelFlags="preserveCase" />
- <Key
- latin:keyLabel="I"
- latin:keyLabelFlags="preserveCase" />
- <Key
- latin:keyLabel="O"
- latin:keyLabelFlags="preserveCase" />
- <Key
- latin:keyLabel="P"
- latin:keyLabelFlags="preserveCase" />
- </case>
- <default>
- <!-- U+10E5: "ქ" GEORGIAN LETTER GHAN -->
- <Key
- latin:keyLabel="&#x10E5;"
- latin:keyLabelFlags="preserveCase" />
- <!-- U+10EC: "წ" GEORGIAN LETTER CIL -->
- <Key
- latin:keyLabel="&#x10EC;"
- latin:keyLabelFlags="preserveCase" />
- <!-- U+10D4: "ე" GEORGIAN LETTER EN
- U+10F1: "ჱ" GEORGIAN LETTER HE -->
- <Key
- latin:keyLabel="&#x10D4;"
- latin:moreKeys="&#x10F1;"
- latin:keyLabelFlags="preserveCase" />
- <!-- U+10E0: "რ" GEORGIAN LETTER RAE -->
- <Key
- latin:keyLabel="&#x10E0;"
- latin:keyLabelFlags="preserveCase" />
- <!-- U+10E2: "ტ" GEORGIAN LETTER TAR -->
- <Key
- latin:keyLabel="&#x10E2;"
- latin:keyLabelFlags="preserveCase" />
- <!-- U+10E7: "ყ" GEORGIAN LETTER QAR
- U+10F8: "ჸ" GEORGIAN LETTER ELIFI -->
- <Key
- latin:keyLabel="&#x10E7;"
- latin:moreKeys="&#x10F8;"
- latin:keyLabelFlags="preserveCase" />
- <!-- U+10E3: "უ" GEORGIAN LETTER UN -->
- <Key
- latin:keyLabel="&#x10E3;"
- latin:keyLabelFlags="preserveCase" />
- <!-- U+10D8: "ი" GEORGIAN LETTER IN
- U+10F2: "ჲ" GEORGIAN LETTER HIE -->
- <Key
- latin:keyLabel="&#x10D8;"
- latin:moreKeys="&#x10F2;"
- latin:keyLabelFlags="preserveCase" />
- <!-- U+10DD: "ო" GEORGIAN LETTER ON -->
- <Key
- latin:keyLabel="&#x10DD;"
- latin:keyLabelFlags="preserveCase" />
- <!-- U+10DE: "პ" GEORGIAN LETTER PAR -->
- <Key
- latin:keyLabel="&#x10DE;"
- latin:keyLabelFlags="preserveCase" />
- </default>
- </switch>
-</merge>
diff --git a/java/res/xml-sw600dp/rowkeys_greek1.xml b/java/res/xml-sw600dp/rowkeys_greek1.xml
deleted file mode 100644
index 4eb7732f7..000000000
--- a/java/res/xml-sw600dp/rowkeys_greek1.xml
+++ /dev/null
@@ -1,80 +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"
->
- <!-- 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;" />
-</merge>
diff --git a/java/res/xml-sw600dp/rowkeys_qwerty1.xml b/java/res/xml-sw600dp/rowkeys_qwerty1.xml
deleted file mode 100644
index 05101ec42..000000000
--- a/java/res/xml-sw600dp/rowkeys_qwerty1.xml
+++ /dev/null
@@ -1,51 +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="q" />
- <Key
- latin:keyLabel="w" />
- <Key
- latin:keyLabel="e"
- latin:moreKeys="@string/more_keys_for_e" />
- <Key
- latin:keyLabel="r"
- latin:moreKeys="@string/more_keys_for_r" />
- <Key
- latin:keyLabel="t"
- latin:moreKeys="@string/more_keys_for_t" />
- <Key
- latin:keyLabel="y"
- latin:moreKeys="@string/more_keys_for_y" />
- <Key
- latin:keyLabel="u"
- latin:moreKeys="@string/more_keys_for_u" />
- <Key
- latin:keyLabel="i"
- latin:moreKeys="@string/more_keys_for_i" />
- <Key
- latin:keyLabel="o"
- latin:moreKeys="@string/more_keys_for_o" />
- <Key
- latin:keyLabel="p" />
-</merge>
diff --git a/java/res/xml-sw600dp/rowkeys_qwertz1.xml b/java/res/xml-sw600dp/rowkeys_qwertz1.xml
deleted file mode 100644
index d7461e645..000000000
--- a/java/res/xml-sw600dp/rowkeys_qwertz1.xml
+++ /dev/null
@@ -1,51 +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="q" />
- <Key
- latin:keyLabel="w" />
- <Key
- latin:keyLabel="e"
- latin:moreKeys="@string/more_keys_for_e" />
- <Key
- latin:keyLabel="r"
- latin:moreKeys="@string/more_keys_for_r" />
- <Key
- latin:keyLabel="t"
- latin:moreKeys="@string/more_keys_for_t" />
- <Key
- latin:keyLabel="z"
- latin:moreKeys="@string/more_keys_for_z" />
- <Key
- latin:keyLabel="u"
- latin:moreKeys="@string/more_keys_for_u" />
- <Key
- latin:keyLabel="i"
- latin:moreKeys="@string/more_keys_for_i" />
- <Key
- latin:keyLabel="o"
- latin:moreKeys="@string/more_keys_for_o" />
- <Key
- latin:keyLabel="p" />
-</merge>
diff --git a/java/res/xml-sw600dp/rowkeys_south_slavic1.xml b/java/res/xml-sw600dp/rowkeys_south_slavic1.xml
deleted file mode 100644
index aa0d5bbe3..000000000
--- a/java/res/xml-sw600dp/rowkeys_south_slavic1.xml
+++ /dev/null
@@ -1,58 +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"
->
- <!-- U+0459: "љ" CYRILLIC SMALL LETTER LJE -->
- <Key
- latin:keyLabel="&#x0459;" />
- <!-- U+045A: "њ" CYRILLIC SMALL LETTER NJE -->
- <Key
- latin:keyLabel="&#x045A;" />
- <!-- U+0435: "е" CYRILLIC SMALL LETTER IE -->
- <Key
- 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;" />
- <Key
- 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:moreKeys="@string/more_keys_for_cyrillic_i" />
- <!-- U+043E: "о" CYRILLIC SMALL LETTER O -->
- <Key
- latin:keyLabel="&#x043E;" />
- <!-- U+043F: "п" CYRILLIC SMALL LETTER PE -->
- <Key
- latin:keyLabel="&#x043F;" />
- <!-- U+0448: "ш" CYRILLIC SMALL LETTER SHA -->
- <Key
- latin:keyLabel="&#x0448;" />
-</merge>
diff --git a/java/res/xml-sw600dp/rows_azerty.xml b/java/res/xml-sw600dp/rows_azerty.xml
index e09d8f824..2a5690090 100644
--- a/java/res/xml-sw600dp/rows_azerty.xml
+++ b/java/res/xml-sw600dp/rows_azerty.xml
@@ -27,7 +27,8 @@
latin:keyWidth="8.5%p"
>
<include
- latin:keyboardLayout="@xml/rowkeys_azerty1" />
+ latin:keyboardLayout="@xml/rowkeys_azerty1"
+ latin:keyLabelFlags="disableAdditionalMoreKeys|disableKeyHintLabel" />
<Key
latin:keyStyle="deleteKeyStyle"
latin:keyXPos="-10.0%p"
diff --git a/java/res/xml-sw600dp/rows_bulgarian.xml b/java/res/xml-sw600dp/rows_bulgarian.xml
index 054b4500e..cabd1e6f4 100644
--- a/java/res/xml-sw600dp/rows_bulgarian.xml
+++ b/java/res/xml-sw600dp/rows_bulgarian.xml
@@ -27,7 +27,8 @@
latin:keyWidth="7.692%p"
>
<include
- latin:keyboardLayout="@xml/rowkeys_bulgarian1" />
+ latin:keyboardLayout="@xml/rowkeys_bulgarian1"
+ latin:keyLabelFlags="disableAdditionalMoreKeys|disableKeyHintLabel" />
<Key
latin:keyStyle="deleteKeyStyle"
latin:keyWidth="fillBoth" />
diff --git a/java/res/xml-sw600dp/rows_east_slavic.xml b/java/res/xml-sw600dp/rows_east_slavic.xml
index 71f049923..549da417b 100644
--- a/java/res/xml-sw600dp/rows_east_slavic.xml
+++ b/java/res/xml-sw600dp/rows_east_slavic.xml
@@ -27,7 +27,8 @@
latin:keyWidth="7.60%p"
>
<include
- latin:keyboardLayout="@xml/rowkeys_east_slavic1" />
+ latin:keyboardLayout="@xml/rowkeys_east_slavic1"
+ latin:keyLabelFlags="disableAdditionalMoreKeys|disableKeyHintLabel" />
<!-- U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN -->
<Key
latin:keyLabel="&#x044A;" />
diff --git a/java/res/xml-sw600dp/rows_georgian.xml b/java/res/xml-sw600dp/rows_georgian.xml
index fe778e294..e8f974781 100644
--- a/java/res/xml-sw600dp/rows_georgian.xml
+++ b/java/res/xml-sw600dp/rows_georgian.xml
@@ -27,7 +27,8 @@
latin:keyWidth="9.0%p"
>
<include
- latin:keyboardLayout="@xml/rowkeys_georgian1" />
+ latin:keyboardLayout="@xml/rowkeys_georgian1"
+ latin:keyLabelFlags="disableAdditionalMoreKeys|disableKeyHintLabel" />
<Key
latin:keyStyle="deleteKeyStyle"
latin:keyXPos="-10.0%p"
diff --git a/java/res/xml-sw600dp/rows_greek.xml b/java/res/xml-sw600dp/rows_greek.xml
index 293451b31..66f6247a3 100644
--- a/java/res/xml-sw600dp/rows_greek.xml
+++ b/java/res/xml-sw600dp/rows_greek.xml
@@ -29,7 +29,8 @@
<include
latin:keyboardLayout="@xml/key_greek_semicolon" />
<include
- latin:keyboardLayout="@xml/rowkeys_greek1" />
+ latin:keyboardLayout="@xml/rowkeys_greek1"
+ latin:keyLabelFlags="disableAdditionalMoreKeys|disableKeyHintLabel" />
<Key
latin:keyStyle="deleteKeyStyle"
latin:keyXPos="-10.0%p"
diff --git a/java/res/xml-sw600dp/rows_nordic.xml b/java/res/xml-sw600dp/rows_nordic.xml
index 5c744582c..48a3048f4 100644
--- a/java/res/xml-sw600dp/rows_nordic.xml
+++ b/java/res/xml-sw600dp/rows_nordic.xml
@@ -27,7 +27,8 @@
latin:keyWidth="7.9%p"
>
<include
- latin:keyboardLayout="@xml/rowkeys_nordic1" />
+ latin:keyboardLayout="@xml/rowkeys_nordic1"
+ latin:keyLabelFlags="disableAdditionalMoreKeys|disableKeyHintLabel" />
<Key
latin:keyStyle="deleteKeyStyle"
latin:keyXPos="-10.0%p"
diff --git a/java/res/xml-sw600dp/rows_qwerty.xml b/java/res/xml-sw600dp/rows_qwerty.xml
index 8df41acc7..49ea58d9b 100644
--- a/java/res/xml-sw600dp/rows_qwerty.xml
+++ b/java/res/xml-sw600dp/rows_qwerty.xml
@@ -27,7 +27,8 @@
latin:keyWidth="9.0%p"
>
<include
- latin:keyboardLayout="@xml/rowkeys_qwerty1" />
+ latin:keyboardLayout="@xml/rowkeys_qwerty1"
+ latin:keyLabelFlags="disableAdditionalMoreKeys|disableKeyHintLabel" />
<Key
latin:keyStyle="deleteKeyStyle"
latin:keyXPos="-10.0%p"
diff --git a/java/res/xml-sw600dp/rows_qwertz.xml b/java/res/xml-sw600dp/rows_qwertz.xml
index e97bee967..a244bf291 100644
--- a/java/res/xml-sw600dp/rows_qwertz.xml
+++ b/java/res/xml-sw600dp/rows_qwertz.xml
@@ -27,7 +27,8 @@
latin:keyWidth="9.0%p"
>
<include
- latin:keyboardLayout="@xml/rowkeys_qwertz1" />
+ latin:keyboardLayout="@xml/rowkeys_qwertz1"
+ latin:keyLabelFlags="disableAdditionalMoreKeys|disableKeyHintLabel" />
<Key
latin:keyStyle="deleteKeyStyle"
latin:keyXPos="-10.0%p"
diff --git a/java/res/xml-sw600dp/rows_south_slavic.xml b/java/res/xml-sw600dp/rows_south_slavic.xml
index 9b79a3683..8f0f38ab6 100644
--- a/java/res/xml-sw600dp/rows_south_slavic.xml
+++ b/java/res/xml-sw600dp/rows_south_slavic.xml
@@ -27,7 +27,8 @@
latin:keyWidth="8.0%p"
>
<include
- latin:keyboardLayout="@xml/rowkeys_south_slavic1" />
+ latin:keyboardLayout="@xml/rowkeys_south_slavic1"
+ latin:keyLabelFlags="disableAdditionalMoreKeys|disableKeyHintLabel" />
<Key
latin:keyStyle="deleteKeyStyle"
latin:keyXPos="-10.0%p"
diff --git a/java/res/xml-sw600dp/rows_spanish.xml b/java/res/xml-sw600dp/rows_spanish.xml
index a8f5524c2..bb706cbc2 100644
--- a/java/res/xml-sw600dp/rows_spanish.xml
+++ b/java/res/xml-sw600dp/rows_spanish.xml
@@ -27,7 +27,8 @@
latin:keyWidth="9.0%p"
>
<include
- latin:keyboardLayout="@xml/rowkeys_qwerty1" />
+ latin:keyboardLayout="@xml/rowkeys_qwerty1"
+ latin:keyLabelFlags="disableAdditionalMoreKeys|disableKeyHintLabel" />
<Key
latin:keyStyle="deleteKeyStyle"
latin:keyXPos="-10.0%p"
diff --git a/java/res/xml-sw768dp/rows_azerty.xml b/java/res/xml-sw768dp/rows_azerty.xml
index e79ca65ad..3637ce7d4 100644
--- a/java/res/xml-sw768dp/rows_azerty.xml
+++ b/java/res/xml-sw768dp/rows_azerty.xml
@@ -31,7 +31,8 @@
latin:keyLabelFlags="alignLeft"
latin:keyWidth="7.969%p" />
<include
- latin:keyboardLayout="@xml/rowkeys_azerty1" />
+ latin:keyboardLayout="@xml/rowkeys_azerty1"
+ latin:keyLabelFlags="disableAdditionalMoreKeys|disableKeyHintLabel" />
<Key
latin:keyStyle="deleteKeyStyle"
latin:keyXPos="-9.219%p"
diff --git a/java/res/xml-sw768dp/rows_bulgarian.xml b/java/res/xml-sw768dp/rows_bulgarian.xml
index 7fac3edbd..5f59f7087 100644
--- a/java/res/xml-sw768dp/rows_bulgarian.xml
+++ b/java/res/xml-sw768dp/rows_bulgarian.xml
@@ -30,7 +30,8 @@
latin:keyStyle="tabKeyStyle"
latin:keyLabelFlags="alignLeft" />
<include
- latin:keyboardLayout="@xml/rowkeys_bulgarian1" />
+ latin:keyboardLayout="@xml/rowkeys_bulgarian1"
+ latin:keyLabelFlags="disableAdditionalMoreKeys|disableKeyHintLabel" />
<Key
latin:keyStyle="deleteKeyStyle"
latin:keyWidth="fillBoth" />
diff --git a/java/res/xml-sw768dp/rows_east_slavic.xml b/java/res/xml-sw768dp/rows_east_slavic.xml
index c041d0cd6..ba57b75c4 100644
--- a/java/res/xml-sw768dp/rows_east_slavic.xml
+++ b/java/res/xml-sw768dp/rows_east_slavic.xml
@@ -30,7 +30,8 @@
latin:keyStyle="tabKeyStyle"
latin:keyLabelFlags="alignLeft" />
<include
- latin:keyboardLayout="@xml/rowkeys_east_slavic1" />
+ latin:keyboardLayout="@xml/rowkeys_east_slavic1"
+ latin:keyLabelFlags="disableAdditionalMoreKeys|disableKeyHintLabel" />
<!-- U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN -->
<Key
latin:keyLabel="&#x044A;" />
diff --git a/java/res/xml-sw768dp/rows_georgian.xml b/java/res/xml-sw768dp/rows_georgian.xml
index d315523c3..0471e8f1c 100644
--- a/java/res/xml-sw768dp/rows_georgian.xml
+++ b/java/res/xml-sw768dp/rows_georgian.xml
@@ -31,7 +31,8 @@
latin:keyLabelFlags="alignLeft"
latin:keyWidth="7.969%p" />
<include
- latin:keyboardLayout="@xml/rowkeys_georgian1" />
+ latin:keyboardLayout="@xml/rowkeys_georgian1"
+ latin:keyLabelFlags="disableAdditionalMoreKeys|disableKeyHintLabel" />
<Key
latin:keyStyle="deleteKeyStyle"
latin:keyXPos="-9.219%p"
diff --git a/java/res/xml-sw768dp/rows_greek.xml b/java/res/xml-sw768dp/rows_greek.xml
index 4e399aaf8..983abe14c 100644
--- a/java/res/xml-sw768dp/rows_greek.xml
+++ b/java/res/xml-sw768dp/rows_greek.xml
@@ -33,7 +33,8 @@
<include
latin:keyboardLayout="@xml/key_greek_semicolon" />
<include
- latin:keyboardLayout="@xml/rowkeys_greek1" />
+ latin:keyboardLayout="@xml/rowkeys_greek1"
+ latin:keyLabelFlags="disableAdditionalMoreKeys|disableKeyHintLabel" />
</Row>
<Row
latin:keyWidth="8.125%p"
diff --git a/java/res/xml-sw768dp/rows_nordic.xml b/java/res/xml-sw768dp/rows_nordic.xml
index d17449a81..348972469 100644
--- a/java/res/xml-sw768dp/rows_nordic.xml
+++ b/java/res/xml-sw768dp/rows_nordic.xml
@@ -31,7 +31,8 @@
latin:keyLabelFlags="alignLeft"
latin:keyWidth="7.500%p" />
<include
- latin:keyboardLayout="@xml/rowkeys_nordic1" />
+ latin:keyboardLayout="@xml/rowkeys_nordic1"
+ latin:keyLabelFlags="disableAdditionalMoreKeys|disableKeyHintLabel" />
<Key
latin:keyStyle="deleteKeyStyle"
latin:keyXPos="-11.500%p"
diff --git a/java/res/xml-sw768dp/rows_qwerty.xml b/java/res/xml-sw768dp/rows_qwerty.xml
index ea2bb362f..8f0b762c5 100644
--- a/java/res/xml-sw768dp/rows_qwerty.xml
+++ b/java/res/xml-sw768dp/rows_qwerty.xml
@@ -31,7 +31,8 @@
latin:keyLabelFlags="alignLeft"
latin:keyWidth="7.969%p" />
<include
- latin:keyboardLayout="@xml/rowkeys_qwerty1" />
+ latin:keyboardLayout="@xml/rowkeys_qwerty1"
+ latin:keyLabelFlags="disableAdditionalMoreKeys|disableKeyHintLabel" />
<Key
latin:keyStyle="deleteKeyStyle"
latin:keyXPos="-9.219%p"
diff --git a/java/res/xml-sw768dp/rows_qwertz.xml b/java/res/xml-sw768dp/rows_qwertz.xml
index 790ac189c..e3d1c61f0 100644
--- a/java/res/xml-sw768dp/rows_qwertz.xml
+++ b/java/res/xml-sw768dp/rows_qwertz.xml
@@ -31,7 +31,8 @@
latin:keyLabelFlags="alignLeft"
latin:keyWidth="7.969%p" />
<include
- latin:keyboardLayout="@xml/rowkeys_qwertz1" />
+ latin:keyboardLayout="@xml/rowkeys_qwertz1"
+ latin:keyLabelFlags="disableAdditionalMoreKeys|disableKeyHintLabel" />
<Key
latin:keyStyle="deleteKeyStyle"
latin:keyXPos="-9.219%p"
diff --git a/java/res/xml-sw768dp/rows_south_slavic.xml b/java/res/xml-sw768dp/rows_south_slavic.xml
index 8a74e3f0e..0de8ff84c 100644
--- a/java/res/xml-sw768dp/rows_south_slavic.xml
+++ b/java/res/xml-sw768dp/rows_south_slavic.xml
@@ -30,7 +30,8 @@
latin:keyStyle="tabKeyStyle"
latin:keyLabelFlags="alignLeft" />
<include
- latin:keyboardLayout="@xml/rowkeys_south_slavic1" />
+ latin:keyboardLayout="@xml/rowkeys_south_slavic1"
+ latin:keyLabelFlags="disableAdditionalMoreKeys|disableKeyHintLabel" />
<Key
latin:keyStyle="deleteKeyStyle"
latin:keyXPos="-9.219%p"
diff --git a/java/res/xml-sw768dp/rows_spanish.xml b/java/res/xml-sw768dp/rows_spanish.xml
index 683472cf4..e4690f396 100644
--- a/java/res/xml-sw768dp/rows_spanish.xml
+++ b/java/res/xml-sw768dp/rows_spanish.xml
@@ -31,7 +31,8 @@
latin:keyLabelFlags="alignLeft"
latin:keyWidth="7.969%p" />
<include
- latin:keyboardLayout="@xml/rowkeys_qwerty1" />
+ latin:keyboardLayout="@xml/rowkeys_qwerty1"
+ latin:keyLabelFlags="disableAdditionalMoreKeys|disableKeyHintLabel" />
<Key
latin:keyStyle="deleteKeyStyle"
latin:keyXPos="-9.219%p"
diff --git a/java/src/com/android/inputmethod/keyboard/Key.java b/java/src/com/android/inputmethod/keyboard/Key.java
index 6b4de184f..b09a27540 100644
--- a/java/src/com/android/inputmethod/keyboard/Key.java
+++ b/java/src/com/android/inputmethod/keyboard/Key.java
@@ -73,6 +73,8 @@ public class Key {
private static final int LABEL_FLAGS_PRESERVE_CASE = 0x8000;
private static final int LABEL_FLAGS_SHIFTED_LETTER_ACTIVATED = 0x10000;
private static final int LABEL_FLAGS_FROM_CUSTOM_ACTION_LABEL = 0x20000;
+ private static final int LABEL_FLAGS_DISABLE_HINT_LABEL = 0x40000000;
+ private static final int LABEL_FLAGS_DISABLE_ADDITIONAL_MORE_KEYS = 0x80000000;
/** Icon to display instead of a label. Icon takes precedence over a label */
private final int mIconId;
@@ -240,7 +242,8 @@ public class Key {
mDisabledIconId = style.getInt(keyAttr,
R.styleable.Keyboard_Key_keyIconDisabled, KeyboardIconsSet.ICON_UNDEFINED);
- mLabelFlags = style.getFlag(keyAttr, R.styleable.Keyboard_Key_keyLabelFlags);
+ mLabelFlags = style.getFlag(keyAttr, R.styleable.Keyboard_Key_keyLabelFlags)
+ | row.getDefaultKeyLabelFlags();
final boolean preserveCase = (mLabelFlags & LABEL_FLAGS_PRESERVE_CASE) != 0;
int actionFlags = style.getFlag(keyAttr, R.styleable.Keyboard_Key_keyActionFlags);
String[] moreKeys = style.getStringArray(keyAttr, R.styleable.Keyboard_Key_moreKeys);
@@ -265,8 +268,13 @@ public class Key {
}
mMoreKeysColumnAndFlags = moreKeysColumn;
- final String[] additionalMoreKeys = style.getStringArray(
- keyAttr, R.styleable.Keyboard_Key_additionalMoreKeys);
+ final String[] additionalMoreKeys;
+ if ((mLabelFlags & LABEL_FLAGS_DISABLE_ADDITIONAL_MORE_KEYS) != 0) {
+ additionalMoreKeys = null;
+ } else {
+ additionalMoreKeys = style.getStringArray(
+ keyAttr, R.styleable.Keyboard_Key_additionalMoreKeys);
+ }
moreKeys = KeySpecParser.insertAddtionalMoreKeys(moreKeys, additionalMoreKeys);
if (moreKeys != null) {
actionFlags |= ACTION_FLAGS_ENABLE_LONG_PRESS;
@@ -284,8 +292,12 @@ public class Key {
mLabel = adjustCaseOfStringForKeyboardId(style.getString(
keyAttr, R.styleable.Keyboard_Key_keyLabel), preserveCase, params.mId);
}
- mHintLabel = adjustCaseOfStringForKeyboardId(style.getString(
- keyAttr, R.styleable.Keyboard_Key_keyHintLabel), preserveCase, params.mId);
+ if ((mLabelFlags & LABEL_FLAGS_DISABLE_HINT_LABEL) != 0) {
+ mHintLabel = null;
+ } else {
+ mHintLabel = adjustCaseOfStringForKeyboardId(style.getString(
+ keyAttr, R.styleable.Keyboard_Key_keyHintLabel), preserveCase, params.mId);
+ }
String outputText = adjustCaseOfStringForKeyboardId(style.getString(
keyAttr, R.styleable.Keyboard_Key_keyOutputText), preserveCase, params.mId);
final int code = style.getInt(
diff --git a/java/src/com/android/inputmethod/keyboard/Keyboard.java b/java/src/com/android/inputmethod/keyboard/Keyboard.java
index 689e322ce..53467122a 100644
--- a/java/src/com/android/inputmethod/keyboard/Keyboard.java
+++ b/java/src/com/android/inputmethod/keyboard/Keyboard.java
@@ -505,6 +505,8 @@ public class Keyboard {
private float mDefaultKeyWidth;
/** Default height of a key in this row. */
public final int mRowHeight;
+ /** Default keyLabelFlags in this row. */
+ private int mDefaultKeyLabelFlags;
private final int mCurrentY;
// Will be updated by {@link Key}'s constructor.
@@ -525,6 +527,7 @@ public class Keyboard {
params.mBaseWidth, params.mDefaultKeyWidth);
keyAttr.recycle();
+ mDefaultKeyLabelFlags = 0;
mCurrentY = y;
mCurrentX = 0.0f;
}
@@ -537,6 +540,14 @@ public class Keyboard {
mDefaultKeyWidth = defaultKeyWidth;
}
+ public int getDefaultKeyLabelFlags() {
+ return mDefaultKeyLabelFlags;
+ }
+
+ public void setDefaultKeyLabelFlags(int keyLabelFlags) {
+ mDefaultKeyLabelFlags = keyLabelFlags;
+ }
+
public void setXPos(float keyXPos) {
mCurrentX = keyXPos;
}
@@ -927,6 +938,7 @@ public class Keyboard {
R.styleable.Keyboard_Key);
int keyboardLayout = 0;
float savedDefaultKeyWidth = 0;
+ int savedDefaultKeyLabelFlags = 0;
try {
XmlParseUtils.checkAttributeExists(keyboardAttr,
R.styleable.Keyboard_Include_keyboardLayout, "keyboardLayout",
@@ -935,6 +947,7 @@ public class Keyboard {
R.styleable.Keyboard_Include_keyboardLayout, 0);
if (row != null) {
savedDefaultKeyWidth = row.getDefaultKeyWidth();
+ savedDefaultKeyLabelFlags = row.getDefaultKeyLabelFlags();
if (keyAttr.hasValue(R.styleable.Keyboard_Key_keyXPos)) {
// Override current x coordinate.
row.setXPos(row.getKeyX(keyAttr));
@@ -943,6 +956,12 @@ public class Keyboard {
// Override default key width.
row.setDefaultKeyWidth(row.getKeyWidth(keyAttr));
}
+ if (keyAttr.hasValue(R.styleable.Keyboard_Key_keyLabelFlags)) {
+ // Override default key label flags.
+ row.setDefaultKeyLabelFlags(
+ keyAttr.getInt(R.styleable.Keyboard_Key_keyLabelFlags, 0)
+ | savedDefaultKeyLabelFlags);
+ }
}
} finally {
keyboardAttr.recycle();
@@ -959,8 +978,9 @@ public class Keyboard {
parseMerge(parserForInclude, row, skip);
} finally {
if (row != null) {
- // Restore default key width.
+ // Restore default key width and key label flags.
row.setDefaultKeyWidth(savedDefaultKeyWidth);
+ row.setDefaultKeyLabelFlags(savedDefaultKeyLabelFlags);
}
parserForInclude.close();
}