am 074e9812: Merge "Add Tamil keyboard"

* commit '074e9812eea43bfa562d5bac8b5611ccf403000f':
  Add Tamil keyboard
main
Tadashi G. Takaoka 2014-07-08 10:10:05 +00:00 committed by Android Git Automerger
commit 70937a9c9d
14 changed files with 628 additions and 72 deletions

View File

@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
**
** Copyright 2014, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<merge xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin">
<include latin:keyboardLayout="@xml/key_styles_common" />
<Row
latin:keyWidth="8.182%p"
latin:keyLabelFlags="fontNormal|autoXScale"
>
<include latin:keyboardLayout="@xml/rowkeys_tamil1" />
<Key
latin:keyStyle="deleteKeyStyle"
latin:keyWidth="fillRight" />
</Row>
<Row
latin:keyWidth="8.182%p"
latin:keyLabelFlags="fontNormal|autoXScale"
>
<include latin:keyboardLayout="@xml/rowkeys_tamil2" />
<Key
latin:keyStyle="enterKeyStyle"
latin:keyWidth="fillRight" />
</Row>
<Row
latin:keyWidth="8.182%p"
latin:keyLabelFlags="fontNormal|autoXScale"
>
<include latin:keyboardLayout="@xml/rowkeys_tamil3" />
<include latin:keyboardLayout="@xml/keys_exclamation_question" />
</Row>
<include latin:keyboardLayout="@xml/row_qwerty4" />
</merge>

View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
**
** Copyright 2014, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<Keyboard
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
>
<include
latin:keyboardLayout="@xml/rows_tamil" />
</Keyboard>

View File

@ -18,15 +18,10 @@
*/
-->
<merge
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
>
<merge xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin">
<switch>
<case
latin:passwordInput="true"
>
<include
latin:keyboardLayout="@xml/key_styles_currency_dollar" />
<case latin:passwordInput="true">
<include latin:keyboardLayout="@xml/key_styles_currency_dollar" />
</case>
<!-- Countries using Euro currency, 23 countries as of November 2012.
1. Andorra (ca_AD, ca_ES)
@ -52,11 +47,8 @@
21. Slovenia (sl_SI)
22. Spain (es_ES, ca_ES, eu_ES, gl_ES)
23. Vatican City (it_VA) -->
<case
latin:countryCode="AD|AT|BE|CY|EE|FI|FR|DE|GR|IE|IT|XK|LU|MT|MO|ME|NL|PT|SM|SK|SI|ES|VA"
>
<include
latin:keyboardLayout="@xml/key_styles_currency_euro" />
<case latin:countryCode="AD|AT|BE|CY|EE|FI|FR|DE|GR|IE|IT|XK|LU|MT|MO|ME|NL|PT|SM|SK|SI|ES|VA">
<include latin:keyboardLayout="@xml/key_styles_currency_euro" />
</case>
<!-- Note: Some subtype locale may not have country code, and it it supposed to indicate the
country where the language originally/mainly spoken. -->
@ -76,26 +68,54 @@
sl: Slovenia (sl_SL)
sv: Sweden (sv_SV)
tr: Trukey (tr_TR) -->
<case
latin:localeCode="da|de|es|el|fi|fr|it|nl|sk|sl|sv|tr"
>
<include
latin:keyboardLayout="@xml/key_styles_currency_euro" />
<case latin:localeCode="da|de|es|el|fi|fr|it|nl|sk|sl|sv|tr">
<include latin:keyboardLayout="@xml/key_styles_currency_euro" />
</case>
<!-- ca: Catalan (Andorra, Spain)
et: Estonian (Estonia)
lb: Luxembougish (Luxembourg)
mt: Maltese (Malta) -->
<case
latin:languageCode="ca|et|lb|mt"
>
<include
latin:keyboardLayout="@xml/key_styles_currency_euro" />
<case latin:languageCode="ca|et|lb|mt">
<include latin:keyboardLayout="@xml/key_styles_currency_euro" />
</case>
<!-- fa: Persian (Rial and Afgahni)
hi: Hindi (Indian Rupee)
iw: Hebrew (New Sheqel)
lo: Lao (Kip)
mn: Mongolian (Tugrik)
ne: Nepali (Nepalese Rupee)
ta_IN: Tamil (Tamil Rupee)
th: Thai (Baht)
uk: Ukrainian (Hryvnia)
vi: Vietnamese (Dong) -->
<!-- TODO: The currency sign of Turkish Lira was created in 2012 and assigned U+20BA for
its unicode, although there is no font glyph for it as of November 2012. -->
<!-- TODO: The currency sign of Armenian Dram was created in 2012 and assigned U+058F for
its unicode, although there is no font glyph for it as of September 2013. -->
<case latin:languageCode="fa|hi|iw|lo|mn|ne|ta|th|uk|vi">
<!-- U+00A3: "£" POUND SIGN
U+20AC: "€" EURO SIGN
U+00A2: "¢" CENT SIGN -->
<key-style
latin:styleName="currencyKeyStyle"
latin:keySpec="!text/keyspec_currency"
latin:moreKeys="!text/morekeys_currency" />
<key-style
latin:styleName="moreCurrency1KeyStyle"
latin:keySpec="&#x00A3;" />
<key-style
latin:styleName="moreCurrency2KeyStyle"
latin:keySpec="&#x20AC;" />
<key-style
latin:styleName="moreCurrency3KeyStyle"
latin:keySpec="$"
latin:moreKeys="&#x00A2;" />
<key-style
latin:styleName="moreCurrency4KeyStyle"
latin:keySpec="&#x00A2;" />
</case>
<!-- IN: India (Rupee) -->
<case
latin:countryCode="IN"
>
<case latin:countryCode="IN">
<!-- U+20B9: "₹" INDIAN RUPEE SIGN
U+00A3: "£" POUND SIGN
U+20AC: "€" EURO SIGN
@ -118,48 +138,8 @@
latin:styleName="moreCurrency4KeyStyle"
latin:keySpec="&#x00A2;" />
</case>
<!-- bn: Bengali (Bangladesh Taka)
fa: Persian (Rial and Afgahni)
hi: Hindi (Indian Rupee)
iw: Hebrew (New Sheqel)
lo: Lao (Kip)
mn: Mongolian (Tugrik)
ne: Nepali (Nepalese Rupee)
th: Thai (Baht)
uk: Ukrainian (Hryvnia)
vi: Vietnamese (Dong) -->
<!-- TODO: The currency sign of Turkish Lira was created in 2012 and assigned U+20BA for
its unicode, although there is no font glyph for it as of November 2012. -->
<!-- TODO: The currency sign of Armenian Dram was created in 2012 and assigned U+058F for
its unicode, although there is no font glyph for it as of September 2013. -->
<case
latin:languageCode="bn|fa|hi|iw|lo|mn|ne|th|uk|vi"
>
<!-- U+00A3: "£" POUND SIGN
U+20AC: "€" EURO SIGN
U+00A2: "¢" CENT SIGN -->
<key-style
latin:styleName="currencyKeyStyle"
latin:keySpec="!text/keyspec_currency"
latin:moreKeys="!text/morekeys_currency" />
<key-style
latin:styleName="moreCurrency1KeyStyle"
latin:keySpec="&#x00A3;" />
<key-style
latin:styleName="moreCurrency2KeyStyle"
latin:keySpec="&#x20AC;" />
<key-style
latin:styleName="moreCurrency3KeyStyle"
latin:keySpec="$"
latin:moreKeys="&#x00A2;" />
<key-style
latin:styleName="moreCurrency4KeyStyle"
latin:keySpec="&#x00A2;" />
</case>
<!-- GB: United Kingdom (Pound) -->
<case
latin:countryCode="GB"
>
<case latin:countryCode="GB">
<!-- U+00A3: "£" POUND SIGN
U+20AC: "€" EURO SIGN
U+00A5: "¥" YEN SIGN
@ -185,8 +165,7 @@
</case>
<!-- ar: Arabic (Dollar and Rial) -->
<default>
<include
latin:keyboardLayout="@xml/key_styles_currency_dollar" />
<include latin:keyboardLayout="@xml/key_styles_currency_dollar" />
</default>
</switch>
</merge>

View File

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
**
** Copyright 2014, 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.
*/
-->
<KeyboardLayoutSet
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin">
<Element
latin:elementName="alphabet"
latin:elementKeyboard="@xml/kbd_tamil"
latin:enableProximityCharsCorrection="true" />
<Element
latin:elementName="symbols"
latin:elementKeyboard="@xml/kbd_symbols" />
<Element
latin:elementName="symbolsShifted"
latin:elementKeyboard="@xml/kbd_symbols_shift" />
<Element
latin:elementName="phone"
latin:elementKeyboard="@xml/kbd_phone" />
<Element
latin:elementName="phoneSymbols"
latin:elementKeyboard="@xml/kbd_phone_symbols" />
<Element
latin:elementName="number"
latin:elementKeyboard="@xml/kbd_number" />
</KeyboardLayoutSet>

View File

@ -89,6 +89,7 @@
(sr-Latn: Serbian/qwerty) # not yet implemented.
sv: Swedish/nordic
sw: Swahili/qwerty
(ta: Tamil/tamil) # This is a preliminary keyboard layout.
th: Thai/thai
tl: Tagalog/spanish
tr: Turkish/qwerty
@ -666,6 +667,16 @@
android:imeSubtypeExtraValue="KeyboardLayoutSet=qwerty,AsciiCapable,EmojiCapable"
android:isAsciiCapable="true"
/>
<!-- TODO: This tamil keyboard is a preliminary layout.
This isn't based on the final specification. -->
<subtype android:icon="@drawable/ic_ime_switcher_dark"
android:label="@string/subtype_generic"
android:subtypeId="0x67acea2a"
android:imeSubtypeLocale="ta_IN"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="KeyboardLayoutSet=tamil,EmojiCapable"
android:isAsciiCapable="false"
/>
<subtype android:icon="@drawable/ic_ime_switcher_dark"
android:label="@string/subtype_generic"
android:subtypeId="0x1f94d5d4"

View File

@ -0,0 +1,74 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
**
** Copyright 2014, 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+0B94: "ஔ" TAMIL LETTER AU -->
<Key
latin:keySpec="&#x0B94;"
latin:keyHintLabel="1"
latin:additionalMoreKeys="1" />
<!-- U+0B90: "ஐ" TAMIL LETTER AI -->
<Key
latin:keySpec="&#x0B90;"
latin:keyHintLabel="2"
latin:additionalMoreKeys="2" />
<!-- U+0B86: "ஆ" TAMIL LETTER AA -->
<Key
latin:keySpec="&#x0B86;"
latin:keyHintLabel="3"
latin:additionalMoreKeys="3" />
<!-- U+0B88: "ஈ" TAMIL LETTER II -->
<Key
latin:keySpec="&#x0B88;"
latin:keyHintLabel="4"
latin:additionalMoreKeys="4" />
<!-- U+0B8A: "ஊ" TAMIL LETTER UU -->
<Key
latin:keySpec="&#x0B8A;"
latin:keyHintLabel="5"
latin:additionalMoreKeys="5" />
<!-- U+0BAE: "ம" TAMIL LETTER MA -->
<Key
latin:keySpec="&#x0BAE;"
latin:keyHintLabel="6"
latin:additionalMoreKeys="6" />
<!-- U+0BA9: "ன" TAMIL LETTER NNNA -->
<Key
latin:keySpec="&#x0BA9;"
latin:keyHintLabel="7"
latin:additionalMoreKeys="7" />
<!-- U+0BA8: "ந" TAMIL LETTER NA -->
<Key
latin:keySpec="&#x0BA8;"
latin:keyHintLabel="8"
latin:additionalMoreKeys="8" />
<!-- U+0B99: "ங" TAMIL LETTER NGA -->
<Key
latin:keySpec="&#x0B99;"
latin:keyHintLabel="9"
latin:additionalMoreKeys="9" />
<!-- U+0BA3: "ண" TAMIL LETTER NNA -->
<Key
latin:keySpec="&#x0BA3;"
latin:keyHintLabel="0"
latin:additionalMoreKeys="0" />
<!-- U+0B9E: "ஞ" TAMIL LETTER NYA -->
<Key latin:keySpec="&#x0B9E;" />
</merge>

View File

@ -0,0 +1,58 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
**
** Copyright 2014, 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+0B93: "ஓ" TAMIL LETTER OO
U+0BD0: "ௐ" TAMIL OM -->
<Key
latin:keySpec="&#x0B93;"
latin:moreKeys="&#x0BD0;" />
<!-- U+0B8F: "ஏ" TAMIL LETTER EE -->
<Key latin:keySpec="&#x0B8F;" />
<!-- U+0B85: "அ" TAMIL LETTER A
U+0B83: "ஃ" TAMIL SIGN VISARGA -->
<Key
latin:keySpec="&#x0B85;"
latin:moreKeys="&#x0B83;" />
<!-- U+0B87: "இ" TAMIL LETTER I -->
<Key latin:keySpec="&#x0B87;" />
<!-- U+0B89: "உ" TAMIL LETTER U -->
<Key latin:keySpec="&#x0B89;" />
<!-- U+0BB1: "ற" TAMIL LETTER RRA -->
<Key latin:keySpec="&#x0BB1;" />
<!-- U+0BAA: "ப" TAMIL LETTER PA -->
<Key latin:keySpec="&#x0BAA;" />
<!-- U+0B95: "க" TAMIL LETTER KA
U+0BB9: "ஹ" TAMIL LETTER HA
U+0B95/U+0BCD/U+0BB7: "க்ஷ" TAMIL LETTER KA/TAMIL SIGN VIRAMA/TAMIL LETTER SSA -->
<Key
latin:keySpec="&#x0B95;"
latin:moreKeys="&#x0BB9;,&#x0B95;&#x0BCD;&#x0BB7;" />
<!-- U+0BA4: "த" TAMIL LETTER TA -->
<Key latin:keySpec="&#x0BA4;" />
<!-- U+0B9A: "ச" TAMIL LETTER CA
U+0BB8: "ஸ" TAMIL LETTER SA
U+0BB6/U+0BCD/U+0BB0/U+0BC0: "ஶ்ரீ" TAMIL LETTER SHA/TAMIL SIGN VIRAMA/TAMIL LETTER RA/TAMIL VOWEL SIGN II -->
<Key
latin:keySpec="&#x0B9A;"
latin:moreKeys="&#x0BB8;,&#x0BB6;&#x0BCD;&#x0BB0;&#x0BC0;" />
<!-- U+0B9F: "ட" TAMIL LETTER TTA -->
<Key latin:keySpec="&#x0B9F;" />
</merge>

View File

@ -0,0 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
**
** Copyright 2014, 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+0B92: "ஒ" TAMIL LETTER O -->
<Key latin:keySpec="&#x0B92;" />
<!-- U+0B8E: "எ" TAMIL LETTER E -->
<Key latin:keySpec="&#x0B8E;" />
<!-- U+0BCD: "்" TAMIL SIGN VIRAMA -->
<Key latin:keySpec="&#x0BCD;" />
<!-- U+0BB0: "ர" TAMIL LETTER RA -->
<Key latin:keySpec="&#x0BB0;" />
<!-- U+0BB5: "வ" TAMIL LETTER VA -->
<Key latin:keySpec="&#x0BB5;" />
<!-- U+0BB4: "ழ TAMIL LETTER LLLA -->
<Key latin:keySpec="&#x0BB4;" />
<!-- U+0BB2: "ல" TAMIL LETTER LA -->
<Key latin:keySpec="&#x0BB2;" />
<!-- U+0BB3: "ள" TAMIL LETTER LLA -->
<Key latin:keySpec="&#x0BB3;" />
<!-- U+0BAF: "ய" TAMIL LETTER YA -->
<Key latin:keySpec="&#x0BAF;" />
<!-- U+0BB7: "ஷ" TAMIL LETTER SSA
U+0B9C: "ஜ" TAMIL LETTER JA -->
<Key
latin:keySpec="&#x0BB7;"
latin:moreKeys="&#x0B9C;" />
</merge>

View File

@ -0,0 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
**
** Copyright 2014, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<merge xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin">
<include latin:keyboardLayout="@xml/key_styles_common" />
<Row
latin:keyWidth="9.091%p"
latin:keyLabelFlags="fontNormal|autoXScale"
>
<include latin:keyboardLayout="@xml/rowkeys_tamil1" />
</Row>
<Row
latin:keyWidth="9.091%p"
latin:keyLabelFlags="fontNormal|autoXScale"
>
<include latin:keyboardLayout="@xml/rowkeys_tamil2" />
</Row>
<Row
latin:keyWidth="9.091%p"
latin:keyLabelFlags="fontNormal|autoXScale"
>
<include latin:keyboardLayout="@xml/rowkeys_tamil3" />
<Key
latin:keyStyle="deleteKeyStyle"
latin:keyWidth="fillRight" />
</Row>
<include latin:keyboardLayout="@xml/row_qwerty4" />
</merge>

View File

@ -88,7 +88,7 @@ public final class KeyboardTextsTable {
/* 2:30 */ "morekeys_u",
/* 3:29 */ "morekeys_e",
/* 4:28 */ "morekeys_i",
/* 5:24 */ "keylabel_to_alpha",
/* 5:25 */ "keylabel_to_alpha",
/* 6:23 */ "morekeys_c",
/* 7:23 */ "double_quotes",
/* 8:22 */ "morekeys_n",
@ -97,7 +97,7 @@ public final class KeyboardTextsTable {
/* 11:14 */ "morekeys_y",
/* 12:13 */ "morekeys_d",
/* 13:12 */ "morekeys_z",
/* 14:11 */ "keyspec_currency",
/* 14:12 */ "keyspec_currency",
/* 15:10 */ "morekeys_t",
/* 16:10 */ "morekeys_l",
/* 17: 9 */ "morekeys_g",
@ -3378,6 +3378,23 @@ public final class KeyboardTextsTable {
/* morekeys_g */ "g\'",
};
/* Locale ta_IN: Tamil (India) */
private static final String[] TEXTS_ta_IN = {
/* morekeys_a ~ */
null, null, null, null, null,
/* ~ morekeys_i */
// Label for "switch to alphabetic" key.
// U+0BA4: "த" TAMIL LETTER TA
// U+0BAE/U+0BBF: "மி" TAMIL LETTER MA/TAMIL VOWEL SIGN I
// U+0BB4/U+0BCD: "ழ்" TAMIL LETTER LLLA/TAMIL SIGN VIRAMA
/* keylabel_to_alpha */ "\u0BA4\u0BAE\u0BBF\u0BB4\u0BCD",
/* morekeys_c ~ */
null, null, null, null, null, null, null, null,
/* ~ morekeys_z */
// U+0BF9: "௹" TAMIL RUPEE SIGN
/* keyspec_currency */ "\u0BF9",
};
/* Locale th: Thai */
private static final String[] TEXTS_th = {
/* morekeys_a ~ */
@ -3871,6 +3888,7 @@ public final class KeyboardTextsTable {
"sr" , TEXTS_sr, /* 11/ 94 Serbian */
"sv" , TEXTS_sv, /* 21/ 54 Swedish */
"sw" , TEXTS_sw, /* 9/ 18 Swahili */
"ta_IN" , TEXTS_ta_IN, /* 2/ 15 Tamil (India) */
"th" , TEXTS_th, /* 2/ 15 Thai */
"tl" , TEXTS_tl, /* 7/ 9 Tagalog */
"tr" , TEXTS_tr, /* 7/ 18 Turkish */

View File

@ -25,7 +25,7 @@ import java.util.ArrayList;
@SmallTest
public class KeyboardLayoutSetSubtypesCountTests extends KeyboardLayoutSetTestsBase {
private static final int NUMBER_OF_SUBTYPES = 73;
private static final int NUMBER_OF_SUBTYPES = 74;
private static final int NUMBER_OF_ASCII_CAPABLE_SUBTYPES = 45;
private static final int NUMBER_OF_PREDEFINED_ADDITIONAL_SUBTYPES = 2;

View File

@ -0,0 +1,144 @@
/*
* Copyright (C) 2014 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.
*/
package com.android.inputmethod.keyboard.layout;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
import com.android.inputmethod.latin.Constants;
import java.util.Locale;
/**
* The Tamil keyboard.
*/
public final class Tamil extends LayoutBase {
private static final String LAYOUT_NAME = "tamil";
public Tamil(final LayoutCustomizer customizer) {
super(customizer, Symbols.class, SymbolsShifted.class);
}
@Override
public String getName() { return LAYOUT_NAME; }
public static class TamilCustomizer extends LayoutCustomizer {
public TamilCustomizer(final Locale locale) { super(locale); }
@Override
public ExpectedKey getAlphabetKey() { return TAMIL_ALPHABET_KEY; }
@Override
public ExpectedKey getCurrencyKey() { return CURRENCY_RUPEE; }
@Override
public ExpectedKey[] getOtherCurrencyKeys() {
return SymbolsShifted.CURRENCIES_OTHER_GENERIC;
}
@Override
public ExpectedKey[] getLeftShiftKeys(final boolean isPhone) {
return EMPTY_KEYS;
}
// U+0BA4: "த" TAMIL LETTER TA
// U+0BAE/U+0BBF: "மி" TAMIL LETTER MA/TAMIL VOWEL SIGN I
// U+0BB4/U+0BCD: "ழ்" TAMIL LETTER LLLA/TAMIL SIGN VIRAMA
private static final ExpectedKey TAMIL_ALPHABET_KEY = key(
"\u0BA4\u0BAE\u0BBF\u0BB4\u0BCD", Constants.CODE_SWITCH_ALPHA_SYMBOL);
// U+0BF9: "௹" TAMIL RUPEE SIGN
private static final ExpectedKey CURRENCY_RUPEE = key("\u0BF9",
Symbols.CURRENCY_GENERIC_MORE_KEYS);
}
@Override
ExpectedKey[][] getCommonAlphabetLayout(boolean isPhone) { return ALPHABET_COMMON; }
@Override
ExpectedKey[][] getCommonAlphabetShiftLayout(boolean isPhone, final int elementId) {
return null;
}
private static final ExpectedKey[][] ALPHABET_COMMON = new ExpectedKeyboardBuilder()
.setKeysOfRow(1,
// U+0B94: "ஔ" TAMIL LETTER AU
key("\u0B94", moreKey("1")),
// U+0B90: "ஐ" TAMIL LETTER AI
key("\u0B90", moreKey("2")),
// U+0B86: "ஆ" TAMIL LETTER AA
key("\u0B86", moreKey("3")),
// U+0B88: "ஈ" TAMIL LETTER II
key("\u0B88", moreKey("4")),
// U+0B8A: "ஊ" TAMIL LETTER UU
key("\u0B8A", moreKey("5")),
// U+0BAE: "ம" TAMIL LETTER MA
key("\u0BAE", moreKey("6")),
// U+0BA9: "ன" TAMIL LETTER NNNA
key("\u0BA9", moreKey("7")),
// U+0BA8: "ந" TAMIL LETTER NA
key("\u0BA8", moreKey("8")),
// U+0B99: "ங" TAMIL LETTER NGA
key("\u0B99", moreKey("9")),
// U+0BA3: "ண" TAMIL LETTER NNA
key("\u0BA3", moreKey("0")),
// U+0B9E: "ஞ" TAMIL LETTER NYA
"\u0B9E")
.setKeysOfRow(2,
// U+0B93: "ஓ" TAMIL LETTER OO
// U+0BD0: "ௐ" TAMIL OM
key("\u0B93", moreKey("\u0BD0")),
// U+0B8F: "ஏ" TAMIL LETTER EE
"\u0B8F",
// U+0B85: "அ" TAMIL LETTER A
// U+0B83: "ஃ" TAMIL SIGN VISARGA
key("\u0B85", moreKey("\u0B83")),
// U+0B87: "இ" TAMIL LETTER I
// U+0B89: "உ" TAMIL LETTER U
// U+0BB1: "ற" TAMIL LETTER RRA
// U+0BAA: "ப" TAMIL LETTER PA
"\u0B87", "\u0B89", "\u0BB1", "\u0BAA",
// U+0B95: "க" TAMIL LETTER KA
// U+0BB9: "ஹ" TAMIL LETTER HA
// U+0B95/U+0BCD/U+0BB7:
// "க்ஷ" TAMIL LETTER KA/TAMIL SIGN VIRAMA/TAMIL LETTER SSA
key("\u0B95", joinMoreKeys("\u0BB9", "\u0B95\u0BCD\u0BB7")),
// U+0BA4: "த" TAMIL LETTER TA
"\u0BA4",
// U+0B9A: "ச" TAMIL LETTER CA
// U+0BB8: "ஸ" TAMIL LETTER SA
// U+0BB6/U+0BCD/U+0BB0/U+0BC0:
// "ஶ்ரீ" TAMIL LETTER SHA/TAMIL SIGN VIRAMA/TAMIL LETTER RA
// /TAMIL VOWEL SIGN II
key("\u0B9A", joinMoreKeys("\u0BB8", "\u0BB6\u0BCD\u0BB0\u0BC0")),
// U+0B9F: "ட" TAMIL LETTER TTA
"\u0B9F")
.setKeysOfRow(3,
// U+0B92: "ஒ" TAMIL LETTER O
// U+0B8E: "எ" TAMIL LETTER E
// U+0BCD: "்" TAMIL SIGN VIRAMA
// U+0BB0: "ர" TAMIL LETTER RA
// U+0BB5: "வ" TAMIL LETTER VA
// U+0BB4: "ழ TAMIL LETTER LLLA
// U+0BB2: "ல" TAMIL LETTER LA
// U+0BB3: "ள" TAMIL LETTER LLA
// U+0BAF: "ய" TAMIL LETTER YA
"\u0B92", "\u0B8E", "\u0BCD", "\u0BB0", "\u0BB5", "\u0BB4", "\u0BB2", "\u0BB3",
"\u0BAF",
// U+0BB7: "ஷ" TAMIL LETTER SSA
// U+0B9C: "ஜ" TAMIL LETTER JA
key("\u0BB7", moreKey("\u0B9C")))
.build();
}

View File

@ -0,0 +1,37 @@
/*
* Copyright (C) 2014 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.
*/
package com.android.inputmethod.keyboard.layout.tests;
import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
import com.android.inputmethod.keyboard.layout.Tamil;
import com.android.inputmethod.keyboard.layout.Tamil.TamilCustomizer;
import java.util.Locale;
/**
* ta_IN: Tamil (India)/tamil
*/
@SmallTest
public final class TestsTamilIN extends LayoutTestsBase {
private static final Locale LOCALE = new Locale("ta", "IN");
private static final LayoutBase LAYOUT = new Tamil(new TamilCustomizer(LOCALE));
@Override
LayoutBase getLayout() { return LAYOUT; }
}

View File

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
**
** Copyright 2014, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Label for "switch to alphabetic" key.
U+0BA4: "த" TAMIL LETTER TA
U+0BAE/U+0BBF: "மி" TAMIL LETTER MA/TAMIL VOWEL SIGN I
U+0BB4/U+0BCD: "ழ்" TAMIL LETTER LLLA/TAMIL SIGN VIRAMA -->
<string name="keylabel_to_alpha">&#x0BA4;&#x0BAE;&#x0BBF;&#x0BB4;&#x0BCD;</string>
<!-- U+0BF9: "௹" TAMIL RUPEE SIGN -->
<string name="keyspec_currency">&#x0BF9;</string>
</resources>