Support disableAdditionalMoreKeys and disableKeyLabelHint

Change-Id: Idfa586417acd4a223380d52f044e3a86eb780b21
main
Tadashi G. Takaoka 2012-03-12 16:30:59 +09:00
parent b6895aec05
commit b03529aa01
31 changed files with 82 additions and 548 deletions

View File

@ -281,6 +281,10 @@
<flag name="shiftedLetterActivated" value="0x10000" /> <flag name="shiftedLetterActivated" value="0x10000" />
<!-- If true, use EditorInfo.actionLabel for the key label. --> <!-- If true, use EditorInfo.actionLabel for the key label. -->
<flag name="fromCustomActionLabel" value="0x20000" /> <flag name="fromCustomActionLabel" value="0x20000" />
<!-- If true, disable keyHintLabel. -->
<flag name="disableKeyHintLabel" value="0x40000000" />
<!-- If true, disable additionalMoreKeys. -->
<flag name="disableAdditionalMoreKeys" value="0x80000000" />
</attr> </attr>
<!-- The icon to display on the key instead of the label. --> <!-- The icon to display on the key instead of the label. -->
<attr name="keyIcon" format="enum"> <attr name="keyIcon" format="enum">

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -27,7 +27,8 @@
latin:keyWidth="8.5%p" latin:keyWidth="8.5%p"
> >
<include <include
latin:keyboardLayout="@xml/rowkeys_azerty1" /> latin:keyboardLayout="@xml/rowkeys_azerty1"
latin:keyLabelFlags="disableAdditionalMoreKeys|disableKeyHintLabel" />
<Key <Key
latin:keyStyle="deleteKeyStyle" latin:keyStyle="deleteKeyStyle"
latin:keyXPos="-10.0%p" latin:keyXPos="-10.0%p"

View File

@ -27,7 +27,8 @@
latin:keyWidth="7.692%p" latin:keyWidth="7.692%p"
> >
<include <include
latin:keyboardLayout="@xml/rowkeys_bulgarian1" /> latin:keyboardLayout="@xml/rowkeys_bulgarian1"
latin:keyLabelFlags="disableAdditionalMoreKeys|disableKeyHintLabel" />
<Key <Key
latin:keyStyle="deleteKeyStyle" latin:keyStyle="deleteKeyStyle"
latin:keyWidth="fillBoth" /> latin:keyWidth="fillBoth" />

View File

@ -27,7 +27,8 @@
latin:keyWidth="7.60%p" latin:keyWidth="7.60%p"
> >
<include <include
latin:keyboardLayout="@xml/rowkeys_east_slavic1" /> latin:keyboardLayout="@xml/rowkeys_east_slavic1"
latin:keyLabelFlags="disableAdditionalMoreKeys|disableKeyHintLabel" />
<!-- U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN --> <!-- U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN -->
<Key <Key
latin:keyLabel="&#x044A;" /> latin:keyLabel="&#x044A;" />

View File

@ -27,7 +27,8 @@
latin:keyWidth="9.0%p" latin:keyWidth="9.0%p"
> >
<include <include
latin:keyboardLayout="@xml/rowkeys_georgian1" /> latin:keyboardLayout="@xml/rowkeys_georgian1"
latin:keyLabelFlags="disableAdditionalMoreKeys|disableKeyHintLabel" />
<Key <Key
latin:keyStyle="deleteKeyStyle" latin:keyStyle="deleteKeyStyle"
latin:keyXPos="-10.0%p" latin:keyXPos="-10.0%p"

View File

@ -29,7 +29,8 @@
<include <include
latin:keyboardLayout="@xml/key_greek_semicolon" /> latin:keyboardLayout="@xml/key_greek_semicolon" />
<include <include
latin:keyboardLayout="@xml/rowkeys_greek1" /> latin:keyboardLayout="@xml/rowkeys_greek1"
latin:keyLabelFlags="disableAdditionalMoreKeys|disableKeyHintLabel" />
<Key <Key
latin:keyStyle="deleteKeyStyle" latin:keyStyle="deleteKeyStyle"
latin:keyXPos="-10.0%p" latin:keyXPos="-10.0%p"

View File

@ -27,7 +27,8 @@
latin:keyWidth="7.9%p" latin:keyWidth="7.9%p"
> >
<include <include
latin:keyboardLayout="@xml/rowkeys_nordic1" /> latin:keyboardLayout="@xml/rowkeys_nordic1"
latin:keyLabelFlags="disableAdditionalMoreKeys|disableKeyHintLabel" />
<Key <Key
latin:keyStyle="deleteKeyStyle" latin:keyStyle="deleteKeyStyle"
latin:keyXPos="-10.0%p" latin:keyXPos="-10.0%p"

View File

@ -27,7 +27,8 @@
latin:keyWidth="9.0%p" latin:keyWidth="9.0%p"
> >
<include <include
latin:keyboardLayout="@xml/rowkeys_qwerty1" /> latin:keyboardLayout="@xml/rowkeys_qwerty1"
latin:keyLabelFlags="disableAdditionalMoreKeys|disableKeyHintLabel" />
<Key <Key
latin:keyStyle="deleteKeyStyle" latin:keyStyle="deleteKeyStyle"
latin:keyXPos="-10.0%p" latin:keyXPos="-10.0%p"

View File

@ -27,7 +27,8 @@
latin:keyWidth="9.0%p" latin:keyWidth="9.0%p"
> >
<include <include
latin:keyboardLayout="@xml/rowkeys_qwertz1" /> latin:keyboardLayout="@xml/rowkeys_qwertz1"
latin:keyLabelFlags="disableAdditionalMoreKeys|disableKeyHintLabel" />
<Key <Key
latin:keyStyle="deleteKeyStyle" latin:keyStyle="deleteKeyStyle"
latin:keyXPos="-10.0%p" latin:keyXPos="-10.0%p"

View File

@ -27,7 +27,8 @@
latin:keyWidth="8.0%p" latin:keyWidth="8.0%p"
> >
<include <include
latin:keyboardLayout="@xml/rowkeys_south_slavic1" /> latin:keyboardLayout="@xml/rowkeys_south_slavic1"
latin:keyLabelFlags="disableAdditionalMoreKeys|disableKeyHintLabel" />
<Key <Key
latin:keyStyle="deleteKeyStyle" latin:keyStyle="deleteKeyStyle"
latin:keyXPos="-10.0%p" latin:keyXPos="-10.0%p"

View File

@ -27,7 +27,8 @@
latin:keyWidth="9.0%p" latin:keyWidth="9.0%p"
> >
<include <include
latin:keyboardLayout="@xml/rowkeys_qwerty1" /> latin:keyboardLayout="@xml/rowkeys_qwerty1"
latin:keyLabelFlags="disableAdditionalMoreKeys|disableKeyHintLabel" />
<Key <Key
latin:keyStyle="deleteKeyStyle" latin:keyStyle="deleteKeyStyle"
latin:keyXPos="-10.0%p" latin:keyXPos="-10.0%p"

View File

@ -31,7 +31,8 @@
latin:keyLabelFlags="alignLeft" latin:keyLabelFlags="alignLeft"
latin:keyWidth="7.969%p" /> latin:keyWidth="7.969%p" />
<include <include
latin:keyboardLayout="@xml/rowkeys_azerty1" /> latin:keyboardLayout="@xml/rowkeys_azerty1"
latin:keyLabelFlags="disableAdditionalMoreKeys|disableKeyHintLabel" />
<Key <Key
latin:keyStyle="deleteKeyStyle" latin:keyStyle="deleteKeyStyle"
latin:keyXPos="-9.219%p" latin:keyXPos="-9.219%p"

View File

@ -30,7 +30,8 @@
latin:keyStyle="tabKeyStyle" latin:keyStyle="tabKeyStyle"
latin:keyLabelFlags="alignLeft" /> latin:keyLabelFlags="alignLeft" />
<include <include
latin:keyboardLayout="@xml/rowkeys_bulgarian1" /> latin:keyboardLayout="@xml/rowkeys_bulgarian1"
latin:keyLabelFlags="disableAdditionalMoreKeys|disableKeyHintLabel" />
<Key <Key
latin:keyStyle="deleteKeyStyle" latin:keyStyle="deleteKeyStyle"
latin:keyWidth="fillBoth" /> latin:keyWidth="fillBoth" />

View File

@ -30,7 +30,8 @@
latin:keyStyle="tabKeyStyle" latin:keyStyle="tabKeyStyle"
latin:keyLabelFlags="alignLeft" /> latin:keyLabelFlags="alignLeft" />
<include <include
latin:keyboardLayout="@xml/rowkeys_east_slavic1" /> latin:keyboardLayout="@xml/rowkeys_east_slavic1"
latin:keyLabelFlags="disableAdditionalMoreKeys|disableKeyHintLabel" />
<!-- U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN --> <!-- U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN -->
<Key <Key
latin:keyLabel="&#x044A;" /> latin:keyLabel="&#x044A;" />

View File

@ -31,7 +31,8 @@
latin:keyLabelFlags="alignLeft" latin:keyLabelFlags="alignLeft"
latin:keyWidth="7.969%p" /> latin:keyWidth="7.969%p" />
<include <include
latin:keyboardLayout="@xml/rowkeys_georgian1" /> latin:keyboardLayout="@xml/rowkeys_georgian1"
latin:keyLabelFlags="disableAdditionalMoreKeys|disableKeyHintLabel" />
<Key <Key
latin:keyStyle="deleteKeyStyle" latin:keyStyle="deleteKeyStyle"
latin:keyXPos="-9.219%p" latin:keyXPos="-9.219%p"

View File

@ -33,7 +33,8 @@
<include <include
latin:keyboardLayout="@xml/key_greek_semicolon" /> latin:keyboardLayout="@xml/key_greek_semicolon" />
<include <include
latin:keyboardLayout="@xml/rowkeys_greek1" /> latin:keyboardLayout="@xml/rowkeys_greek1"
latin:keyLabelFlags="disableAdditionalMoreKeys|disableKeyHintLabel" />
</Row> </Row>
<Row <Row
latin:keyWidth="8.125%p" latin:keyWidth="8.125%p"

View File

@ -31,7 +31,8 @@
latin:keyLabelFlags="alignLeft" latin:keyLabelFlags="alignLeft"
latin:keyWidth="7.500%p" /> latin:keyWidth="7.500%p" />
<include <include
latin:keyboardLayout="@xml/rowkeys_nordic1" /> latin:keyboardLayout="@xml/rowkeys_nordic1"
latin:keyLabelFlags="disableAdditionalMoreKeys|disableKeyHintLabel" />
<Key <Key
latin:keyStyle="deleteKeyStyle" latin:keyStyle="deleteKeyStyle"
latin:keyXPos="-11.500%p" latin:keyXPos="-11.500%p"

View File

@ -31,7 +31,8 @@
latin:keyLabelFlags="alignLeft" latin:keyLabelFlags="alignLeft"
latin:keyWidth="7.969%p" /> latin:keyWidth="7.969%p" />
<include <include
latin:keyboardLayout="@xml/rowkeys_qwerty1" /> latin:keyboardLayout="@xml/rowkeys_qwerty1"
latin:keyLabelFlags="disableAdditionalMoreKeys|disableKeyHintLabel" />
<Key <Key
latin:keyStyle="deleteKeyStyle" latin:keyStyle="deleteKeyStyle"
latin:keyXPos="-9.219%p" latin:keyXPos="-9.219%p"

View File

@ -31,7 +31,8 @@
latin:keyLabelFlags="alignLeft" latin:keyLabelFlags="alignLeft"
latin:keyWidth="7.969%p" /> latin:keyWidth="7.969%p" />
<include <include
latin:keyboardLayout="@xml/rowkeys_qwertz1" /> latin:keyboardLayout="@xml/rowkeys_qwertz1"
latin:keyLabelFlags="disableAdditionalMoreKeys|disableKeyHintLabel" />
<Key <Key
latin:keyStyle="deleteKeyStyle" latin:keyStyle="deleteKeyStyle"
latin:keyXPos="-9.219%p" latin:keyXPos="-9.219%p"

View File

@ -30,7 +30,8 @@
latin:keyStyle="tabKeyStyle" latin:keyStyle="tabKeyStyle"
latin:keyLabelFlags="alignLeft" /> latin:keyLabelFlags="alignLeft" />
<include <include
latin:keyboardLayout="@xml/rowkeys_south_slavic1" /> latin:keyboardLayout="@xml/rowkeys_south_slavic1"
latin:keyLabelFlags="disableAdditionalMoreKeys|disableKeyHintLabel" />
<Key <Key
latin:keyStyle="deleteKeyStyle" latin:keyStyle="deleteKeyStyle"
latin:keyXPos="-9.219%p" latin:keyXPos="-9.219%p"

View File

@ -31,7 +31,8 @@
latin:keyLabelFlags="alignLeft" latin:keyLabelFlags="alignLeft"
latin:keyWidth="7.969%p" /> latin:keyWidth="7.969%p" />
<include <include
latin:keyboardLayout="@xml/rowkeys_qwerty1" /> latin:keyboardLayout="@xml/rowkeys_qwerty1"
latin:keyLabelFlags="disableAdditionalMoreKeys|disableKeyHintLabel" />
<Key <Key
latin:keyStyle="deleteKeyStyle" latin:keyStyle="deleteKeyStyle"
latin:keyXPos="-9.219%p" latin:keyXPos="-9.219%p"

View File

@ -73,6 +73,8 @@ public class Key {
private static final int LABEL_FLAGS_PRESERVE_CASE = 0x8000; 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_SHIFTED_LETTER_ACTIVATED = 0x10000;
private static final int LABEL_FLAGS_FROM_CUSTOM_ACTION_LABEL = 0x20000; 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 */ /** Icon to display instead of a label. Icon takes precedence over a label */
private final int mIconId; private final int mIconId;
@ -240,7 +242,8 @@ public class Key {
mDisabledIconId = style.getInt(keyAttr, mDisabledIconId = style.getInt(keyAttr,
R.styleable.Keyboard_Key_keyIconDisabled, KeyboardIconsSet.ICON_UNDEFINED); 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; final boolean preserveCase = (mLabelFlags & LABEL_FLAGS_PRESERVE_CASE) != 0;
int actionFlags = style.getFlag(keyAttr, R.styleable.Keyboard_Key_keyActionFlags); int actionFlags = style.getFlag(keyAttr, R.styleable.Keyboard_Key_keyActionFlags);
String[] moreKeys = style.getStringArray(keyAttr, R.styleable.Keyboard_Key_moreKeys); String[] moreKeys = style.getStringArray(keyAttr, R.styleable.Keyboard_Key_moreKeys);
@ -265,8 +268,13 @@ public class Key {
} }
mMoreKeysColumnAndFlags = moreKeysColumn; mMoreKeysColumnAndFlags = moreKeysColumn;
final String[] additionalMoreKeys = style.getStringArray( final String[] additionalMoreKeys;
keyAttr, R.styleable.Keyboard_Key_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); moreKeys = KeySpecParser.insertAddtionalMoreKeys(moreKeys, additionalMoreKeys);
if (moreKeys != null) { if (moreKeys != null) {
actionFlags |= ACTION_FLAGS_ENABLE_LONG_PRESS; actionFlags |= ACTION_FLAGS_ENABLE_LONG_PRESS;
@ -284,8 +292,12 @@ public class Key {
mLabel = adjustCaseOfStringForKeyboardId(style.getString( mLabel = adjustCaseOfStringForKeyboardId(style.getString(
keyAttr, R.styleable.Keyboard_Key_keyLabel), preserveCase, params.mId); keyAttr, R.styleable.Keyboard_Key_keyLabel), preserveCase, params.mId);
} }
mHintLabel = adjustCaseOfStringForKeyboardId(style.getString( if ((mLabelFlags & LABEL_FLAGS_DISABLE_HINT_LABEL) != 0) {
keyAttr, R.styleable.Keyboard_Key_keyHintLabel), preserveCase, params.mId); mHintLabel = null;
} else {
mHintLabel = adjustCaseOfStringForKeyboardId(style.getString(
keyAttr, R.styleable.Keyboard_Key_keyHintLabel), preserveCase, params.mId);
}
String outputText = adjustCaseOfStringForKeyboardId(style.getString( String outputText = adjustCaseOfStringForKeyboardId(style.getString(
keyAttr, R.styleable.Keyboard_Key_keyOutputText), preserveCase, params.mId); keyAttr, R.styleable.Keyboard_Key_keyOutputText), preserveCase, params.mId);
final int code = style.getInt( final int code = style.getInt(

View File

@ -505,6 +505,8 @@ public class Keyboard {
private float mDefaultKeyWidth; private float mDefaultKeyWidth;
/** Default height of a key in this row. */ /** Default height of a key in this row. */
public final int mRowHeight; public final int mRowHeight;
/** Default keyLabelFlags in this row. */
private int mDefaultKeyLabelFlags;
private final int mCurrentY; private final int mCurrentY;
// Will be updated by {@link Key}'s constructor. // Will be updated by {@link Key}'s constructor.
@ -525,6 +527,7 @@ public class Keyboard {
params.mBaseWidth, params.mDefaultKeyWidth); params.mBaseWidth, params.mDefaultKeyWidth);
keyAttr.recycle(); keyAttr.recycle();
mDefaultKeyLabelFlags = 0;
mCurrentY = y; mCurrentY = y;
mCurrentX = 0.0f; mCurrentX = 0.0f;
} }
@ -537,6 +540,14 @@ public class Keyboard {
mDefaultKeyWidth = defaultKeyWidth; mDefaultKeyWidth = defaultKeyWidth;
} }
public int getDefaultKeyLabelFlags() {
return mDefaultKeyLabelFlags;
}
public void setDefaultKeyLabelFlags(int keyLabelFlags) {
mDefaultKeyLabelFlags = keyLabelFlags;
}
public void setXPos(float keyXPos) { public void setXPos(float keyXPos) {
mCurrentX = keyXPos; mCurrentX = keyXPos;
} }
@ -927,6 +938,7 @@ public class Keyboard {
R.styleable.Keyboard_Key); R.styleable.Keyboard_Key);
int keyboardLayout = 0; int keyboardLayout = 0;
float savedDefaultKeyWidth = 0; float savedDefaultKeyWidth = 0;
int savedDefaultKeyLabelFlags = 0;
try { try {
XmlParseUtils.checkAttributeExists(keyboardAttr, XmlParseUtils.checkAttributeExists(keyboardAttr,
R.styleable.Keyboard_Include_keyboardLayout, "keyboardLayout", R.styleable.Keyboard_Include_keyboardLayout, "keyboardLayout",
@ -935,6 +947,7 @@ public class Keyboard {
R.styleable.Keyboard_Include_keyboardLayout, 0); R.styleable.Keyboard_Include_keyboardLayout, 0);
if (row != null) { if (row != null) {
savedDefaultKeyWidth = row.getDefaultKeyWidth(); savedDefaultKeyWidth = row.getDefaultKeyWidth();
savedDefaultKeyLabelFlags = row.getDefaultKeyLabelFlags();
if (keyAttr.hasValue(R.styleable.Keyboard_Key_keyXPos)) { if (keyAttr.hasValue(R.styleable.Keyboard_Key_keyXPos)) {
// Override current x coordinate. // Override current x coordinate.
row.setXPos(row.getKeyX(keyAttr)); row.setXPos(row.getKeyX(keyAttr));
@ -943,6 +956,12 @@ public class Keyboard {
// Override default key width. // Override default key width.
row.setDefaultKeyWidth(row.getKeyWidth(keyAttr)); 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 { } finally {
keyboardAttr.recycle(); keyboardAttr.recycle();
@ -959,8 +978,9 @@ public class Keyboard {
parseMerge(parserForInclude, row, skip); parseMerge(parserForInclude, row, skip);
} finally { } finally {
if (row != null) { if (row != null) {
// Restore default key width. // Restore default key width and key label flags.
row.setDefaultKeyWidth(savedDefaultKeyWidth); row.setDefaultKeyWidth(savedDefaultKeyWidth);
row.setDefaultKeyLabelFlags(savedDefaultKeyLabelFlags);
} }
parserForInclude.close(); parserForInclude.close();
} }