diff options
Diffstat (limited to 'java')
30 files changed, 487 insertions, 792 deletions
diff --git a/java/res/values-land/dimens.xml b/java/res/values-land/dimens.xml index ddf7f7f0b..a1546f11d 100644 --- a/java/res/values-land/dimens.xml +++ b/java/res/values-land/dimens.xml @@ -55,10 +55,10 @@ <fraction name="spacebar_text_ratio">40.000%</fraction> <dimen name="key_preview_offset">0.0dp</dimen> - <!-- For 5-rows keyboard --> - <fraction name="key_bottom_gap_5rows">3.20%p</fraction> - <fraction name="key_letter_ratio_5rows">78%</fraction> - <fraction name="key_uppercase_letter_ratio_5rows">48%</fraction> + <!-- For 5-row keyboard --> + <fraction name="key_bottom_gap_5row">3.20%p</fraction> + <fraction name="key_letter_ratio_5row">78%</fraction> + <fraction name="key_uppercase_letter_ratio_5row">48%</fraction> <dimen name="key_preview_offset_ics">1.6dp</dimen> <!-- popup_key_height x -0.5 --> diff --git a/java/res/values-sw600dp-land/dimens.xml b/java/res/values-sw600dp-land/dimens.xml index 4daa567d4..9664bf9ed 100644 --- a/java/res/values-sw600dp-land/dimens.xml +++ b/java/res/values-sw600dp-land/dimens.xml @@ -53,10 +53,10 @@ <fraction name="spacebar_text_ratio">30.0%</fraction> <dimen name="key_uppercase_letter_padding">4dp</dimen> - <!-- For 50rows keyboard --> - <fraction name="key_bottom_gap_5rows">3.20%p</fraction> - <fraction name="key_letter_ratio_5rows">62%</fraction> - <fraction name="key_uppercase_letter_ratio_5rows">36%</fraction> + <!-- For 5-row keyboard --> + <fraction name="key_bottom_gap_5row">3.20%p</fraction> + <fraction name="key_letter_ratio_5row">62%</fraction> + <fraction name="key_uppercase_letter_ratio_5row">36%</fraction> <dimen name="suggestions_strip_padding">252.0dp</dimen> <integer name="max_more_suggestions_row">5</integer> diff --git a/java/res/values-sw600dp/dimens.xml b/java/res/values-sw600dp/dimens.xml index e5c32a3de..e608f7d7b 100644 --- a/java/res/values-sw600dp/dimens.xml +++ b/java/res/values-sw600dp/dimens.xml @@ -66,10 +66,10 @@ <dimen name="key_preview_height">94.5dp</dimen> <dimen name="key_preview_offset">16.0dp</dimen> - <!-- For 50rows keyboard --> - <fraction name="key_bottom_gap_5rows">3.20%p</fraction> - <fraction name="key_letter_ratio_5rows">52%</fraction> - <fraction name="key_uppercase_letter_ratio_5rows">27%</fraction> + <!-- For 5-row keyboard --> + <fraction name="key_bottom_gap_5row">3.20%p</fraction> + <fraction name="key_letter_ratio_5row">52%</fraction> + <fraction name="key_uppercase_letter_ratio_5row">27%</fraction> <dimen name="key_preview_offset_ics">8.0dp</dimen> <!-- popup_key_height x -0.5 --> diff --git a/java/res/values-sw768dp-land/dimens.xml b/java/res/values-sw768dp-land/dimens.xml index 8f3de55b3..511217068 100644 --- a/java/res/values-sw768dp-land/dimens.xml +++ b/java/res/values-sw768dp-land/dimens.xml @@ -55,10 +55,10 @@ <fraction name="spacebar_text_ratio">24.00%</fraction> <dimen name="key_preview_height">107.1dp</dimen> - <!-- For 5-rows keyboard --> - <fraction name="key_bottom_gap_5rows">2.65%p</fraction> - <fraction name="key_letter_ratio_5rows">53%</fraction> - <fraction name="key_uppercase_letter_ratio_5rows">30%</fraction> + <!-- For 5-row keyboard --> + <fraction name="key_bottom_gap_5row">2.65%p</fraction> + <fraction name="key_letter_ratio_5row">53%</fraction> + <fraction name="key_uppercase_letter_ratio_5row">30%</fraction> <dimen name="key_preview_offset_ics">8.0dp</dimen> diff --git a/java/res/values-sw768dp/dimens.xml b/java/res/values-sw768dp/dimens.xml index 7caa9843f..ec9d75988 100644 --- a/java/res/values-sw768dp/dimens.xml +++ b/java/res/values-sw768dp/dimens.xml @@ -67,10 +67,10 @@ <dimen name="key_preview_height">94.5dp</dimen> <dimen name="key_preview_offset">16.0dp</dimen> - <!-- For 5-rows keyboard --> - <fraction name="key_bottom_gap_5rows">2.95%p</fraction> - <fraction name="key_letter_ratio_5rows">51%</fraction> - <fraction name="key_uppercase_letter_ratio_5rows">33%</fraction> + <!-- For 5-row keyboard --> + <fraction name="key_bottom_gap_5row">2.95%p</fraction> + <fraction name="key_letter_ratio_5row">51%</fraction> + <fraction name="key_uppercase_letter_ratio_5row">33%</fraction> <dimen name="key_preview_offset_ics">8.0dp</dimen> <!-- popup_key_height x -0.5 --> diff --git a/java/res/values/dimens.xml b/java/res/values/dimens.xml index 22cd3255b..aa16c7770 100644 --- a/java/res/values/dimens.xml +++ b/java/res/values/dimens.xml @@ -73,10 +73,10 @@ <dimen name="key_popup_hint_letter_padding">2dp</dimen> <dimen name="key_uppercase_letter_padding">2dp</dimen> - <!-- For 5-rows keyboard --> - <fraction name="key_bottom_gap_5rows">3.20%p</fraction> - <fraction name="key_letter_ratio_5rows">64%</fraction> - <fraction name="key_uppercase_letter_ratio_5rows">41%</fraction> + <!-- For 5-row keyboard --> + <fraction name="key_bottom_gap_5row">3.20%p</fraction> + <fraction name="key_letter_ratio_5row">64%</fraction> + <fraction name="key_uppercase_letter_ratio_5row">41%</fraction> <dimen name="key_preview_offset_ics">8.0dp</dimen> <!-- popup_key_height x -0.5 --> diff --git a/java/res/xml-sw600dp/kbd_thai.xml b/java/res/xml-sw600dp/kbd_thai.xml deleted file mode 100644 index e29ddb531..000000000 --- a/java/res/xml-sw600dp/kbd_thai.xml +++ /dev/null @@ -1,32 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -/* -** -** Copyright 2012, The Android Open Source Project -** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at -** -** http://www.apache.org/licenses/LICENSE-2.0 -** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and -** limitations under the License. -*/ ---> - -<Keyboard - xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" - latin:keyTypeface="normal" - latin:rowHeight="20%p" - latin:verticalGap="@fraction/key_bottom_gap_5rows" - latin:keyLetterSize="@fraction/key_letter_ratio_5rows" - latin:keyShiftedLetterHintRatio="@fraction/key_uppercase_letter_ratio_5rows" - latin:touchPositionCorrectionData="@null" -> - <include - latin:keyboardLayout="@xml/rows_thai" /> -</Keyboard> diff --git a/java/res/xml-sw600dp/rowkeys_thai1.xml b/java/res/xml-sw600dp/rowkeys_thai1.xml deleted file mode 100644 index 6aec7c2c5..000000000 --- a/java/res/xml-sw600dp/rowkeys_thai1.xml +++ /dev/null @@ -1,97 +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:keyboardLayoutSetElement="alphabetManualShifted|alphabetShiftLocked|alphabetShiftLockShifted" - > - <!-- U+0E51: "๑" THAI DIGIT ONE --> - <Key - latin:keyLabel="๑" /> - <!-- U+0E52: "๒" THAI DIGIT TWO --> - <Key - latin:keyLabel="๒" /> - <!-- U+0E53: "๓" THAI DIGIT THREE --> - <Key - latin:keyLabel="๓" /> - <!-- U+0E54: "๔" THAI DIGIT FOUR --> - <Key - latin:keyLabel="๔" /> - <!-- U+0E39: " ู" THAI CHARACTER SARA UU --> - <Key - latin:keyLabel="ู" /> - <!-- U+0E3F: "฿" THAI CURRENCY SYMBOL BAHT --> - <Key - latin:keyLabel="฿" /> - <!-- U+0E55: "๕" THAI DIGIT FIVE --> - <Key - latin:keyLabel="๕" /> - <!-- U+0E56: "๖" THAI DIGIT SIX --> - <Key - latin:keyLabel="๖" /> - <!-- U+0E57: "๗" THAI DIGIT SEVEN --> - <Key - latin:keyLabel="๗" /> - <!-- U+0E58: "๘" THAI DIGIT EIGHT --> - <Key - latin:keyLabel="๘" /> - <!-- U+0E59: "๙" THAI DIGIT NINE --> - <Key - latin:keyLabel="๙" /> - </case> - <default> - <!-- U+0E45: "ๅ" THAI CHARACTER LAKKHANGYAO --> - <Key - latin:keyLabel="ๅ" /> - <Key - latin:keyLabel="/" /> - <!-- U+0E20: "ภ" THAI CHARACTER PHO SAMPHAO --> - <Key - latin:keyLabel="ภ" /> - <!-- U+0E16: "ถ" THAI CHARACTER THO THUNG --> - <Key - latin:keyLabel="ถ" /> - <!-- U+0E38: " ุ" THAI CHARACTER SARA U --> - <Key - latin:keyLabel="ุ" /> - <!-- U+0E36: " ึ" THAI CHARACTER SARA UE --> - <Key - latin:keyLabel="ึ" /> - <!-- U+0E04: "ค" THAI CHARACTER KHO KHWAI --> - <Key - latin:keyLabel="ค" /> - <!-- U+0E15: "ต" THAI CHARACTER TO TAO --> - <Key - latin:keyLabel="ต" /> - <!-- U+0E08: "จ" THAI CHARACTER CHO CHAN --> - <Key - latin:keyLabel="จ" /> - <!-- U+0E02: "ข" THAI CHARACTER KHO KHAI --> - <Key - latin:keyLabel="ข" /> - <!-- U+0E0A: "ช" THAI CHARACTER CHO CHANG --> - <Key - latin:keyLabel="ช" /> - </default> - </switch> -</merge> diff --git a/java/res/xml-sw600dp/rowkeys_thai2.xml b/java/res/xml-sw600dp/rowkeys_thai2.xml deleted file mode 100644 index edb759a89..000000000 --- a/java/res/xml-sw600dp/rowkeys_thai2.xml +++ /dev/null @@ -1,108 +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:keyboardLayoutSetElement="alphabetManualShifted|alphabetShiftLocked|alphabetShiftLockShifted" - > - <!-- U+0E50: "๐" THAI DIGIT ZERO --> - <Key - latin:keyLabel="๐" /> - <Key - latin:keyLabel=""" /> - <!-- U+0E0E: "ฎ" THAI CHARACTER DO CHADA --> - <Key - latin:keyLabel="ฎ" /> - <!-- U+0E11: "ฑ" THAI CHARACTER THO NANGMONTHO --> - <Key - latin:keyLabel="ฑ" /> - <!-- U+0E18: "ธ" THAI CHARACTER THO THONG --> - <Key - latin:keyLabel="ธ" /> - <!-- U+0E4D: " ํ" THAI CHARACTER THANTHAKHAT --> - <Key - latin:keyLabel="ํ" /> - <!-- U+0E4A: " ๊" THAI CHARACTER MAI TRI --> - <Key - latin:keyLabel="๊" /> - <!-- U+0E13: "ณ" THAI CHARACTER NO NEN --> - <Key - latin:keyLabel="ณ" /> - <!-- U+0E2F: "ฯ" THAI CHARACTER PAIYANNOI --> - <Key - latin:keyLabel="ฯ" /> - <!-- U+0E0D: "ญ" THAI CHARACTER YO YING --> - <Key - latin:keyLabel="ญ" /> - <!-- U+0E10: "ฐ" THAI CHARACTER THO THAN --> - <Key - latin:keyLabel="ฐ" /> - <Key - latin:keyLabel="," /> - <!-- U+0E05: "ฅ" THAI CHARACTER KHO KHON --> - <Key - latin:keyLabel="ฅ" /> - </case> - <default> - <!-- U+0E46: "ๆ" THAI CHARACTER MAIYAMOK --> - <Key - latin:keyLabel="ๆ" /> - <!-- U+0E44: "ไ" THAI CHARACTER SARA AI MAIMALAI --> - <Key - latin:keyLabel="ไ" /> - <!-- U+0E33: "ำ" THAI CHARACTER SARA AM --> - <Key - latin:keyLabel="ำ" /> - <!-- U+0E1E: "พ" THAI CHARACTER PHO PHAN --> - <Key - latin:keyLabel="พ" /> - <!-- U+0E30: "ะ" THAI CHARACTER SARA A --> - <Key - latin:keyLabel="ะ" /> - <!-- U+0E31: " ั" THAI CHARACTER MAI HAN-AKAT --> - <Key - latin:keyLabel="ั" /> - <!-- U+0E35: " ี" HAI CHARACTER SARA II --> - <Key - latin:keyLabel="ี" /> - <!-- U+0E23: "ร" THAI CHARACTER RO RUA --> - <Key - latin:keyLabel="ร" /> - <!-- U+0E19: "น" THAI CHARACTER NO NU --> - <Key - latin:keyLabel="น" /> - <!-- U+0E22: "ย" THAI CHARACTER YO YAK --> - <Key - latin:keyLabel="ย" /> - <!-- U+0E1A: "บ" THAI CHARACTER BO BAIMAI --> - <Key - latin:keyLabel="บ" /> - <!-- U+0E25: "ล" THAI CHARACTER LO LING --> - <Key - latin:keyLabel="ล" /> - <!-- U+0E03: "ฃ" THAI CHARACTER KHO KHUAT --> - <Key - latin:keyLabel="ฃ" /> - </default> - </switch> -</merge> diff --git a/java/res/xml-sw600dp/rowkeys_thai3.xml b/java/res/xml-sw600dp/rowkeys_thai3.xml deleted file mode 100644 index 7507dde86..000000000 --- a/java/res/xml-sw600dp/rowkeys_thai3.xml +++ /dev/null @@ -1,97 +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:keyboardLayoutSetElement="alphabetManualShifted|alphabetShiftLocked|alphabetShiftLockShifted" - > - <!-- U+0E24: "ฤ" THAI CHARACTER RU --> - <Key - latin:keyLabel="ฤ" /> - <!-- U+0E06: "ฆ" THAI CHARACTER KHO RAKHANG --> - <Key - latin:keyLabel="ฆ" /> - <!-- U+0E0F: "ฏ" THAI CHARACTER TO PATAK --> - <Key - latin:keyLabel="ฏ" /> - <!-- U+0E42: "โ" THAI CHARACTER SARA O --> - <Key - latin:keyLabel="โ" /> - <!-- U+0E0C: "ฌ" THAI CHARACTER CHO CHOE --> - <Key - latin:keyLabel="ฌ" /> - <!-- U+0E47: " ็" THAI CHARACTER MAITAIKHU --> - <Key - latin:keyLabel="็" /> - <!-- U+0E4B: " ๋" THAI CHARACTER MAI CHATTAWA --> - <Key - latin:keyLabel="๋" /> - <!-- U+0E29: "ษ" THAI CHARACTER SO RUSI --> - <Key - latin:keyLabel="ษ" /> - <!-- U+0E28: "ศ" THAI CHARACTER SO SALA --> - <Key - latin:keyLabel="ศ" /> - <!-- U+0E0B: "ซ" THAI CHARACTER SO SO --> - <Key - latin:keyLabel="ซ" /> - <Key - latin:keyLabel="." /> - </case> - <default> - <!-- U+0E1F: "ฟ" THAI CHARACTER FO FAN --> - <Key - latin:keyLabel="ฟ" /> - <!-- U+0E2B: "ห" THAI CHARACTER HO HIP --> - <Key - latin:keyLabel="ห" /> - <!-- U+0E01: "ก" THAI CHARACTER KO KAI --> - <Key - latin:keyLabel="ก" /> - <!-- U+0E14: "ด" THAI CHARACTER DO DEK --> - <Key - latin:keyLabel="ด" /> - <!-- U+0E40: "เ" THAI CHARACTER SARA E --> - <Key - latin:keyLabel="เ" /> - <!-- U+0E49: " ้" THAI CHARACTER MAI THO --> - <Key - latin:keyLabel="้" /> - <!-- U+0E48: " ฺ" THAI CHARACTER MAI EK --> - <Key - latin:keyLabel="่" /> - <!-- U+0E32: "า" THAI CHARACTER SARA AA --> - <Key - latin:keyLabel="า" /> - <!-- U+0E2A: "ส" THAI CHARACTER SO SUA --> - <Key - latin:keyLabel="ส" /> - <!-- U+0E27: "ว" THAI CHARACTER WO WAEN --> - <Key - latin:keyLabel="ว" /> - <!-- U+0E07: "ง" THAI CHARACTER NGO NGU --> - <Key - latin:keyLabel="ง" /> - </default> - </switch> -</merge> diff --git a/java/res/xml-sw600dp/rowkeys_thai4.xml b/java/res/xml-sw600dp/rowkeys_thai4.xml deleted file mode 100644 index 64549bdce..000000000 --- a/java/res/xml-sw600dp/rowkeys_thai4.xml +++ /dev/null @@ -1,89 +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:keyboardLayoutSetElement="alphabetManualShifted|alphabetShiftLocked|alphabetShiftLockShifted" - > - <Key - latin:keyLabel="(" /> - <Key - latin:keyLabel=")" /> - <!-- U+0E09: "ฉ" THAI CHARACTER CHO CHING --> - <Key - latin:keyLabel="ฉ" /> - <!-- U+0E2E: "ฮ" THAI CHARACTER HO NOKHUK --> - <Key - latin:keyLabel="ฮ" /> - <!-- U+0E3A: " ฺ" THAI CHARACTER PHINTHU --> - <Key - latin:keyLabel="ฺ" /> - <!-- U+0E4C: " ์" THAI CHARACTER THANTHAKHAT --> - <Key - latin:keyLabel="์" /> - <Key - latin:keyLabel="\?" /> - <!-- U+0E12: "ฒ" THAI CHARACTER THO PHUTHAO --> - <Key - latin:keyLabel="ฒ" /> - <!-- U+0E2C: "ฬ" THAI CHARACTER LO CHULA --> - <Key - latin:keyLabel="ฬ" /> - <!-- U+0E26: "ฦ" THAI CHARACTER LU --> - <Key - latin:keyLabel="ฦ" /> - </case> - <default> - <!-- U+0E1C: "ผ" THAI CHARACTER PHO PHUNG --> - <Key - latin:keyLabel="ผ" /> - <!-- U+0E1B: "ป" THAI CHARACTER PO PLA --> - <Key - latin:keyLabel="ป" /> - <!-- U+0E41: "แ" THAI CHARACTER SARA AE --> - <Key - latin:keyLabel="แ" /> - <!-- U+0E2D: "อ" THAI CHARACTER O ANG --> - <Key - latin:keyLabel="อ" /> - <!-- U+0E34: " ิ" THAI CHARACTER SARA I --> - <Key - latin:keyLabel="ิ" /> - <!-- U+0E37: " ื" THAI CHARACTER SARA UEE --> - <Key - latin:keyLabel="ื" /> - <!-- U+0E17: "ท" THAI CHARACTER THO THAHAN --> - <Key - latin:keyLabel="ท" /> - <!-- U+0E21: "ม" THAI CHARACTER MO MA --> - <Key - latin:keyLabel="ม" /> - <!-- U+0E43: "ใ" THAI CHARACTER SARA AI MAIMUAN --> - <Key - latin:keyLabel="ใ" /> - <!-- U+0E1D: "ฝ" THAI CHARACTER FO FA --> - <Key - latin:keyLabel="ฝ" /> - </default> - </switch> -</merge> diff --git a/java/res/xml-sw600dp/rows_thai.xml b/java/res/xml-sw600dp/rows_thai.xml index c1fe55b39..bc89640ac 100644 --- a/java/res/xml-sw600dp/rows_thai.xml +++ b/java/res/xml-sw600dp/rows_thai.xml @@ -27,8 +27,7 @@ latin:keyWidth="7.5%p" > <include - latin:keyboardLayout="@xml/rowkeys_thai1" - latin:keyXPos="3.75%p" /> + latin:keyboardLayout="@xml/rowkeys_thai1" /> <Key latin:keyStyle="deleteKeyStyle" latin:keyWidth="fillRight" /> @@ -38,14 +37,16 @@ > <include latin:keyboardLayout="@xml/rowkeys_thai2" - latin:keyXPos="0.719%p" /> + latin:keyXPos="2.5%p" /> + <include + latin:keyboardLayout="@xml/key_thai_kho_khuat" /> </Row> <Row latin:keyWidth="7.5%p" > <include latin:keyboardLayout="@xml/rowkeys_thai3" - latin:keyXPos="3.75%p" /> + latin:keyXPos="5.0%p" /> <Key latin:keyStyle="enterKeyStyle" latin:keyWidth="fillRight" /> diff --git a/java/res/xml-sw768dp-land/kbd_thai.xml b/java/res/xml-sw768dp-land/kbd_thai.xml deleted file mode 100644 index e29ddb531..000000000 --- a/java/res/xml-sw768dp-land/kbd_thai.xml +++ /dev/null @@ -1,32 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -/* -** -** Copyright 2012, The Android Open Source Project -** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at -** -** http://www.apache.org/licenses/LICENSE-2.0 -** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and -** limitations under the License. -*/ ---> - -<Keyboard - xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" - latin:keyTypeface="normal" - latin:rowHeight="20%p" - latin:verticalGap="@fraction/key_bottom_gap_5rows" - latin:keyLetterSize="@fraction/key_letter_ratio_5rows" - latin:keyShiftedLetterHintRatio="@fraction/key_uppercase_letter_ratio_5rows" - latin:touchPositionCorrectionData="@null" -> - <include - latin:keyboardLayout="@xml/rows_thai" /> -</Keyboard> diff --git a/java/res/xml-sw768dp-land/kbd_thai_symbols.xml b/java/res/xml-sw768dp-land/kbd_thai_symbols.xml deleted file mode 100644 index a5bb3eed9..000000000 --- a/java/res/xml-sw768dp-land/kbd_thai_symbols.xml +++ /dev/null @@ -1,31 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -/* -** -** Copyright 2012, The Android Open Source Project -** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at -** -** http://www.apache.org/licenses/LICENSE-2.0 -** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and -** limitations under the License. -*/ ---> - -<Keyboard - xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" - latin:rowHeight="20%p" - latin:verticalGap="@fraction/key_bottom_gap_5rows" - latin:keyLetterSize="@fraction/key_letter_ratio_5rows" - latin:keyShiftedLetterHintRatio="@fraction/key_uppercase_letter_ratio_5rows" - latin:touchPositionCorrectionData="@null" -> - <include - latin:keyboardLayout="@xml/rows_thai_symbols" /> -</Keyboard> diff --git a/java/res/xml-sw768dp-land/kbd_thai_symbols_shift.xml b/java/res/xml-sw768dp-land/kbd_thai_symbols_shift.xml deleted file mode 100644 index d011dff69..000000000 --- a/java/res/xml-sw768dp-land/kbd_thai_symbols_shift.xml +++ /dev/null @@ -1,31 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -/* -** -** Copyright 2012, The Android Open Source Project -** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at -** -** http://www.apache.org/licenses/LICENSE-2.0 -** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and -** limitations under the License. -*/ ---> - -<Keyboard - xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" - latin:rowHeight="20%p" - latin:verticalGap="@fraction/key_bottom_gap_5rows" - latin:keyLetterSize="@fraction/key_letter_ratio_5rows" - latin:keyShiftedLetterHintRatio="@fraction/key_uppercase_letter_ratio_5rows" - latin:touchPositionCorrectionData="@null" -> - <include - latin:keyboardLayout="@xml/rows_thai_symbols_shift" /> -</Keyboard> diff --git a/java/res/xml-sw768dp/kbd_thai.xml b/java/res/xml-sw768dp/kbd_thai.xml deleted file mode 100644 index e29ddb531..000000000 --- a/java/res/xml-sw768dp/kbd_thai.xml +++ /dev/null @@ -1,32 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -/* -** -** Copyright 2012, The Android Open Source Project -** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at -** -** http://www.apache.org/licenses/LICENSE-2.0 -** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and -** limitations under the License. -*/ ---> - -<Keyboard - xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" - latin:keyTypeface="normal" - latin:rowHeight="20%p" - latin:verticalGap="@fraction/key_bottom_gap_5rows" - latin:keyLetterSize="@fraction/key_letter_ratio_5rows" - latin:keyShiftedLetterHintRatio="@fraction/key_uppercase_letter_ratio_5rows" - latin:touchPositionCorrectionData="@null" -> - <include - latin:keyboardLayout="@xml/rows_thai" /> -</Keyboard> diff --git a/java/res/xml-sw768dp/kbd_thai_symbols.xml b/java/res/xml-sw768dp/kbd_thai_symbols.xml index a5bb3eed9..0cd9a61ea 100644 --- a/java/res/xml-sw768dp/kbd_thai_symbols.xml +++ b/java/res/xml-sw768dp/kbd_thai_symbols.xml @@ -21,9 +21,9 @@ <Keyboard xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" latin:rowHeight="20%p" - latin:verticalGap="@fraction/key_bottom_gap_5rows" - latin:keyLetterSize="@fraction/key_letter_ratio_5rows" - latin:keyShiftedLetterHintRatio="@fraction/key_uppercase_letter_ratio_5rows" + latin:verticalGap="@fraction/key_bottom_gap_5row" + latin:keyLetterSize="@fraction/key_letter_ratio_5row" + latin:keyShiftedLetterHintRatio="@fraction/key_uppercase_letter_ratio_5row" latin:touchPositionCorrectionData="@null" > <include diff --git a/java/res/xml-sw768dp/kbd_thai_symbols_shift.xml b/java/res/xml-sw768dp/kbd_thai_symbols_shift.xml index d011dff69..a68fec458 100644 --- a/java/res/xml-sw768dp/kbd_thai_symbols_shift.xml +++ b/java/res/xml-sw768dp/kbd_thai_symbols_shift.xml @@ -21,9 +21,9 @@ <Keyboard xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" latin:rowHeight="20%p" - latin:verticalGap="@fraction/key_bottom_gap_5rows" - latin:keyLetterSize="@fraction/key_letter_ratio_5rows" - latin:keyShiftedLetterHintRatio="@fraction/key_uppercase_letter_ratio_5rows" + latin:verticalGap="@fraction/key_bottom_gap_5row" + latin:keyLetterSize="@fraction/key_letter_ratio_5row" + latin:keyShiftedLetterHintRatio="@fraction/key_uppercase_letter_ratio_5row" latin:touchPositionCorrectionData="@null" > <include diff --git a/java/res/xml-sw768dp/rowkeys_thai_digits.xml b/java/res/xml-sw768dp/rowkeys_thai_digits.xml index 512283096..55196ebc3 100644 --- a/java/res/xml-sw768dp/rowkeys_thai_digits.xml +++ b/java/res/xml-sw768dp/rowkeys_thai_digits.xml @@ -23,32 +23,42 @@ > <!-- U+0E51: "๑" THAI DIGIT ONE --> <Key - latin:keyLabel="๑" /> + latin:keyLabel="๑" + latin:keyLabelFlags="fontNormal" /> <!-- U+0E52: "๒" THAI DIGIT TWO --> <Key - latin:keyLabel="๒" /> + latin:keyLabel="๒" + latin:keyLabelFlags="fontNormal" /> <!-- U+0E53: "๓" THAI DIGIT THREE --> <Key - latin:keyLabel="๓" /> + latin:keyLabel="๓" + latin:keyLabelFlags="fontNormal" /> <!-- U+0E54: "๔" THAI DIGIT FOUR --> <Key - latin:keyLabel="๔" /> + latin:keyLabel="๔" + latin:keyLabelFlags="fontNormal" /> <!-- U+0E55: "๕" THAI DIGIT FIVE --> <Key - latin:keyLabel="๕" /> + latin:keyLabel="๕" + latin:keyLabelFlags="fontNormal" /> <!-- U+0E56: "๖" THAI DIGIT SIX --> <Key - latin:keyLabel="๖" /> + latin:keyLabel="๖" + latin:keyLabelFlags="fontNormal" /> <!-- U+0E57: "๗" THAI DIGIT SEVEN --> <Key - latin:keyLabel="๗" /> + latin:keyLabel="๗" + latin:keyLabelFlags="fontNormal" /> <!-- U+0E58: "๘" THAI DIGIT EIGHT --> <Key - latin:keyLabel="๘" /> + latin:keyLabel="๘" + latin:keyLabelFlags="fontNormal" /> <!-- U+0E59: "๙" THAI DIGIT NINE --> <Key - latin:keyLabel="๙" /> + latin:keyLabel="๙" + latin:keyLabelFlags="fontNormal" /> <!-- U+0E50: "๐" THAI DIGIT ZERO --> <Key - latin:keyLabel="๐" /> + latin:keyLabel="๐" + latin:keyLabelFlags="fontNormal" /> </merge> diff --git a/java/res/xml-sw768dp/rows_thai.xml b/java/res/xml-sw768dp/rows_thai.xml index 7721bc5a9..5f9b383f8 100644 --- a/java/res/xml-sw768dp/rows_thai.xml +++ b/java/res/xml-sw768dp/rows_thai.xml @@ -28,7 +28,7 @@ > <include latin:keyboardLayout="@xml/rowkeys_thai1" - latin:keyXPos="11.508%p" /> + latin:keyXPos="3.799%p" /> <Key latin:keyStyle="deleteKeyStyle" latin:keyWidth="fillRight"/> @@ -42,9 +42,11 @@ latin:keyWidth="7.969%p" /> <include latin:keyboardLayout="@xml/rowkeys_thai2" /> + <include + latin:keyboardLayout="@xml/key_thai_kho_khuat" /> </Row> <Row - latin:keyWidth="7.125%p" + latin:keyWidth="7.079%p" > <Key latin:keyStyle="toSymbolKeyStyle" diff --git a/java/res/xml/kbd_pcqwerty.xml b/java/res/xml/kbd_pcqwerty.xml index a6ab2baff..777c71af3 100644 --- a/java/res/xml/kbd_pcqwerty.xml +++ b/java/res/xml/kbd_pcqwerty.xml @@ -21,9 +21,9 @@ <Keyboard xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" latin:rowHeight="20%p" - latin:verticalGap="@fraction/key_bottom_gap_5rows" - latin:keyLetterSize="@fraction/key_letter_ratio_5rows" - latin:keyShiftedLetterHintRatio="@fraction/key_uppercase_letter_ratio_5rows" + latin:verticalGap="@fraction/key_bottom_gap_5row" + latin:keyLetterSize="@fraction/key_letter_ratio_5row" + latin:keyShiftedLetterHintRatio="@fraction/key_uppercase_letter_ratio_5row" latin:touchPositionCorrectionData="@null" > <include diff --git a/java/res/xml/kbd_pcqwerty_symbols.xml b/java/res/xml/kbd_pcqwerty_symbols.xml index e86274809..a2297f702 100644 --- a/java/res/xml/kbd_pcqwerty_symbols.xml +++ b/java/res/xml/kbd_pcqwerty_symbols.xml @@ -21,9 +21,9 @@ <Keyboard xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" latin:rowHeight="20%p" - latin:verticalGap="@fraction/key_bottom_gap_5rows" - latin:keyLetterSize="@fraction/key_letter_ratio_5rows" - latin:keyShiftedLetterHintRatio="@fraction/key_uppercase_letter_ratio_5rows" + latin:verticalGap="@fraction/key_bottom_gap_5row" + latin:keyLetterSize="@fraction/key_letter_ratio_5row" + latin:keyShiftedLetterHintRatio="@fraction/key_uppercase_letter_ratio_5row" latin:touchPositionCorrectionData="@null" > <include diff --git a/java/res/xml/kbd_thai.xml b/java/res/xml/kbd_thai.xml index b015d7063..b4a4a0b92 100644 --- a/java/res/xml/kbd_thai.xml +++ b/java/res/xml/kbd_thai.xml @@ -20,7 +20,11 @@ <Keyboard xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" - latin:keyTypeface="normal" + latin:rowHeight="20%p" + latin:verticalGap="@fraction/key_bottom_gap_5row" + latin:keyLetterSize="@fraction/key_letter_ratio_5row" + latin:keyShiftedLetterHintRatio="@fraction/key_uppercase_letter_ratio_5row" + latin:touchPositionCorrectionData="@null" > <include latin:keyboardLayout="@xml/rows_thai" /> diff --git a/java/res/xml-sw600dp-land/kbd_thai.xml b/java/res/xml/key_thai_kho_khuat.xml index e29ddb531..0ffd0f924 100644 --- a/java/res/xml-sw600dp-land/kbd_thai.xml +++ b/java/res/xml/key_thai_kho_khuat.xml @@ -18,15 +18,23 @@ */ --> -<Keyboard +<merge xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" - latin:keyTypeface="normal" - latin:rowHeight="20%p" - latin:verticalGap="@fraction/key_bottom_gap_5rows" - latin:keyLetterSize="@fraction/key_letter_ratio_5rows" - latin:keyShiftedLetterHintRatio="@fraction/key_uppercase_letter_ratio_5rows" - latin:touchPositionCorrectionData="@null" > - <include - latin:keyboardLayout="@xml/rows_thai" /> -</Keyboard> + <switch> + <case + latin:keyboardLayoutSetElement="alphabetManualShifted|alphabetShiftLocked|alphabetShiftLockShifted" + > + <!-- U+0E05: "ฅ" THAI CHARACTER KHO KHON --> + <Key + latin:keyLabel="ฅ" + latin:keyLabelFlags="fontNormal" /> + </case> + <default> + <!-- U+0E03: "ฃ" THAI CHARACTER KHO KHUAT --> + <Key + latin:keyLabel="ฃ" + latin:keyLabelFlags="fontNormal" /> + </default> + </switch> +</merge> diff --git a/java/res/xml/rowkeys_thai1.xml b/java/res/xml/rowkeys_thai1.xml index 4b49da171..950d2a456 100644 --- a/java/res/xml/rowkeys_thai1.xml +++ b/java/res/xml/rowkeys_thai1.xml @@ -25,100 +25,110 @@ <case latin:keyboardLayoutSetElement="alphabetManualShifted|alphabetShiftLocked|alphabetShiftLockShifted" > - <!-- U+0E0E: "ฎ" THAI CHARACTER DO CHADA --> <Key - latin:keyLabel="ฎ" /> - <!-- U+0E11: "ฑ" THAI CHARACTER THO NANGMONTHO --> + latin:keyLabel="+" /> + <!-- U+0E51: "๑" THAI DIGIT ONE --> <Key - latin:keyLabel="ฑ" /> - <!-- U+0E18: "ธ" THAI CHARACTER THO THONG --> - <Key - latin:keyLabel="ธ" /> - <!-- U+0E13: "ณ" THAI CHARACTER NO NEN --> + latin:keyLabel="๑" + latin:keyLabelFlags="fontNormal" /> + <!-- U+0E52: "๒" THAI DIGIT TWO --> <Key - latin:keyLabel="ณ" /> - <!-- U+0E0D: "ญ" THAI CHARACTER YO YING --> + latin:keyLabel="๒" + latin:keyLabelFlags="fontNormal" /> + <!-- U+0E53: "๓" THAI DIGIT THREE --> <Key - latin:keyLabel="ญ" /> - <!-- U+0E10: "ฐ" THAI CHARACTER THO THAN --> + latin:keyLabel="๓" + latin:keyLabelFlags="fontNormal" /> + <!-- U+0E54: "๔" THAI DIGIT FOUR --> <Key - latin:keyLabel="ฐ" /> - <!-- U+0E03: "ฃ" THAI CHARACTER KHO KHUAT --> + latin:keyLabel="๔" + latin:keyLabelFlags="fontNormal" /> + <!-- U+0020: " " SPACE + U+0E39: " ู" THAI CHARACTER SARA UU --> + <!-- Note: The space character is needed as a preceding letter to draw some Thai + composing characters correctly. --> <Key - latin:keyLabel="ฃ" /> - <!-- U+0E05: "ฅ" THAI CHARACTER KHO KHON --> + latin:keyLabel=" ู" + latin:code="0x0E39" + latin:keyLabelFlags="fontNormal|followKeyLetterRatio" /> + <!-- U+0E3F: "฿" THAI CURRENCY SYMBOL BAHT --> <Key - latin:keyLabel="ฅ" /> - <!-- U+0E51: "๑" THAI DIGIT ONE - U+0E52: "๒" THAI DIGIT TWO - U+0E53: "๓" THAI DIGIT THREE - U+0E54: "๔" THAI DIGIT FOUR - U+0E55: "๕" THAI DIGIT FIVE --> + latin:keyLabel="฿" + latin:keyLabelFlags="fontNormal" /> + <!-- U+0E55: "๕" THAI DIGIT FIVE --> <Key - latin:keyLabel="๑" - latin:moreKeys="!fixedColumnOrder!4,๒,๓,๔,๕" /> - <!-- U+0E56: "๖" THAI DIGIT SIX - U+0E57: "๗" THAI DIGIT SEVEN - U+0E58: "๘" THAI DIGIT EIGHT - U+0E59: "๙" THAI DIGIT NINE - U+0E50: "๐" THAI DIGIT ZERO --> + latin:keyLabel="๕" + latin:keyLabelFlags="fontNormal" /> + <!-- U+0E56: "๖" THAI DIGIT SIX --> <Key latin:keyLabel="๖" - latin:moreKeys="!fixedColumnOrder!4,๗,๘,๙,๐" /> + latin:keyLabelFlags="fontNormal" /> + <!-- U+0E57: "๗" THAI DIGIT SEVEN --> + <Key + latin:keyLabel="๗" + latin:keyLabelFlags="fontNormal" /> + <!-- U+0E58: "๘" THAI DIGIT EIGHT --> + <Key + latin:keyLabel="๘" + latin:keyLabelFlags="fontNormal" /> + <!-- U+0E59: "๙" THAI DIGIT NINE --> + <Key + latin:keyLabel="๙" + latin:keyLabelFlags="fontNormal" /> </case> <default> + <!-- U+0E45: "ๅ" THAI CHARACTER LAKKHANGYAO --> + <Key + latin:keyLabel="ๅ" + latin:keyLabelFlags="fontNormal" /> + <Key + latin:keyLabel="/" /> + <Key + latin:keyLabel="_" /> <!-- U+0E20: "ภ" THAI CHARACTER PHO SAMPHAO --> <Key latin:keyLabel="ภ" - latin:keyHintLabel="1" - latin:additionalMoreKeys="1,๑" /> + latin:keyLabelFlags="fontNormal" /> <!-- U+0E16: "ถ" THAI CHARACTER THO THUNG --> <Key latin:keyLabel="ถ" - latin:keyHintLabel="2" - latin:additionalMoreKeys="2,๒" /> + latin:keyLabelFlags="fontNormal" /> + <!-- U+0020: " " SPACE + U+0E38: " ุ" THAI CHARACTER SARA U --> + <!-- Note: The space character is needed as a preceding letter to draw some Thai + composing characters correctly. --> + <Key + latin:keyLabel=" ุ" + latin:code="0x0E38" + latin:keyLabelFlags="fontNormal|followKeyLetterRatio" /> + <!-- U+0020: " " SPACE + U+0E36: " ึ" THAI CHARACTER SARA UE --> + <!-- Note: The space character is needed as a preceding letter to draw some Thai + composing characters correctly. --> + <Key + latin:keyLabel=" ึ" + latin:code="0x0E36" + latin:keyLabelFlags="fontNormal|followKeyLetterRatio" /> <!-- U+0E04: "ค" THAI CHARACTER KHO KHWAI --> <Key latin:keyLabel="ค" - latin:keyHintLabel="3" - latin:additionalMoreKeys="3,๓" /> + latin:keyLabelFlags="fontNormal" /> <!-- U+0E15: "ต" THAI CHARACTER TO TAO --> <Key latin:keyLabel="ต" - latin:keyHintLabel="4" - latin:additionalMoreKeys="4,๔" /> + latin:keyLabelFlags="fontNormal" /> <!-- U+0E08: "จ" THAI CHARACTER CHO CHAN --> <Key latin:keyLabel="จ" - latin:keyHintLabel="5" - latin:additionalMoreKeys="5,๕" /> + latin:keyLabelFlags="fontNormal" /> <!-- U+0E02: "ข" THAI CHARACTER KHO KHAI --> <Key latin:keyLabel="ข" - latin:keyHintLabel="6" - latin:additionalMoreKeys="6,๖" /> + latin:keyLabelFlags="fontNormal" /> <!-- U+0E0A: "ช" THAI CHARACTER CHO CHANG --> <Key latin:keyLabel="ช" - latin:keyHintLabel="7" - latin:additionalMoreKeys="7,๗" /> - <!-- U+0E23: "ร" THAI CHARACTER RO RUA - U+0E25: "ล" THAI CHARACTER LO LING --> - <Key - latin:keyLabel="ร" - latin:moreKeys="ล" - latin:keyHintLabel="8" - latin:additionalMoreKeys="8,๘" /> - <!-- U+0E19: "น" THAI CHARACTER NO NU --> - <Key - latin:keyLabel="น" - latin:keyHintLabel="9" - latin:additionalMoreKeys="9,๙" /> - <!-- U+0E22: "ย" THAI CHARACTER YO YAK --> - <Key - latin:keyLabel="ย" - latin:keyHintLabel="0" - latin:additionalMoreKeys="0,๐" /> + latin:keyLabelFlags="fontNormal" /> </default> </switch> </merge> diff --git a/java/res/xml/rowkeys_thai2.xml b/java/res/xml/rowkeys_thai2.xml index 80e3563f8..f602994b9 100644 --- a/java/res/xml/rowkeys_thai2.xml +++ b/java/res/xml/rowkeys_thai2.xml @@ -25,83 +25,116 @@ <case latin:keyboardLayoutSetElement="alphabetManualShifted|alphabetShiftLocked|alphabetShiftLockShifted" > - <!-- U+0E24: "ฤ" THAI CHARACTER RU --> - <Key - latin:keyLabel="ฤ" /> - <!-- U+0E06: "ฆ" THAI CHARACTER KHO RAKHANG --> - <Key - latin:keyLabel="ฆ" /> - <!-- U+0E0F: "ฏ" THAI CHARACTER TO PATAK --> - <Key - latin:keyLabel="ฏ" /> - <!-- U+0E0C: "ฌ" THAI CHARACTER CHO CHOE --> - <Key - latin:keyLabel="ฌ" /> - <!-- U+0E29: "ษ" THAI CHARACTER SO RUSI --> - <Key - latin:keyLabel="ษ" /> - <!-- U+0E28: "ศ" THAI CHARACTER SO SALA --> - <Key - latin:keyLabel="ศ" /> - <!-- U+0E0B: "ซ" THAI CHARACTER SO SO --> - <Key - latin:keyLabel="ซ" /> - <!-- U+0E3F: "฿" THAI CURRENCY SYMBOL BAHT - U+0E45: "ๅ" THAI CHARACTER LAKKHANGYAO --> - <Key - latin:keyLabel="฿" - latin:moreKeys="ๅ" /> - <!-- U+0E46: "ๆ" THAI CHARACTER MAIYAMOK - U+0E2F: "ฯ" THAI CHARACTER PAIYANNOI --> - <Key - latin:keyLabel="ๆ" - latin:moreKeys="ฯ" /> + <!-- U+0E50: "๐" THAI DIGIT ZERO --> + <Key + latin:keyLabel="๐" + latin:keyLabelFlags="fontNormal" /> + <Key + latin:keyLabel=""" /> + <!-- U+0E0E: "ฎ" THAI CHARACTER DO CHADA --> + <Key + latin:keyLabel="ฎ" + latin:keyLabelFlags="fontNormal" /> + <!-- U+0E11: "ฑ" THAI CHARACTER THO NANGMONTHO --> + <Key + latin:keyLabel="ฑ" + latin:keyLabelFlags="fontNormal" /> + <!-- U+0E18: "ธ" THAI CHARACTER THO THONG --> + <Key + latin:keyLabel="ธ" + latin:keyLabelFlags="fontNormal" /> + <!-- U+0020: " " SPACE + U+0E4D: " ํ" THAI CHARACTER THANTHAKHAT --> + <!-- Note: The space character is needed as a preceding letter to draw some Thai + composing characters correctly. --> + <Key + latin:keyLabel=" ํ" + latin:code="0x0E4D" + latin:keyLabelFlags="fontNormal|followKeyLetterRatio" /> + <!-- U+0020: " " SPACE + U+0E4A: " ๊" THAI CHARACTER MAI TRI --> + <!-- Note: The space character is needed as a preceding letter to draw some Thai + composing characters correctly. --> + <Key + latin:keyLabel=" ๊" + latin:code="0x0E4A" + latin:keyLabelFlags="fontNormal|followKeyLetterRatio" /> + <!-- U+0E13: "ณ" THAI CHARACTER NO NEN --> + <Key + latin:keyLabel="ณ" + latin:keyLabelFlags="fontNormal" /> + <!-- U+0E2F: "ฯ" THAI CHARACTER PAIYANNOI --> + <Key + latin:keyLabel="ฯ" + latin:keyLabelFlags="fontNormal" /> + <!-- U+0E0D: "ญ" THAI CHARACTER YO YING --> + <Key + latin:keyLabel="ญ" + latin:keyLabelFlags="fontNormal" /> + <!-- U+0E10: "ฐ" THAI CHARACTER THO THAN --> + <Key + latin:keyLabel="ฐ" + latin:keyLabelFlags="fontNormal" /> + <Key + latin:keyLabel="," /> </case> <default> - <!-- U+0E1F: "ฟ" THAI CHARACTER FO FAN - U+0E1E: "พ" THAI CHARACTER PHO PHAN --> - <Key - latin:keyLabel="ฟ" - latin:moreKeys="พ" /> - <!-- U+0E2B: "ห" THAI CHARACTER HO HIP --> + <!-- U+0E46: "ๆ" THAI CHARACTER MAIYAMOK --> <Key - latin:keyLabel="ห" /> - <!-- U+0E01: "ก" THAI CHARACTER KO KAI --> - <Key - latin:keyLabel="ก" /> - <!-- U+0E14: "ด" THAI CHARACTER DO DEK --> - <Key - latin:keyLabel="ด" /> - <!-- U+0E2A: "ส" THAI CHARACTER SO SUA --> + latin:keyLabel="ๆ" + latin:keyLabelFlags="fontNormal" /> + <!-- U+0E44: "ไ" THAI CHARACTER SARA AI MAIMALAI --> <Key - latin:keyLabel="ส" /> - <!-- U+0E27: "ว" THAI CHARACTER WO WAEN --> + latin:keyLabel="ไ" + latin:keyLabelFlags="fontNormal" /> + <!-- U+0E33: "ำ" THAI CHARACTER SARA AM --> <Key - latin:keyLabel="ว" /> - <!-- U+0E07: "ง" THAI CHARACTER NGO NGU --> + latin:keyLabel="ำ" + latin:keyLabelFlags="fontNormal" /> + <!-- U+0E1E: "พ" THAI CHARACTER PHO PHAN --> <Key - latin:keyLabel="ง" /> - <!-- U+0E30: "ะ" THAI CHARACTER SARA A - U+0E32: "า" THAI CHARACTER SARA AA - U+0E33: " ำ" THAI CHARACTER SARA AM - U+0E40: "เ" THAI CHARACTER SARA E - U+0E41: "แ" THAI CHARACTER SARA AE - U+0E43: "ใ" THAI CHARACTER SARA AI MAIMUAN - U+0E44: "ไ" THAI CHARACTER SARA AI MAIMALAI - U+0E42: "โ" THAI CHARACTER SARA O --> + latin:keyLabel="พ" + latin:keyLabelFlags="fontNormal" /> + <!-- U+0E30: "ะ" THAI CHARACTER SARA A --> <Key latin:keyLabel="ะ" - latin:moreKeys="า,ำ,เ,แ,ใ,ไ,โ" /> - <!-- U+0E31: " ั" THAI CHARACTER MAI HAN-AKAT - U+0E34: " ิ" THAI CHARACTER SARA I - U+0E35: " ี" THAI CHARACTER SARA II - U+0E36: " ึ" THAI CHARACTER SARA UE - U+0E37: " ื" THAI CHARACTER SARA UEE - U+0E38: " ุ" THAI CHARACTER SARA U - U+0E39: " ู" THAI CHARACTER SARA UU --> - <Key - latin:keyLabel="ั" - latin:moreKeys="ิ,ี,ึ,ื,ุ,ู" /> + latin:keyLabelFlags="fontNormal" /> + <!-- U+0020: " " SPACE + U+0E31: " ั" THAI CHARACTER MAI HAN-AKAT --> + <!-- Note: The space character is needed as a preceding letter to draw some Thai + composing characters correctly. --> + <Key + latin:keyLabel=" ั" + latin:code="0x0E31" + latin:keyLabelFlags="fontNormal|followKeyLetterRatio" /> + <!-- U+0020: " " SPACE + U+0E35: " ี" HAI CHARACTER SARA II --> + <!-- Note: The space character is needed as a preceding letter to draw some Thai + composing characters correctly. --> + <Key + latin:keyLabel=" ี" + latin:code="0x0E35" + latin:keyLabelFlags="fontNormal|followKeyLetterRatio" /> + <!-- U+0E23: "ร" THAI CHARACTER RO RUA --> + <Key + latin:keyLabel="ร" + latin:keyLabelFlags="fontNormal" /> + <!-- U+0E19: "น" THAI CHARACTER NO NU --> + <Key + latin:keyLabel="น" + latin:keyLabelFlags="fontNormal" /> + <!-- U+0E22: "ย" THAI CHARACTER YO YAK --> + <Key + latin:keyLabel="ย" + latin:keyLabelFlags="fontNormal" /> + <!-- U+0E1A: "บ" THAI CHARACTER BO BAIMAI --> + <Key + latin:keyLabel="บ" + latin:keyLabelFlags="fontNormal" /> + <!-- U+0E25: "ล" THAI CHARACTER LO LING --> + <Key + latin:keyLabel="ล" + latin:keyLabelFlags="fontNormal" /> </default> </switch> </merge> diff --git a/java/res/xml/rowkeys_thai3.xml b/java/res/xml/rowkeys_thai3.xml index b8338073c..7b6e6372e 100644 --- a/java/res/xml/rowkeys_thai3.xml +++ b/java/res/xml/rowkeys_thai3.xml @@ -25,59 +25,110 @@ <case latin:keyboardLayoutSetElement="alphabetManualShifted|alphabetShiftLocked|alphabetShiftLockShifted" > - <!-- U+0E09: "ฉ" THAI CHARACTER CHO CHING --> + <!-- U+0E24: "ฤ" THAI CHARACTER RU --> <Key - latin:keyLabel="ฉ" /> - <!-- U+0E2E: "ฮ" THAI CHARACTER HO NOKHUK --> + latin:keyLabel="ฤ" + latin:keyLabelFlags="fontNormal" /> + <!-- U+0E06: "ฆ" THAI CHARACTER KHO RAKHANG --> <Key - latin:keyLabel="ฮ" /> - <!-- U+0E12: "ฒ" THAI CHARACTER THO PHUTHAO --> + latin:keyLabel="ฆ" + latin:keyLabelFlags="fontNormal" /> + <!-- U+0E0F: "ฏ" THAI CHARACTER TO PATAK --> <Key - latin:keyLabel="ฒ" /> - <!-- U+0E2C: "ฬ" THAI CHARACTER LO CHULA --> + latin:keyLabel="ฏ" + latin:keyLabelFlags="fontNormal" /> + <!-- U+0E42: "โ" THAI CHARACTER SARA O --> <Key - latin:keyLabel="ฬ" /> - <!-- U+0E26: "ฦ" THAI CHARACTER LU --> + latin:keyLabel="โ" + latin:keyLabelFlags="fontNormal" /> + <!-- U+0E0C: "ฌ" THAI CHARACTER CHO CHOE --> <Key - latin:keyLabel="ฦ" /> - <!-- U+0E4C: " ์" THAI CHARACTER THANTHAKHAT - U+0E4D: " ํ" THAI CHARACTER NIKHAHIT - U+0E3A: " ฺ" THAI CHARACTER PHINTHU --> + latin:keyLabel="ฌ" + latin:keyLabelFlags="fontNormal" /> + <!-- U+0020: " " SPACE + U+0E47: " ็" THAI CHARACTER MAITAIKHU --> + <!-- Note: The space character is needed as a preceding letter to draw some Thai + composing characters correctly. --> <Key - latin:keyLabel="์" - latin:moreKeys="ํ,ฺ" /> - <!-- U+0E47: " ็" THAI CHARACTER MAITAIKHU --> + latin:keyLabel=" ็" + latin:code="0x0E47" + latin:keyLabelFlags="fontNormal|followKeyLetterRatio" /> + <!-- U+0020: " " SPACE + U+0E4B: " ๋" THAI CHARACTER MAI CHATTAWA --> + <!-- Note: The space character is needed as a preceding letter to draw some Thai + composing characters correctly. --> + <Key + latin:keyLabel=" ๋" + latin:code="0x0E4B" + latin:keyLabelFlags="fontNormal|followKeyLetterRatio" /> + <!-- U+0E29: "ษ" THAI CHARACTER SO RUSI --> + <Key + latin:keyLabel="ษ" + latin:keyLabelFlags="fontNormal" /> + <!-- U+0E28: "ศ" THAI CHARACTER SO SALA --> + <Key + latin:keyLabel="ศ" + latin:keyLabelFlags="fontNormal" /> + <!-- U+0E0B: "ซ" THAI CHARACTER SO SO --> + <Key + latin:keyLabel="ซ" + latin:keyLabelFlags="fontNormal" /> <Key - latin:keyLabel="็" /> + latin:keyLabel="." /> </case> <default> - <!-- U+0E1C: "ผ" THAI CHARACTER PHO PHUNG --> + <!-- U+0E1F: "ฟ" THAI CHARACTER FO FAN --> <Key - latin:keyLabel="ผ" /> - <!-- U+0E1B: "ป" THAI CHARACTER PO PLA - U+0E1A: "บ" THAI CHARACTER BO BAIMAI --> + latin:keyLabel="ฟ" + latin:keyLabelFlags="fontNormal" /> + <!-- U+0E2B: "ห" THAI CHARACTER HO HIP --> <Key - latin:keyLabel="ป" - latin:moreKeys="บ" /> - <!-- U+0E2D: "อ" THAI CHARACTER O ANG --> + latin:keyLabel="ห" + latin:keyLabelFlags="fontNormal" /> + <!-- U+0E01: "ก" THAI CHARACTER KO KAI --> <Key - latin:keyLabel="อ" /> - <!-- U+0E17: "ท" THAI CHARACTER THO THAHAN --> + latin:keyLabel="ก" + latin:keyLabelFlags="fontNormal" /> + <!-- U+0E14: "ด" THAI CHARACTER DO DEK --> <Key - latin:keyLabel="ท" /> - <!-- U+0E21: "ม" THAI CHARACTER MO MA --> + latin:keyLabel="ด" + latin:keyLabelFlags="fontNormal" /> + <!-- U+0E40: "เ" THAI CHARACTER SARA E --> <Key - latin:keyLabel="ม" /> - <!-- U+0E1D: "ฝ" THAI CHARACTER FO FA --> + latin:keyLabel="เ" + latin:keyLabelFlags="fontNormal" /> + <!-- U+0020: " " SPACE + U+0E49: " ้" THAI CHARACTER MAI THO --> + <!-- Note: The space character is needed as a preceding letter to draw some Thai + composing characters correctly. --> <Key - latin:keyLabel="ฝ" /> - <!-- U+0E48: " ่" THAI CHARACTER MAI EK - U+0E49: " ้" THAI CHARACTER MAI THO - U+0E4A: " ๊" THAI CHARACTER MAI TRI - U+0E4B: " ๋" THAI CHARACTER MAI CHATTAWA --> + latin:keyLabel=" ้" + latin:code="0x0E49" + latin:keyLabelFlags="fontNormal|followKeyLetterRatio" /> + <!-- U+0020: " " SPACE + U+0E48: " ่" THAI CHARACTER MAI EK --> + <!-- Note: The space character is needed as a preceding letter to draw some Thai + composing characters correctly. --> + <Key + latin:keyLabel=" ่" + latin:code="0x0E48" + latin:keyLabelFlags="fontNormal|followKeyLetterRatio" /> + <!-- U+0E32: "า" THAI CHARACTER SARA AA --> + <Key + latin:keyLabel="า" + latin:keyLabelFlags="fontNormal" /> + <!-- U+0E2A: "ส" THAI CHARACTER SO SUA --> + <Key + latin:keyLabel="ส" + latin:keyLabelFlags="fontNormal" /> + <!-- U+0E27: "ว" THAI CHARACTER WO WAEN --> + <Key + latin:keyLabel="ว" + latin:keyLabelFlags="fontNormal" /> + <!-- U+0E07: "ง" THAI CHARACTER NGO NGU --> <Key - latin:keyLabel="่" - latin:moreKeys="้,๊,๋" /> + latin:keyLabel="ง" + latin:keyLabelFlags="fontNormal" /> </default> </switch> </merge> diff --git a/java/res/xml/rowkeys_thai4.xml b/java/res/xml/rowkeys_thai4.xml new file mode 100644 index 000000000..8a784242c --- /dev/null +++ b/java/res/xml/rowkeys_thai4.xml @@ -0,0 +1,122 @@ +<?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:keyboardLayoutSetElement="alphabetManualShifted|alphabetShiftLocked|alphabetShiftLockShifted" + > + <Key + latin:keyLabel="(" /> + <Key + latin:keyLabel=")" /> + <!-- U+0E09: "ฉ" THAI CHARACTER CHO CHING --> + <Key + latin:keyLabel="ฉ" + latin:keyLabelFlags="fontNormal" /> + <!-- U+0E2E: "ฮ" THAI CHARACTER HO NOKHUK --> + <Key + latin:keyLabel="ฮ" + latin:keyLabelFlags="fontNormal" /> + <!-- U+0020: " " SPACE + U+0E3A: " ฺ" THAI CHARACTER PHINTHU --> + <!-- Note: The space character is needed as a preceding letter to draw some Thai + composing characters correctly. --> + <Key + latin:keyLabel=" ฺ" + latin:code="0x0E3A" + latin:keyLabelFlags="fontNormal|followKeyLetterRatio" /> + <!-- U+0020: " " SPACE + U+0E4C: " ์" THAI CHARACTER THANTHAKHAT --> + <!-- Note: The space character is needed as a preceding letter to draw some Thai + composing characters correctly. --> + <Key + latin:keyLabel=" ์" + latin:code="0x0E4C" + latin:keyLabelFlags="fontNormal|followKeyLetterRatio" /> + <Key + latin:keyLabel="\?" /> + <!-- U+0E12: "ฒ" THAI CHARACTER THO PHUTHAO --> + <Key + latin:keyLabel="ฒ" + latin:keyLabelFlags="fontNormal" /> + <!-- U+0E2C: "ฬ" THAI CHARACTER LO CHULA --> + <Key + latin:keyLabel="ฬ" + latin:keyLabelFlags="fontNormal" /> + <!-- U+0E26: "ฦ" THAI CHARACTER LU --> + <Key + latin:keyLabel="ฦ" + latin:keyLabelFlags="fontNormal" /> + </case> + <default> + <!-- U+0E1C: "ผ" THAI CHARACTER PHO PHUNG --> + <Key + latin:keyLabel="ผ" + latin:keyLabelFlags="fontNormal" /> + <!-- U+0E1B: "ป" THAI CHARACTER PO PLA --> + <Key + latin:keyLabel="ป" + latin:keyLabelFlags="fontNormal" /> + <!-- U+0E41: "แ" THAI CHARACTER SARA AE --> + <Key + latin:keyLabel="แ" + latin:keyLabelFlags="fontNormal" /> + <!-- U+0E2D: "อ" THAI CHARACTER O ANG --> + <Key + latin:keyLabel="อ" + latin:keyLabelFlags="fontNormal" /> + <!-- U+0020: " " SPACE + U+0E34: " ิ" THAI CHARACTER SARA I --> + <!-- Note: The space character is needed as a preceding letter to draw some Thai + composing characters correctly. --> + <Key + latin:keyLabel=" ิ" + latin:code="0x0E34" + latin:keyLabelFlags="fontNormal|followKeyLetterRatio" /> + <!-- U+0020: " " SPACE + U+0E37: " ื" THAI CHARACTER SARA UEE --> + <!-- Note: The space character is needed as a preceding letter to draw some Thai + composing characters correctly. --> + <Key + latin:keyLabel=" ื" + latin:code="0x0E37" + latin:keyLabelFlags="fontNormal|followKeyLetterRatio" /> + <!-- U+0E17: "ท" THAI CHARACTER THO THAHAN --> + <Key + latin:keyLabel="ท" + latin:keyLabelFlags="fontNormal" /> + <!-- U+0E21: "ม" THAI CHARACTER MO MA --> + <Key + latin:keyLabel="ม" + latin:keyLabelFlags="fontNormal" /> + <!-- U+0E43: "ใ" THAI CHARACTER SARA AI MAIMUAN --> + <Key + latin:keyLabel="ใ" + latin:keyLabelFlags="fontNormal" /> + <!-- U+0E1D: "ฝ" THAI CHARACTER FO FA --> + <Key + latin:keyLabel="ฝ" + latin:keyLabelFlags="fontNormal" /> + </default> + </switch> +</merge> diff --git a/java/res/xml/rows_thai.xml b/java/res/xml/rows_thai.xml index 6b80df640..108b7e1fc 100644 --- a/java/res/xml/rows_thai.xml +++ b/java/res/xml/rows_thai.xml @@ -24,31 +24,34 @@ <include latin:keyboardLayout="@xml/key_styles_common" /> <Row - latin:keyWidth="10%p" + latin:keyWidth="8.3333%p" > <include latin:keyboardLayout="@xml/rowkeys_thai1" /> </Row> <Row - latin:keyWidth="10%p" + latin:keyWidth="8.3333%p" > <include - latin:keyboardLayout="@xml/rowkeys_thai2" - latin:keyXPos="5%p" /> + latin:keyboardLayout="@xml/rowkeys_thai2" /> </Row> <Row - latin:keyWidth="10%p" + latin:keyWidth="8.3333%p" > - <Key - latin:keyStyle="shiftKeyStyle" - latin:keyWidth="15%p" - latin:visualInsetsRight="1%p" /> <include latin:keyboardLayout="@xml/rowkeys_thai3" /> + <include + latin:keyboardLayout="@xml/key_thai_kho_khuat" /> + </Row> + <Row + latin:keyWidth="8.3333%p" + > + <Key + latin:keyStyle="shiftKeyStyle" /> + <include + latin:keyboardLayout="@xml/rowkeys_thai4" /> <Key - latin:keyStyle="deleteKeyStyle" - latin:keyWidth="fillRight" - latin:visualInsetsLeft="1%p" /> + latin:keyStyle="deleteKeyStyle" /> </Row> <include latin:keyboardLayout="@xml/row_qwerty4" /> diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardView.java b/java/src/com/android/inputmethod/keyboard/KeyboardView.java index 0b4d70632..5b02f9f5a 100644 --- a/java/src/com/android/inputmethod/keyboard/KeyboardView.java +++ b/java/src/com/android/inputmethod/keyboard/KeyboardView.java @@ -647,7 +647,7 @@ public class KeyboardView extends View implements PointerTracker.DrawingProxy { // Draw key icon. if (key.mLabel == null && icon != null) { - final int iconWidth = icon.getIntrinsicWidth(); + final int iconWidth = Math.min(icon.getIntrinsicWidth(), keyWidth); final int iconHeight = icon.getIntrinsicHeight(); final int iconX, alignX; final int iconY = (keyHeight - iconHeight) / 2; |