Support disableAdditionalMoreKeys and disableKeyLabelHint
Change-Id: Idfa586417acd4a223380d52f044e3a86eb780b21
diff --git a/java/res/values/attrs.xml b/java/res/values/attrs.xml
index 5720a9a..d47858d 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 ef35f25..0000000
--- 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 3e1b2e5..0000000
--- 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="ч" />
- <!-- U+0448: "ш" CYRILLIC SMALL LETTER SHA -->
- <Key
- latin:keyLabel="ш" />
- <!-- U+0435: "е" CYRILLIC SMALL LETTER IE -->
- <Key
- latin:keyLabel="е" />
- <!-- U+0440: "р" CYRILLIC SMALL LETTER ER -->
- <Key
- latin:keyLabel="р" />
- <!-- U+0442: "т" CYRILLIC SMALL LETTER TE -->
- <Key
- latin:keyLabel="т" />
- <!-- U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN -->
- <Key
- latin:keyLabel="ъ" />
- <!-- U+0443: "у" CYRILLIC SMALL LETTER U -->
- <Key
- latin:keyLabel="у" />
- <!-- U+0438: "и" CYRILLIC SMALL LETTER I
- U+045D: "ѝ" CYRILLIC SMALL LETTER I WITH GRAVE -->
- <Key
- latin:keyLabel="и"
- latin:moreKeys="ѝ" />
- <!-- U+043E: "о" CYRILLIC SMALL LETTER O -->
- <Key
- latin:keyLabel="о" />
- <!-- U+043F: "п" CYRILLIC SMALL LETTER PE -->
- <Key
- latin:keyLabel="п" />
- <!-- U+044F: "я" CYRILLIC SMALL LETTER YA -->
- <Key
- latin:keyLabel="я" />
-</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 6ceb970..0000000
--- 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="й" />
- <!-- U+0446: "ц" CYRILLIC SMALL LETTER TSE -->
- <Key
- latin:keyLabel="ц" />
- <!-- U+0443: "у" CYRILLIC SMALL LETTER U -->
- <Key
- latin:keyLabel="у"
- latin:moreKeys="@string/more_keys_for_cyrillic_u" />
- <!-- U+043A: "к" CYRILLIC SMALL LETTER KA -->
- <Key
- latin:keyLabel="к" />
- <!-- U+0435: "е" CYRILLIC SMALL LETTER IE -->
- <Key
- latin:keyLabel="е"
- latin:moreKeys="@string/more_keys_for_cyrillic_ye" />
- <!-- U+043D: "н" CYRILLIC SMALL LETTER EN -->
- <Key
- latin:keyLabel="н"
- latin:moreKeys="@string/more_keys_for_cyrillic_en" />
- <!-- U+0433: "г" CYRILLIC SMALL LETTER GHE -->
- <Key
- latin:keyLabel="г" />
- <!-- U+0448: "ш" CYRILLIC SMALL LETTER SHA -->
- <Key
- latin:keyLabel="ш" />
- <Key
- latin:keyLabel="@string/keylabel_for_cyrillic_shcha" />
- <!-- U+0437: "з" CYRILLIC SMALL LETTER ZE -->
- <Key
- latin:keyLabel="з" />
- <!-- U+0445: "х" CYRILLIC SMALL LETTER HA -->
- <Key
- latin:keyLabel="х" />
-</merge>
diff --git a/java/res/xml-sw600dp/rowkeys_georgian1.xml b/java/res/xml-sw600dp/rowkeys_georgian1.xml
deleted file mode 100644
index 86ce6a1..0000000
--- 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="ჭ"
- latin:keyLabelFlags="preserveCase" />
- <Key
- latin:keyLabel="E"
- latin:keyLabelFlags="preserveCase" />
- <!-- U+10E6: "ღ" GEORGIAN LETTER GHAN -->
- <Key
- latin:keyLabel="ღ"
- latin:keyLabelFlags="preserveCase" />
- <!-- U+10D7: "თ" GEORGIAN LETTER TAN -->
- <Key
- latin:keyLabel="თ"
- 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="ქ"
- latin:keyLabelFlags="preserveCase" />
- <!-- U+10EC: "წ" GEORGIAN LETTER CIL -->
- <Key
- latin:keyLabel="წ"
- latin:keyLabelFlags="preserveCase" />
- <!-- U+10D4: "ე" GEORGIAN LETTER EN
- U+10F1: "ჱ" GEORGIAN LETTER HE -->
- <Key
- latin:keyLabel="ე"
- latin:moreKeys="ჱ"
- latin:keyLabelFlags="preserveCase" />
- <!-- U+10E0: "რ" GEORGIAN LETTER RAE -->
- <Key
- latin:keyLabel="რ"
- latin:keyLabelFlags="preserveCase" />
- <!-- U+10E2: "ტ" GEORGIAN LETTER TAR -->
- <Key
- latin:keyLabel="ტ"
- latin:keyLabelFlags="preserveCase" />
- <!-- U+10E7: "ყ" GEORGIAN LETTER QAR
- U+10F8: "ჸ" GEORGIAN LETTER ELIFI -->
- <Key
- latin:keyLabel="ყ"
- latin:moreKeys="ჸ"
- latin:keyLabelFlags="preserveCase" />
- <!-- U+10E3: "უ" GEORGIAN LETTER UN -->
- <Key
- latin:keyLabel="უ"
- latin:keyLabelFlags="preserveCase" />
- <!-- U+10D8: "ი" GEORGIAN LETTER IN
- U+10F2: "ჲ" GEORGIAN LETTER HIE -->
- <Key
- latin:keyLabel="ი"
- latin:moreKeys="ჲ"
- latin:keyLabelFlags="preserveCase" />
- <!-- U+10DD: "ო" GEORGIAN LETTER ON -->
- <Key
- latin:keyLabel="ო"
- latin:keyLabelFlags="preserveCase" />
- <!-- U+10DE: "პ" GEORGIAN LETTER PAR -->
- <Key
- latin:keyLabel="პ"
- 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 4eb7732..0000000
--- 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="΅" />
- </case>
- <default>
- -->
- <!-- U+03C2: "ς" GREEK SMALL LETTER FINAL SIGMA -->
- <Key
- latin:keyLabel="ς"
- latin:keyLabelFlags="preserveCase" />
- <!--
- </default>
- </switch>
- -->
- <!-- U+03B5: "ε" GREEK SMALL LETTER EPSILON
- U+03AD: "έ" GREEK SMALL LETTER EPSILON WITH TONOS -->
- <Key
- latin:keyLabel="ε"
- latin:moreKeys="έ" />
- <!-- U+03C1: "ρ" GREEK SMALL LETTER RHO -->
- <Key
- latin:keyLabel="ρ" />
- <!-- U+03C4: "τ" GREEK SMALL LETTER TAU -->
- <Key
- latin:keyLabel="τ" />
- <!-- 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="υ"
- latin:moreKeys="ύ,ϋ,ΰ" />
- <!-- U+03B8: "θ" GREEK SMALL LETTER THETA -->
- <Key
- latin:keyLabel="θ" />
- <!-- 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="ι"
- latin:moreKeys="ί,ϊ,ΐ" />
- <!-- U+03BF: "ο" GREEK SMALL LETTER OMICRON
- U+03CC: "ό" GREEK SMALL LETTER OMICRON WITH TONOS -->
- <Key
- latin:keyLabel="ο"
- latin:moreKeys="ό" />
- <!-- U+03C0: "π" GREEK SMALL LETTER PI -->
- <Key
- latin:keyLabel="π" />
-</merge>
diff --git a/java/res/xml-sw600dp/rowkeys_qwerty1.xml b/java/res/xml-sw600dp/rowkeys_qwerty1.xml
deleted file mode 100644
index 05101ec..0000000
--- 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 d7461e6..0000000
--- 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 aa0d5bb..0000000
--- 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="љ" />
- <!-- U+045A: "њ" CYRILLIC SMALL LETTER NJE -->
- <Key
- latin:keyLabel="њ" />
- <!-- U+0435: "е" CYRILLIC SMALL LETTER IE -->
- <Key
- latin:keyLabel="е"
- latin:moreKeys="@string/more_keys_for_cyrillic_ie" />
- <!-- U+0440: "р" CYRILLIC SMALL LETTER ER -->
- <Key
- latin:keyLabel="р" />
- <!-- U+0442: "т" CYRILLIC SMALL LETTER TE -->
- <Key
- latin:keyLabel="т" />
- <Key
- latin:keyLabel="@string/keylabel_for_cyrillic_ze" />
- <!-- U+0443: "у" CYRILLIC SMALL LETTER U -->
- <Key
- latin:keyLabel="у" />
- <!-- U+0438: "и" CYRILLIC SMALL LETTER I -->
- <Key
- latin:keyLabel="и"
- latin:moreKeys="@string/more_keys_for_cyrillic_i" />
- <!-- U+043E: "о" CYRILLIC SMALL LETTER O -->
- <Key
- latin:keyLabel="о" />
- <!-- U+043F: "п" CYRILLIC SMALL LETTER PE -->
- <Key
- latin:keyLabel="п" />
- <!-- U+0448: "ш" CYRILLIC SMALL LETTER SHA -->
- <Key
- latin:keyLabel="ш" />
-</merge>
diff --git a/java/res/xml-sw600dp/rows_azerty.xml b/java/res/xml-sw600dp/rows_azerty.xml
index e09d8f8..2a56900 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 054b450..cabd1e6 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 71f0499..549da41 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="ъ" />
diff --git a/java/res/xml-sw600dp/rows_georgian.xml b/java/res/xml-sw600dp/rows_georgian.xml
index fe778e2..e8f9747 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 293451b..66f6247 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 5c74458..48a3048 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 8df41ac..49ea58d 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 e97bee9..a244bf2 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 9b79a36..8f0f38a 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 a8f5524..bb706cb 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 e79ca65..3637ce7 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 7fac3ed..5f59f70 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 c041d0c..ba57b75 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="ъ" />
diff --git a/java/res/xml-sw768dp/rows_georgian.xml b/java/res/xml-sw768dp/rows_georgian.xml
index d315523..0471e8f 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 4e399aa..983abe1 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 d17449a..3489724 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 ea2bb36..8f0b762 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 790ac18..e3d1c61 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 8a74e3f..0de8ff8 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 683472c..e4690f3 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 6b4de18..b09a275 100644
--- a/java/src/com/android/inputmethod/keyboard/Key.java
+++ b/java/src/com/android/inputmethod/keyboard/Key.java
@@ -73,6 +73,8 @@
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 @@
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 @@
}
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 @@
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 689e322..5346712 100644
--- a/java/src/com/android/inputmethod/keyboard/Keyboard.java
+++ b/java/src/com/android/inputmethod/keyboard/Keyboard.java
@@ -505,6 +505,8 @@
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 @@
params.mBaseWidth, params.mDefaultKeyWidth);
keyAttr.recycle();
+ mDefaultKeyLabelFlags = 0;
mCurrentY = y;
mCurrentX = 0.0f;
}
@@ -537,6 +540,14 @@
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 @@
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 @@
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 @@
// 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 @@
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();
}