aboutsummaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
Diffstat (limited to 'java')
-rw-r--r--java/AndroidManifest.xml11
-rw-r--r--java/proguard.flags7
-rw-r--r--java/res/values-v20/platform-theme.xml29
-rw-r--r--java/res/values/platform-theme.xml24
-rw-r--r--java/res/values/strings.xml8
-rw-r--r--java/res/xml-sw600dp/keys_comma_period.xml29
-rw-r--r--java/res/xml-sw600dp/rows_hindi_compact.xml54
-rw-r--r--java/res/xml-v16/keystyle_devanagari_sign_anusvara.xml50
-rw-r--r--java/res/xml-v16/keystyle_devanagari_sign_candrabindu.xml (renamed from java/res/xml-v16/key_devanagari_sign_candrabindu.xml)5
-rw-r--r--java/res/xml-v16/keystyle_devanagari_sign_nukta.xml (renamed from java/res/xml-v16/key_devanagari_sign_nukta.xml)13
-rw-r--r--java/res/xml-v16/keystyle_devanagari_sign_virama.xml15
-rw-r--r--java/res/xml-v16/keystyle_devanagari_vowel_sign_aa.xml8
-rw-r--r--java/res/xml-v16/keystyle_devanagari_vowel_sign_ai.xml8
-rw-r--r--java/res/xml-v16/keystyle_devanagari_vowel_sign_au.xml8
-rw-r--r--java/res/xml-v16/keystyle_devanagari_vowel_sign_candra_e.xml (renamed from java/res/xml-v16/key_devanagari_sign_anusvara.xml)20
-rw-r--r--java/res/xml-v16/keystyle_devanagari_vowel_sign_candra_o.xml (renamed from java/res/xml-v16/key_devanagari_vowel_sign_candra_o.xml)18
-rw-r--r--java/res/xml-v16/keystyle_devanagari_vowel_sign_e.xml8
-rw-r--r--java/res/xml-v16/keystyle_devanagari_vowel_sign_i.xml8
-rw-r--r--java/res/xml-v16/keystyle_devanagari_vowel_sign_ii.xml8
-rw-r--r--java/res/xml-v16/keystyle_devanagari_vowel_sign_o.xml10
-rw-r--r--java/res/xml-v16/keystyle_devanagari_vowel_sign_u.xml8
-rw-r--r--java/res/xml-v16/keystyle_devanagari_vowel_sign_uu.xml8
-rw-r--r--java/res/xml-v16/keystyle_devanagari_vowel_sign_vocalic_r.xml (renamed from java/res/xml-v16/key_devanagari_vowel_sign_vocalic_r.xml)14
-rw-r--r--java/res/xml/kbd_hindi_compact.xml26
-rw-r--r--java/res/xml/key_period.xml11
-rw-r--r--java/res/xml/keyboard_layout_set_hindi_compact.xml42
-rw-r--r--java/res/xml/keystyle_devanagari_sign_anusvara.xml52
-rw-r--r--java/res/xml/keystyle_devanagari_sign_candrabindu.xml (renamed from java/res/xml/key_devanagari_sign_candrabindu.xml)5
-rw-r--r--java/res/xml/keystyle_devanagari_sign_nukta.xml (renamed from java/res/xml/key_devanagari_sign_nukta.xml)14
-rw-r--r--java/res/xml/keystyle_devanagari_sign_virama.xml16
-rw-r--r--java/res/xml/keystyle_devanagari_vowel_sign_aa.xml9
-rw-r--r--java/res/xml/keystyle_devanagari_vowel_sign_ai.xml9
-rw-r--r--java/res/xml/keystyle_devanagari_vowel_sign_au.xml11
-rw-r--r--java/res/xml/keystyle_devanagari_vowel_sign_candra_e.xml (renamed from java/res/xml/key_devanagari_sign_anusvara.xml)22
-rw-r--r--java/res/xml/keystyle_devanagari_vowel_sign_candra_o.xml (renamed from java/res/xml/key_devanagari_vowel_sign_candra_o.xml)19
-rw-r--r--java/res/xml/keystyle_devanagari_vowel_sign_e.xml9
-rw-r--r--java/res/xml/keystyle_devanagari_vowel_sign_i.xml9
-rw-r--r--java/res/xml/keystyle_devanagari_vowel_sign_ii.xml11
-rw-r--r--java/res/xml/keystyle_devanagari_vowel_sign_o.xml11
-rw-r--r--java/res/xml/keystyle_devanagari_vowel_sign_u.xml9
-rw-r--r--java/res/xml/keystyle_devanagari_vowel_sign_uu.xml9
-rw-r--r--java/res/xml/keystyle_devanagari_vowel_sign_vocalic_r.xml (renamed from java/res/xml/key_devanagari_vowel_sign_vocalic_r.xml)15
-rw-r--r--java/res/xml/method.xml11
-rw-r--r--java/res/xml/rowkeys_hindi1.xml10
-rw-r--r--java/res/xml/rowkeys_hindi3.xml25
-rw-r--r--java/res/xml/rowkeys_hindi_compact1.xml139
-rw-r--r--java/res/xml/rowkeys_hindi_compact2.xml115
-rw-r--r--java/res/xml/rowkeys_hindi_compact3.xml89
-rw-r--r--java/res/xml/rowkeys_nepali_romanized1.xml24
-rw-r--r--java/res/xml/rowkeys_nepali_romanized3.xml8
-rw-r--r--java/res/xml/rowkeys_nepali_traditional1.xml4
-rw-r--r--java/res/xml/rowkeys_nepali_traditional2.xml4
-rw-r--r--java/res/xml/rowkeys_nepali_traditional3_right3.xml8
-rw-r--r--java/res/xml/rowkeys_nepali_traditional3_right5.xml6
-rw-r--r--java/res/xml/rows_hindi_compact.xml49
-rw-r--r--java/src/com/android/inputmethod/dictionarypack/MetadataDbHelper.java41
-rw-r--r--java/src/com/android/inputmethod/latin/BinaryDictionary.java14
-rw-r--r--java/src/com/android/inputmethod/latin/ContactsBinaryDictionary.java4
-rw-r--r--java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java25
-rw-r--r--java/src/com/android/inputmethod/latin/ImportantNoticeDialog.java3
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java6
-rw-r--r--java/src/com/android/inputmethod/latin/WordComposer.java83
-rw-r--r--java/src/com/android/inputmethod/latin/debug/ExternalDictionaryGetterForDebug.java11
-rw-r--r--java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java12
-rw-r--r--java/src/com/android/inputmethod/latin/personalization/DecayingExpandableBinaryDictionaryBase.java2
-rw-r--r--java/src/com/android/inputmethod/latin/settings/AdditionalSubtypeSettings.java4
-rw-r--r--java/src/com/android/inputmethod/latin/utils/DialogUtils.java34
67 files changed, 1259 insertions, 152 deletions
diff --git a/java/AndroidManifest.xml b/java/AndroidManifest.xml
index a7e64bfaa..6f4e602ce 100644
--- a/java/AndroidManifest.xml
+++ b/java/AndroidManifest.xml
@@ -57,6 +57,7 @@
</service>
<activity android:name=".setup.SetupActivity"
+ android:theme="@style/platformActivityTheme"
android:label="@string/english_ime_name"
android:icon="@drawable/ic_launcher_keyboard"
android:launchMode="singleTask"
@@ -68,6 +69,7 @@
</activity>
<activity android:name=".setup.SetupWizardActivity"
+ android:theme="@style/platformActivityTheme"
android:label="@string/english_ime_name"
android:clearTaskOnLaunch="true">
<intent-filter>
@@ -84,6 +86,7 @@
</receiver>
<activity android:name=".settings.SettingsActivity"
+ android:theme="@style/platformActivityTheme"
android:label="@string/english_ime_settings"
android:uiOptions="splitActionBarWhenNarrow">
<intent-filter>
@@ -92,6 +95,7 @@
</activity>
<activity android:name=".spellcheck.SpellCheckerSettingsActivity"
+ android:theme="@style/platformActivityTheme"
android:label="@string/android_spell_checker_settings">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
@@ -99,6 +103,7 @@
</activity>
<activity android:name=".settings.DebugSettingsActivity"
+ android:theme="@style/platformActivityTheme"
android:label="@string/english_ime_debug_settings">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
@@ -145,8 +150,8 @@
</receiver>
<activity android:name="com.android.inputmethod.dictionarypack.DictionarySettingsActivity"
+ android:theme="@style/platformActivityTheme"
android:label="@string/dictionary_settings_title"
- android:theme="@android:style/Theme.Holo"
android:uiOptions="splitActionBarWhenNarrow">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
@@ -154,8 +159,8 @@
</activity>
<activity android:name="com.android.inputmethod.dictionarypack.DownloadOverMeteredDialog"
- android:label="@string/dictionary_install_over_metered_network_prompt"
- android:theme="@android:style/Theme.Holo">
+ android:theme="@style/platformActivityTheme"
+ android:label="@string/dictionary_install_over_metered_network_prompt">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
</intent-filter>
diff --git a/java/proguard.flags b/java/proguard.flags
index c08a968bc..f7b7f2898 100644
--- a/java/proguard.flags
+++ b/java/proguard.flags
@@ -14,3 +14,10 @@
-keepclassmembers class * {
native <methods>;
}
+
+# Keep classes that are used as a parameter type of methods that are also marked as keep
+# to preserve changing those methods' signature.
+-keep class com.android.inputmethod.latin.utils.LanguageModelParam
+-keep class com.android.inputmethod.latin.AssetFileAddress
+-keep class com.android.inputmethod.latin.makedict.ProbabilityInfo
+-keep class com.android.inputmethod.latin.Dictionary
diff --git a/java/res/values-v20/platform-theme.xml b/java/res/values-v20/platform-theme.xml
new file mode 100644
index 000000000..b8c1d9655
--- /dev/null
+++ b/java/res/values-v20/platform-theme.xml
@@ -0,0 +1,29 @@
+<?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.
+*/
+-->
+
+<!-- TODO: This file is temporarily placed under values-v20. -->
+<!-- TODO: It might be moved under values-v21. -->
+<resources xmlns:android="http://schemas.android.com/apk/res/android">
+ <!-- TODO: Use Theme.Quantum.Light once it is fixed.
+ <style name="platformActivityTheme" parent="@android:style/Theme.Quantum.Light" />
+ -->
+ <style name="platformActivityTheme" parent="@android:style/Theme.Quantum.Light.NoActionBar.Fullscreen" />
+ <style name="platformDialogTheme" parent="@android:style/Theme.Quantum.Light.Dialog" />
+</resources>
diff --git a/java/res/values/platform-theme.xml b/java/res/values/platform-theme.xml
new file mode 100644
index 000000000..8e131a2b0
--- /dev/null
+++ b/java/res/values/platform-theme.xml
@@ -0,0 +1,24 @@
+<?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:android="http://schemas.android.com/apk/res/android">
+ <style name="platformActivityTheme" parent="@android:style/Theme.Holo" />
+ <style name="platformDialogTheme" parent="@android:style/Theme.Holo.Dialog" />
+</resources>
diff --git a/java/res/values/strings.xml b/java/res/values/strings.xml
index e38bdd64e..937a79933 100644
--- a/java/res/values/strings.xml
+++ b/java/res/values/strings.xml
@@ -358,9 +358,13 @@
(US) should be an abbreviation of United Statesn to fit in the CHAR LIMIT.
This should be identical to subtype_es_US aside from the trailing (%s). -->
<string name="subtype_with_layout_es_US">Spanish (US) (<xliff:g id="KEYBOARD_LAYOUT" example="QWERTY">%s</xliff:g>)</string>
- <!-- Description for Nepali (Traditional) keyboard subtype [CHAR LIMIT=25]
+ <!-- Description for "LANGUAGE_NAME" (Traditional) keyboard subtype [CHAR LIMIT=25]
(Traditional) can be an abbreviation to fit in the CHAR LIMIT. -->
- <string name="subtype_nepali_traditional"><xliff:g id="LANGUAGE_NAME" example="Nepali">%s</xliff:g> (Traditional)</string>
+ <string name="subtype_generic_traditional"><xliff:g id="LANGUAGE_NAME" example="Nepali">%s</xliff:g> (Traditional)</string>
+ <!-- Description for "LANGUAGE_NAME" (Compact) keyboard subtype [CHAR LIMIT=25]
+ (Compact) can be an abbreviation to fit in the CHAR LIMIT.
+ TODO: Remove translatable=false once we are settled down with the naming. -->
+ <string name="subtype_generic_compact" translatable="false"><xliff:g id="LANGUAGE_NAME" example="Hindi">%s</xliff:g> (Compact)</string>
<!-- TODO: Uncomment once we can handle IETF language tag with script name specified.
Description for Serbian Cyrillic keyboard subtype [CHAR LIMIT=25]
(Cyrillic) can be an abbreviation to fit in the CHAR LIMIT.
diff --git a/java/res/xml-sw600dp/keys_comma_period.xml b/java/res/xml-sw600dp/keys_comma_period.xml
index ab987334a..23172cf18 100644
--- a/java/res/xml-sw600dp/keys_comma_period.xml
+++ b/java/res/xml-sw600dp/keys_comma_period.xml
@@ -28,11 +28,26 @@
latin:moreKeys="!text/morekeys_tablet_comma"
latin:backgroundType="functional"
latin:keyStyle="hasShiftedLetterHintStyle" />
- <Key
- latin:keySpec="!text/keyspec_tablet_period"
- latin:keyHintLabel="!text/keyhintlabel_tablet_period"
- latin:keyLabelFlags="hasPopupHint"
- latin:moreKeys="!text/morekeys_tablet_period"
- latin:backgroundType="functional"
- latin:keyStyle="hasShiftedLetterHintStyle" />
+ <switch>
+ <case
+ latin:languageCode="hi"
+ latin:keyboardLayoutSet="hindi_compact"
+ >
+ <!-- U+0964: "।" DEVANAGARI DANDA -->
+ <Key
+ latin:keySpec="\u0964"
+ latin:keyLabelFlags="hasPopupHint"
+ latin:moreKeys="!autoColumnOrder!8,\\,,.,',#,),(,/,;,@,:,-,&quot;,+,\\%,&amp;"
+ latin:backgroundType="functional" />
+ </case>
+ <default>
+ <Key
+ latin:keySpec="!text/keyspec_tablet_period"
+ latin:keyHintLabel="!text/keyhintlabel_tablet_period"
+ latin:keyLabelFlags="hasPopupHint"
+ latin:moreKeys="!text/morekeys_tablet_period"
+ latin:backgroundType="functional"
+ latin:keyStyle="hasShiftedLetterHintStyle" />
+ </default>
+ </switch>
</merge>
diff --git a/java/res/xml-sw600dp/rows_hindi_compact.xml b/java/res/xml-sw600dp/rows_hindi_compact.xml
new file mode 100644
index 000000000..ac476eb3b
--- /dev/null
+++ b/java/res/xml-sw600dp/rows_hindi_compact.xml
@@ -0,0 +1,54 @@
+<?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"
+ >
+ <include
+ latin:keyboardLayout="@xml/rowkeys_hindi_compact1" />
+ <Key
+ latin:keyStyle="deleteKeyStyle"
+ latin:keyWidth="fillRight" />
+ </Row>
+ <Row
+ latin:keyWidth="8.182%p"
+ >
+ <include
+ latin:keyboardLayout="@xml/rowkeys_hindi_compact2" />
+ <Key
+ latin:keyStyle="enterKeyStyle"
+ latin:keyWidth="fillRight" />
+ </Row>
+ <Row
+ latin:keyWidth="8.182%p"
+ >
+ <include
+ latin:keyboardLayout="@xml/rowkeys_hindi_compact3" />
+ <include
+ latin:keyboardLayout="@xml/keys_exclamation_question" />
+ </Row>
+ <include
+ latin:keyboardLayout="@xml/row_qwerty4" />
+</merge>
diff --git a/java/res/xml-v16/keystyle_devanagari_sign_anusvara.xml b/java/res/xml-v16/keystyle_devanagari_sign_anusvara.xml
new file mode 100644
index 000000000..71439d68c
--- /dev/null
+++ b/java/res/xml-v16/keystyle_devanagari_sign_anusvara.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2013, 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.
+*/
+-->
+
+<!-- The code point U+25CC for key label is needed because the font rendering system prior to
+ API version 16 can't automatically render dotted circle for incomplete combining letter
+ of some scripts. The files named res/xml/key_*.xml have this U+25CC hack, although the
+ counterpart files named res/xml-v16/key_*.xml don't have this hack. -->
+<merge
+ xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
+>
+ <switch>
+ <case
+ latin:keyboardLayoutSet="hindi_compact"
+ >
+ <!-- U+0903: "ः‍" DEVANAGARI SIGN VISARGA
+ U+0901: "ँ" DEVANAGARI SIGN CANDRABINDU
+ U+093C: "़" DEVANAGARI SIGN NUKTA -->
+ <key-style
+ latin:styleName="moreKeysDevanagariSignAnusvara"
+ latin:moreKeys="&#x0903;,&#x0901;,&#x093C;" />
+ </case>
+ <default>
+ <key-style
+ latin:styleName="moreKeysDevanagariSignAnusvara" />
+ </default>
+ </switch>
+ <!-- U+0902: "ं" DEVANAGARI SIGN ANUSVARA -->
+ <key-style
+ latin:styleName="baseKeyDevanagariSignAnusvara"
+ latin:parentStyle="moreKeysDevanagariSignAnusvara"
+ latin:keySpec="&#x0902;"
+ latin:keyLabelFlags="fontNormal" />
+</merge>
diff --git a/java/res/xml-v16/key_devanagari_sign_candrabindu.xml b/java/res/xml-v16/keystyle_devanagari_sign_candrabindu.xml
index f24612031..6198d01a9 100644
--- a/java/res/xml-v16/key_devanagari_sign_candrabindu.xml
+++ b/java/res/xml-v16/keystyle_devanagari_sign_candrabindu.xml
@@ -40,8 +40,9 @@
</default>
</switch>
<!-- U+0901: "ँ" DEVANAGARI SIGN CANDRABINDU -->
- <Key
- latin:keyStyle="moreKeysDevanagariSignCandrabindu"
+ <key-style
+ latin:styleName="baseKeyDevanagariSignCandrabindu"
+ latin:parentStyle="moreKeysDevanagariSignCandrabindu"
latin:keySpec="&#x0901;"
latin:keyLabelFlags="fontNormal" />
</merge>
diff --git a/java/res/xml-v16/key_devanagari_sign_nukta.xml b/java/res/xml-v16/keystyle_devanagari_sign_nukta.xml
index 915779524..e0b47bb6f 100644
--- a/java/res/xml-v16/key_devanagari_sign_nukta.xml
+++ b/java/res/xml-v16/keystyle_devanagari_sign_nukta.xml
@@ -36,14 +36,23 @@
latin:styleName="moreKeysDevanagariSignNukta"
latin:moreKeys="&#x097D;,&#x0970;,&#x093D;" />
</case>
+ <case
+ latin:keyboardLayoutSet="nepali_romanized"
+ >
+ <!-- U+093C: "़" DEVANAGARI SIGN NUKTA -->
+ <key-style
+ latin:styleName="moreKeysDevanagariSignNukta"
+ latin:moreKeys="&#x093C;" />
+ </case>
<default>
<key-style
latin:styleName="moreKeysDevanagariSignNukta" />
</default>
</switch>
<!-- U+093C: "़" DEVANAGARI SIGN NUKTA -->
- <Key
- latin:keyStyle="moreKeysDevanagariSignNukta"
+ <key-style
+ latin:styleName="baseKeyDevanagariSignNukta"
+ latin:parentStyle="moreKeysDevanagariSignNukta"
latin:keySpec="&#x093C;"
latin:keyLabelFlags="fontNormal" />
</merge>
diff --git a/java/res/xml-v16/keystyle_devanagari_sign_virama.xml b/java/res/xml-v16/keystyle_devanagari_sign_virama.xml
index 764fb1fbb..0c3a29b16 100644
--- a/java/res/xml-v16/keystyle_devanagari_sign_virama.xml
+++ b/java/res/xml-v16/keystyle_devanagari_sign_virama.xml
@@ -25,9 +25,24 @@
<merge
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
>
+ <switch>
+ <case
+ latin:keyboardLayoutSet="hindi_compact"
+ >
+ <!-- U+094D: "्" DEVANAGARI SIGN VIRAMA -->
+ <key-style
+ latin:styleName="moreKeysDevanagariSignVirama"
+ latin:moreKeys="&#x094D;" />
+ </case>
+ <default>
+ <key-style
+ latin:styleName="moreKeysDevanagariSignVirama" />
+ </default>
+ </switch>
<!-- U+094D: "्" DEVANAGARI SIGN VIRAMA -->
<key-style
latin:styleName="baseKeyDevanagariSignVirama"
+ latin:parentStyle="moreKeysDevanagariSignVirama"
latin:keySpec="&#x094D;"
latin:keyLabelFlags="fontNormal" />
</merge>
diff --git a/java/res/xml-v16/keystyle_devanagari_vowel_sign_aa.xml b/java/res/xml-v16/keystyle_devanagari_vowel_sign_aa.xml
index fe9264b78..5bb0351ec 100644
--- a/java/res/xml-v16/keystyle_devanagari_vowel_sign_aa.xml
+++ b/java/res/xml-v16/keystyle_devanagari_vowel_sign_aa.xml
@@ -35,6 +35,14 @@
latin:styleName="moreKeysDevanagariVowelSignAa"
latin:moreKeys="&#x093E;&#x0902;,&#x093E;&#x0901;,%" />
</case>
+ <case
+ latin:keyboardLayoutSet="hindi_compact"
+ >
+ <!-- U+093E: "ा" DEVANAGARI VOWEL SIGN AA -->
+ <key-style
+ latin:styleName="moreKeysDevanagariVowelSignAa"
+ latin:moreKeys="&#x093E;,%" />
+ </case>
<default>
<key-style
latin:styleName="moreKeysDevanagariVowelSignAa" />
diff --git a/java/res/xml-v16/keystyle_devanagari_vowel_sign_ai.xml b/java/res/xml-v16/keystyle_devanagari_vowel_sign_ai.xml
index fdb53bb2c..8edf6eb1c 100644
--- a/java/res/xml-v16/keystyle_devanagari_vowel_sign_ai.xml
+++ b/java/res/xml-v16/keystyle_devanagari_vowel_sign_ai.xml
@@ -35,6 +35,14 @@
latin:moreKeys="&#x0948;&#x0902;,%" />
</case>
<case
+ latin:keyboardLayoutSet="hindi_compact"
+ >
+ <!-- U+0948: "ै" DEVANAGARI VOWEL SIGN AI -->
+ <key-style
+ latin:styleName="moreKeysDevanagariVowelSignAi"
+ latin:moreKeys="&#x0948;,%" />
+ </case>
+ <case
latin:keyboardLayoutSet="nepali_traditional"
>
<!-- U+0936/U+094D/U+0930: "श्र" DEVANAGARI LETTER SHA/DEVANAGARI SIGN VIRAMA/DEVANAGARI LETTER RA -->
diff --git a/java/res/xml-v16/keystyle_devanagari_vowel_sign_au.xml b/java/res/xml-v16/keystyle_devanagari_vowel_sign_au.xml
index 653e79e0f..212e058d1 100644
--- a/java/res/xml-v16/keystyle_devanagari_vowel_sign_au.xml
+++ b/java/res/xml-v16/keystyle_devanagari_vowel_sign_au.xml
@@ -34,6 +34,14 @@
latin:styleName="moreKeysDevanagariVowelSignAu"
latin:moreKeys="&#x094C;&#x0902;,%" />
</case>
+ <case
+ latin:keyboardLayoutSet="hindi_compact"
+ >
+ <!-- U+094C: "ौ" DEVANAGARI VOWEL SIGN AU -->
+ <key-style
+ latin:styleName="moreKeysDevanagariVowelSignAu"
+ latin:moreKeys="&#x094C;,%" />
+ </case>
<default>
<key-style
latin:styleName="moreKeysDevanagariVowelSignAu" />
diff --git a/java/res/xml-v16/key_devanagari_sign_anusvara.xml b/java/res/xml-v16/keystyle_devanagari_vowel_sign_candra_e.xml
index ee0f21dad..ef2c3f14b 100644
--- a/java/res/xml-v16/key_devanagari_sign_anusvara.xml
+++ b/java/res/xml-v16/keystyle_devanagari_vowel_sign_candra_e.xml
@@ -2,7 +2,7 @@
<!--
/*
**
-** Copyright 2013, The Android Open Source Project
+** 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.
@@ -25,8 +25,18 @@
<merge
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
>
- <!-- U+0902: "ं" DEVANAGARI SIGN ANUSVARA -->
- <Key
- latin:keySpec="&#x0902;"
- latin:keyLabelFlags="fontNormal" />
+ <switch>
+ <case
+ latin:keyboardLayoutSet="hindi_compact"
+ >
+ <!-- U+0945: "ॅ" DEVANAGARI VOWEL SIGN CANDRA E -->
+ <key-style
+ latin:styleName="moreKeysDevanagariVowelSignCandraE"
+ latin:moreKeys="&#x0945;" />
+ </case>
+ <default>
+ <key-style
+ latin:styleName="moreKeysDevanagariVowelSignCandraE" />
+ </default>
+ </switch>
</merge>
diff --git a/java/res/xml-v16/key_devanagari_vowel_sign_candra_o.xml b/java/res/xml-v16/keystyle_devanagari_vowel_sign_candra_o.xml
index 2f1739948..ac01d37b7 100644
--- a/java/res/xml-v16/key_devanagari_vowel_sign_candra_o.xml
+++ b/java/res/xml-v16/keystyle_devanagari_vowel_sign_candra_o.xml
@@ -25,8 +25,24 @@
<merge
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
>
+ <switch>
+ <case
+ latin:keyboardLayoutSet="hindi_compact"
+ >
+ <!-- U+0949: "ॉ" DEVANAGARI VOWEL SIGN CANDRA O -->
+ <key-style
+ latin:styleName="moreKeysDevanagariVowelSignCandraO"
+ latin:moreKeys="&#x0949;" />
+ </case>
+ <default>
+ <key-style
+ latin:styleName="moreKeysDevanagariVowelSignCandraO" />
+ </default>
+ </switch>
<!-- U+0949: "ॉ" DEVANAGARI VOWEL SIGN CANDRA O -->
- <Key
+ <key-style
+ latin:styleName="baseKeyDevanagariVowelSignCandraO"
+ latin:parentStyle="moreKeysDevanagariVowelSignCandraO"
latin:keySpec="&#x0949;"
latin:keyLabelFlags="fontNormal" />
</merge>
diff --git a/java/res/xml-v16/keystyle_devanagari_vowel_sign_e.xml b/java/res/xml-v16/keystyle_devanagari_vowel_sign_e.xml
index 7240a2ca1..77d6eb5e0 100644
--- a/java/res/xml-v16/keystyle_devanagari_vowel_sign_e.xml
+++ b/java/res/xml-v16/keystyle_devanagari_vowel_sign_e.xml
@@ -35,6 +35,14 @@
latin:moreKeys="&#x0947;&#x0902;" />
</case>
<case
+ latin:keyboardLayoutSet="hindi_compact"
+ >
+ <!-- U+0947: "े" DEVANAGARI VOWEL SIGN E -->
+ <key-style
+ latin:styleName="moreKeysDevanagariVowelSignE"
+ latin:moreKeys="&#x0947;" />
+ </case>
+ <case
latin:keyboardLayoutSet="nepali_traditional"
>
<!-- U+0903: "ः‍" DEVANAGARI SIGN VISARGA
diff --git a/java/res/xml-v16/keystyle_devanagari_vowel_sign_i.xml b/java/res/xml-v16/keystyle_devanagari_vowel_sign_i.xml
index 5a006f033..d79447be5 100644
--- a/java/res/xml-v16/keystyle_devanagari_vowel_sign_i.xml
+++ b/java/res/xml-v16/keystyle_devanagari_vowel_sign_i.xml
@@ -34,6 +34,14 @@
latin:styleName="moreKeysDevanagariVowelSignI"
latin:moreKeys="&#x093F;&#x0902;" />
</case>
+ <case
+ latin:keyboardLayoutSet="hindi_compact"
+ >
+ <!-- U+093F: "ि" DEVANAGARI VOWEL SIGN I -->
+ <key-style
+ latin:styleName="moreKeysDevanagariVowelSignI"
+ latin:moreKeys="&#x093F;" />
+ </case>
<default>
<key-style
latin:styleName="moreKeysDevanagariVowelSignI" />
diff --git a/java/res/xml-v16/keystyle_devanagari_vowel_sign_ii.xml b/java/res/xml-v16/keystyle_devanagari_vowel_sign_ii.xml
index a2b07fe5a..0e10f3172 100644
--- a/java/res/xml-v16/keystyle_devanagari_vowel_sign_ii.xml
+++ b/java/res/xml-v16/keystyle_devanagari_vowel_sign_ii.xml
@@ -34,6 +34,14 @@
latin:styleName="moreKeysDevanagariVowelSignIi"
latin:moreKeys="&#x0940;&#x0902;,%" />
</case>
+ <case
+ latin:keyboardLayoutSet="hindi_compact"
+ >
+ <!-- U+0940: "ी" DEVANAGARI VOWEL SIGN II -->
+ <key-style
+ latin:styleName="moreKeysDevanagariVowelSignIi"
+ latin:moreKeys="&#x0940;,%" />
+ </case>
<default>
<key-style
latin:styleName="moreKeysDevanagariVowelSignIi" />
diff --git a/java/res/xml-v16/keystyle_devanagari_vowel_sign_o.xml b/java/res/xml-v16/keystyle_devanagari_vowel_sign_o.xml
index 4b764cdee..47ca906ce 100644
--- a/java/res/xml-v16/keystyle_devanagari_vowel_sign_o.xml
+++ b/java/res/xml-v16/keystyle_devanagari_vowel_sign_o.xml
@@ -29,13 +29,21 @@
<case
latin:keyboardLayoutSet="hindi"
>
- <!-- U+094B/U+0902: "қं" DEVANAGARI VOWEL SIGN O/DEVANAGARI SIGN ANUSVARA
+ <!-- U+094B/U+0902: "ों" DEVANAGARI VOWEL SIGN O/DEVANAGARI SIGN ANUSVARA
U+0949: "ॉ" DEVANAGARI VOWEL SIGN CANDRA O
U+094A: "ॊ" DEVANAGARI VOWEL SIGN SHORT O -->
<key-style
latin:styleName="moreKeysDevanagariVowelSignO"
latin:moreKeys="&#x094B;&#x0902;,&#x0949;,&#x094A;" />
</case>
+ <case
+ latin:keyboardLayoutSet="hindi_compact"
+ >
+ <!-- U+094B: "ो" DEVANAGARI VOWEL SIGN O -->
+ <key-style
+ latin:styleName="moreKeysDevanagariVowelSignO"
+ latin:moreKeys="&#x094B;" />
+ </case>
<default>
<key-style
latin:styleName="moreKeysDevanagariVowelSignO" />
diff --git a/java/res/xml-v16/keystyle_devanagari_vowel_sign_u.xml b/java/res/xml-v16/keystyle_devanagari_vowel_sign_u.xml
index 18d485afe..694e4abe7 100644
--- a/java/res/xml-v16/keystyle_devanagari_vowel_sign_u.xml
+++ b/java/res/xml-v16/keystyle_devanagari_vowel_sign_u.xml
@@ -35,6 +35,14 @@
latin:styleName="moreKeysDevanagariVowelSignU"
latin:moreKeys="&#x0941;&#x0902;,&#x0941;&#x0901;" />
</case>
+ <case
+ latin:keyboardLayoutSet="hindi_compact"
+ >
+ <!-- U+0941: "ु" DEVANAGARI VOWEL SIGN U -->
+ <key-style
+ latin:styleName="moreKeysDevanagariVowelSignU"
+ latin:moreKeys="&#x0941;" />
+ </case>
<default>
<key-style
latin:styleName="moreKeysDevanagariVowelSignU" />
diff --git a/java/res/xml-v16/keystyle_devanagari_vowel_sign_uu.xml b/java/res/xml-v16/keystyle_devanagari_vowel_sign_uu.xml
index d770ee6c5..f17489e3a 100644
--- a/java/res/xml-v16/keystyle_devanagari_vowel_sign_uu.xml
+++ b/java/res/xml-v16/keystyle_devanagari_vowel_sign_uu.xml
@@ -35,6 +35,14 @@
latin:styleName="moreKeysDevanagariVowelSignUu"
latin:moreKeys="&#x0942;&#x0902;,&#x0942;&#x0901;,%" />
</case>
+ <case
+ latin:keyboardLayoutSet="hindi_compact"
+ >
+ <!-- U+0942: "ू" DEVANAGARI VOWEL SIGN UU -->
+ <key-style
+ latin:styleName="moreKeysDevanagariVowelSignUu"
+ latin:moreKeys="&#x0942;,%" />
+ </case>
<default>
<key-style
latin:styleName="moreKeysDevanagariVowelSignUu" />
diff --git a/java/res/xml-v16/key_devanagari_vowel_sign_vocalic_r.xml b/java/res/xml-v16/keystyle_devanagari_vowel_sign_vocalic_r.xml
index dc7a0e090..27098466d 100644
--- a/java/res/xml-v16/key_devanagari_vowel_sign_vocalic_r.xml
+++ b/java/res/xml-v16/keystyle_devanagari_vowel_sign_vocalic_r.xml
@@ -35,6 +35,15 @@
latin:moreKeys="&#x0944;" />
</case>
<case
+ latin:keyboardLayoutSet="hindi_compact"
+ >
+ <!-- U+090B: "ऋ" DEVANAGARI LETTER VOCALIC R
+ U+0943: "ृ" DEVANAGARI VOWEL SIGN VOCALIC R -->
+ <key-style
+ latin:styleName="moreKeysDevanagariVowelSignVocalicR"
+ latin:moreKeys="&#x090B;,&#x0943;" />
+ </case>
+ <case
latin:keyboardLayoutSet="nepali_traditional"
>
<!-- U+0913: "ओ" DEVANAGARI LETTER O -->
@@ -48,8 +57,9 @@
</default>
</switch>
<!-- U+0943: "ृ" DEVANAGARI VOWEL SIGN VOCALIC R -->
- <Key
- latin:keyStyle="moreKeysDevanagariVowelSignVocalicR"
+ <key-style
+ latin:styleName="baseKeyDevanagariVowelSignVocalicR"
+ latin:parentStyle="moreKeysDevanagariVowelSignVocalicR"
latin:keySpec="&#x0943;"
latin:keyLabelFlags="fontNormal" />
</merge>
diff --git a/java/res/xml/kbd_hindi_compact.xml b/java/res/xml/kbd_hindi_compact.xml
new file mode 100644
index 000000000..7502bba9e
--- /dev/null
+++ b/java/res/xml/kbd_hindi_compact.xml
@@ -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_hindi_compact" />
+</Keyboard>
diff --git a/java/res/xml/key_period.xml b/java/res/xml/key_period.xml
index ce23e2256..e1d4bbdf7 100644
--- a/java/res/xml/key_period.xml
+++ b/java/res/xml/key_period.xml
@@ -23,6 +23,17 @@
>
<switch>
<case
+ latin:languageCode="hi"
+ latin:keyboardLayoutSet="hindi_compact"
+ >
+ <!-- U+0964: "।" DEVANAGARI DANDA -->
+ <Key
+ latin:keySpec="\u0964"
+ latin:keyLabelFlags="hasPopupHint"
+ latin:moreKeys="!autoColumnOrder!9,\\,,.,?,!,#,),(,/,;,',@,:,-,&quot;,+,\\%,&amp;"
+ latin:backgroundType="functional" />
+ </case>
+ <case
latin:languageCode="ne"
latin:keyboardLayoutSet="nepali_traditional"
>
diff --git a/java/res/xml/keyboard_layout_set_hindi_compact.xml b/java/res/xml/keyboard_layout_set_hindi_compact.xml
new file mode 100644
index 000000000..77d02fbbc
--- /dev/null
+++ b/java/res/xml/keyboard_layout_set_hindi_compact.xml
@@ -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_hindi_compact"
+ 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>
diff --git a/java/res/xml/keystyle_devanagari_sign_anusvara.xml b/java/res/xml/keystyle_devanagari_sign_anusvara.xml
new file mode 100644
index 000000000..6dc9b7e3a
--- /dev/null
+++ b/java/res/xml/keystyle_devanagari_sign_anusvara.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2013, 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.
+*/
+-->
+
+<!-- The code point U+25CC for key label is needed because the font rendering system prior to
+ API version 16 can't automatically render dotted circle for incomplete combining letter
+ of some scripts. The files named res/xml/key_*.xml have this U+25CC hack, although the
+ counterpart files named res/xml-v16/key_*.xml don't have this hack. -->
+<merge
+ xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
+>
+ <switch>
+ <case
+ latin:keyboardLayoutSet="hindi_compact"
+ >
+ <!-- U+25CC: "◌" DOTTED CIRCLE
+ U+0903: "ः‍" DEVANAGARI SIGN VISARGA
+ U+0901: "ँ" DEVANAGARI SIGN CANDRABINDU
+ U+093C: "़" DEVANAGARI SIGN NUKTA -->
+ <key-style
+ latin:styleName="moreKeysDevanagariSignAnusvara"
+ latin:moreKeys="&#x25CC;&#x0903;|&#x0903;,&#x25CC;&#x0901;|&#x0901;,&#x25CC;&#x093C;|&#x093C;" />
+ </case>
+ <default>
+ <key-style
+ latin:styleName="moreKeysDevanagariSignAnusvara" />
+ </default>
+ </switch>
+ <!-- U+25CC: "◌" DOTTED CIRCLE
+ U+0902: "ं" DEVANAGARI SIGN ANUSVARA -->
+ <key-style
+ latin:styleName="baseKeyDevanagariSignAnusvara"
+ latin:parentStyle="moreKeysDevanagariSignAnusvara"
+ latin:keySpec="&#x25CC;&#x0902;|&#x0902;"
+ latin:keyLabelFlags="fontNormal|followKeyLetterRatio" />
+</merge>
diff --git a/java/res/xml/key_devanagari_sign_candrabindu.xml b/java/res/xml/keystyle_devanagari_sign_candrabindu.xml
index 9e9c371a7..24cb44ba8 100644
--- a/java/res/xml/key_devanagari_sign_candrabindu.xml
+++ b/java/res/xml/keystyle_devanagari_sign_candrabindu.xml
@@ -42,8 +42,9 @@
</switch>
<!-- U+25CC: "◌" DOTTED CIRCLE
U+0901: "ँ" DEVANAGARI SIGN CANDRABINDU -->
- <Key
- latin:keyStyle="moreKeysDevanagariSignCandrabindu"
+ <key-style
+ latin:styleName="baseKeyDevanagariSignCandrabindu"
+ latin:parentStyle="moreKeysDevanagariSignCandrabindu"
latin:keySpec="&#x25CC;&#x0901;|&#x0901;"
latin:keyLabelFlags="fontNormal|followKeyLetterRatio" />
</merge>
diff --git a/java/res/xml/key_devanagari_sign_nukta.xml b/java/res/xml/keystyle_devanagari_sign_nukta.xml
index b56eb0af3..41da555ce 100644
--- a/java/res/xml/key_devanagari_sign_nukta.xml
+++ b/java/res/xml/keystyle_devanagari_sign_nukta.xml
@@ -37,6 +37,15 @@
latin:styleName="moreKeysDevanagariSignNukta"
latin:moreKeys="&#x25CC;&#x097D;|&#x097D;,&#x25CC;&#x0970;|&#x0970;,&#x25CC;&#x093D;|&#x093D;" />
</case>
+ <case
+ latin:keyboardLayoutSet="nepali_romanized"
+ >
+ <!-- U+25CC: "◌" DOTTED CIRCLE
+ U+093C: "़" DEVANAGARI SIGN NUKTA -->
+ <key-style
+ latin:styleName="moreKeysDevanagariSignNukta"
+ latin:moreKeys="&#x25CC;&#x093C;|&#x093C;" />
+ </case>
<default>
<key-style
latin:styleName="moreKeysDevanagariSignNukta" />
@@ -44,8 +53,9 @@
</switch>
<!-- U+25CC: "◌" DOTTED CIRCLE
U+093C: "़" DEVANAGARI SIGN NUKTA -->
- <Key
- latin:keyStyle="moreKeysDevanagariSignNukta"
+ <key-style
+ latin:styleName="baseKeyDevanagariSignNukta"
+ latin:parentStyle="moreKeysDevanagariSignNukta"
latin:keySpec="&#x25CC;&#x093C;|&#x093C;"
latin:keyLabelFlags="fontNormal|followKeyLetterRatio" />
</merge>
diff --git a/java/res/xml/keystyle_devanagari_sign_virama.xml b/java/res/xml/keystyle_devanagari_sign_virama.xml
index 5e0e10823..96506e2fc 100644
--- a/java/res/xml/keystyle_devanagari_sign_virama.xml
+++ b/java/res/xml/keystyle_devanagari_sign_virama.xml
@@ -25,10 +25,26 @@
<merge
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
>
+ <switch>
+ <case
+ latin:keyboardLayoutSet="hindi_compact"
+ >
+ <!-- U+25CC: "◌" DOTTED CIRCLE
+ U+094D: "्" DEVANAGARI SIGN VIRAMA -->
+ <key-style
+ latin:styleName="moreKeysDevanagariSignVirama"
+ latin:moreKeys="&#x25CC;&#x094D;|&#x094D;" />
+ </case>
+ <default>
+ <key-style
+ latin:styleName="moreKeysDevanagariSignVirama" />
+ </default>
+ </switch>
<!-- U+25CC: "◌" DOTTED CIRCLE
U+094D: "्" DEVANAGARI SIGN VIRAMA -->
<key-style
latin:styleName="baseKeyDevanagariSignVirama"
+ latin:parentStyle="moreKeysDevanagariSignVirama"
latin:keySpec="&#x25CC;&#x094D;|&#x094D;"
latin:keyLabelFlags="fontNormal|followKeyLetterRatio" />
</merge>
diff --git a/java/res/xml/keystyle_devanagari_vowel_sign_aa.xml b/java/res/xml/keystyle_devanagari_vowel_sign_aa.xml
index 97f98e328..4b876505a 100644
--- a/java/res/xml/keystyle_devanagari_vowel_sign_aa.xml
+++ b/java/res/xml/keystyle_devanagari_vowel_sign_aa.xml
@@ -36,6 +36,15 @@
latin:styleName="moreKeysDevanagariVowelSignAa"
latin:moreKeys="&#x25CC;&#x093E;&#x0902;|&#x093E;&#x0902;,&#x25CC;&#x093E;&#x0901;|&#x093E;&#x0901;,%" />
</case>
+ <case
+ latin:keyboardLayoutSet="hindi_compact"
+ >
+ <!-- U+25CC: "◌" DOTTED CIRCLE
+ U+093E: "ा" DEVANAGARI VOWEL SIGN AA -->
+ <key-style
+ latin:styleName="moreKeysDevanagariVowelSignAa"
+ latin:moreKeys="&#x25CC;&#x093E;|&#x093E;,%" />
+ </case>
<default>
<key-style
latin:styleName="moreKeysDevanagariVowelSignAa" />
diff --git a/java/res/xml/keystyle_devanagari_vowel_sign_ai.xml b/java/res/xml/keystyle_devanagari_vowel_sign_ai.xml
index 4d1b2c514..050a7ce0e 100644
--- a/java/res/xml/keystyle_devanagari_vowel_sign_ai.xml
+++ b/java/res/xml/keystyle_devanagari_vowel_sign_ai.xml
@@ -36,6 +36,15 @@
latin:moreKeys="&#x25CC;&#x0948;&#x0902;|&#x0948;&#x0902;,%" />
</case>
<case
+ latin:keyboardLayoutSet="hindi_compact"
+ >
+ <!-- U+25CC: "◌" DOTTED CIRCLE
+ U+0948: "ै" DEVANAGARI VOWEL SIGN AI -->
+ <key-style
+ latin:styleName="moreKeysDevanagariVowelSignAi"
+ latin:moreKeys="&#x25CC;&#x0948;|&#x0948;,%" />
+ </case>
+ <case
latin:keyboardLayoutSet="nepali_traditional"
>
<!-- U+0936/U+094D/U+0930: "श्र" DEVANAGARI LETTER SHA/DEVANAGARI SIGN VIRAMA/DEVANAGARI LETTER RA -->
diff --git a/java/res/xml/keystyle_devanagari_vowel_sign_au.xml b/java/res/xml/keystyle_devanagari_vowel_sign_au.xml
index 66628b5ed..49e67da38 100644
--- a/java/res/xml/keystyle_devanagari_vowel_sign_au.xml
+++ b/java/res/xml/keystyle_devanagari_vowel_sign_au.xml
@@ -30,11 +30,20 @@
latin:keyboardLayoutSet="hindi"
>
<!-- U+25CC: "◌" DOTTED CIRCLE
- U+094C/U+0902: "ौं" DEVANAGARI VOWEL SIGN AU/DEVANAGARI SIGN ANUSVARA -->
+ U+094C/U+0902: "ौं" DEVANAGARI VOWEL SIGN AU/DEVANAGARI SIGN ANUSVARA -->
<key-style
latin:styleName="moreKeysDevanagariVowelSignAu"
latin:moreKeys="&#x25CC;&#x094C;&#x0902;|&#x094C;&#x0902;,%" />
</case>
+ <case
+ latin:keyboardLayoutSet="hindi_compact"
+ >
+ <!-- U+25CC: "◌" DOTTED CIRCLE
+ U+094C: "ौ" DEVANAGARI VOWEL SIGN AU -->
+ <key-style
+ latin:styleName="moreKeysDevanagariVowelSignAu"
+ latin:moreKeys="&#x25CC;&#x094C;|&#x094C;,%" />
+ </case>
<default>
<key-style
latin:styleName="moreKeysDevanagariVowelSignAu" />
diff --git a/java/res/xml/key_devanagari_sign_anusvara.xml b/java/res/xml/keystyle_devanagari_vowel_sign_candra_e.xml
index 5d7c01890..86f68d355 100644
--- a/java/res/xml/key_devanagari_sign_anusvara.xml
+++ b/java/res/xml/keystyle_devanagari_vowel_sign_candra_e.xml
@@ -2,7 +2,7 @@
<!--
/*
**
-** Copyright 2013, The Android Open Source Project
+** 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.
@@ -25,9 +25,19 @@
<merge
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
>
- <!-- U+25CC: "◌" DOTTED CIRCLE
- U+0902: "ं" DEVANAGARI SIGN ANUSVARA -->
- <Key
- latin:keySpec="&#x25CC;&#x0902;|&#x0902;"
- latin:keyLabelFlags="fontNormal|followKeyLetterRatio" />
+ <switch>
+ <case
+ latin:keyboardLayoutSet="hindi_compact"
+ >
+ <!-- U+25CC: "◌" DOTTED CIRCLE
+ U+0945: "ॅ" DEVANAGARI VOWEL SIGN CANDRA E -->
+ <key-style
+ latin:styleName="moreKeysDevanagariVowelSignCandraE"
+ latin:moreKeys="&#x25CC;&#x0945;|&#x0945;" />
+ </case>
+ <default>
+ <key-style
+ latin:styleName="moreKeysDevanagariVowelSignCandraE" />
+ </default>
+ </switch>
</merge>
diff --git a/java/res/xml/key_devanagari_vowel_sign_candra_o.xml b/java/res/xml/keystyle_devanagari_vowel_sign_candra_o.xml
index 6d7d000b3..fd711e049 100644
--- a/java/res/xml/key_devanagari_vowel_sign_candra_o.xml
+++ b/java/res/xml/keystyle_devanagari_vowel_sign_candra_o.xml
@@ -25,9 +25,26 @@
<merge
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
>
+ <switch>
+ <case
+ latin:keyboardLayoutSet="hindi_compact"
+ >
+ <!-- U+25CC: "◌" DOTTED CIRCLE
+ U+0949: "ॉ" DEVANAGARI VOWEL SIGN CANDRA O -->
+ <key-style
+ latin:styleName="moreKeysDevanagariVowelSignCandraO"
+ latin:moreKeys="&#x25CC;&#x0949;|&#x0949;" />
+ </case>
+ <default>
+ <key-style
+ latin:styleName="moreKeysDevanagariVowelSignCandraO" />
+ </default>
+ </switch>
<!-- U+25CC: "◌" DOTTED CIRCLE
U+0949: "ॉ" DEVANAGARI VOWEL SIGN CANDRA O -->
- <Key
+ <key-style
+ latin:styleName="baseKeyDevanagariVowelSignCandraO"
+ latin:parentStyle="moreKeysDevanagariVowelSignCandraO"
latin:keySpec="&#x25CC;&#x0949;|&#x0949;"
latin:keyLabelFlags="fontNormal|followKeyLetterRatio" />
</merge>
diff --git a/java/res/xml/keystyle_devanagari_vowel_sign_e.xml b/java/res/xml/keystyle_devanagari_vowel_sign_e.xml
index de1d94974..88f6a74f4 100644
--- a/java/res/xml/keystyle_devanagari_vowel_sign_e.xml
+++ b/java/res/xml/keystyle_devanagari_vowel_sign_e.xml
@@ -36,6 +36,15 @@
latin:moreKeys="&#x25CC;&#x0947;&#x0902;|&#x0947;&#x0902;" />
</case>
<case
+ latin:keyboardLayoutSet="hindi_compact"
+ >
+ <!-- U+25CC: "◌" DOTTED CIRCLE
+ U+0947: "े" DEVANAGARI VOWEL SIGN E -->
+ <key-style
+ latin:styleName="moreKeysDevanagariVowelSignE"
+ latin:moreKeys="&#x25CC;&#x0947;|&#x0947;" />
+ </case>
+ <case
latin:keyboardLayoutSet="nepali_traditional"
>
<!-- U+25CC: "◌" DOTTED CIRCLE
diff --git a/java/res/xml/keystyle_devanagari_vowel_sign_i.xml b/java/res/xml/keystyle_devanagari_vowel_sign_i.xml
index d1d56c185..a84fdb4a9 100644
--- a/java/res/xml/keystyle_devanagari_vowel_sign_i.xml
+++ b/java/res/xml/keystyle_devanagari_vowel_sign_i.xml
@@ -35,6 +35,15 @@
latin:styleName="moreKeysDevanagariVowelSignI"
latin:moreKeys="&#x093F;&#x25CC;&#x0902;|&#x093F;&#x0902;" />
</case>
+ <case
+ latin:keyboardLayoutSet="hindi_compact"
+ >
+ <!-- U+25CC: "◌" DOTTED CIRCLE
+ U+093F: "ि" DEVANAGARI VOWEL SIGN I -->
+ <key-style
+ latin:styleName="moreKeysDevanagariVowelSignI"
+ latin:moreKeys="&#x25CC;&#x093F;|&#x093F;" />
+ </case>
<default>
<key-style
latin:styleName="moreKeysDevanagariVowelSignI" />
diff --git a/java/res/xml/keystyle_devanagari_vowel_sign_ii.xml b/java/res/xml/keystyle_devanagari_vowel_sign_ii.xml
index fd0ce77f8..6f6eb0f15 100644
--- a/java/res/xml/keystyle_devanagari_vowel_sign_ii.xml
+++ b/java/res/xml/keystyle_devanagari_vowel_sign_ii.xml
@@ -29,12 +29,21 @@
<case
latin:keyboardLayoutSet="hindi"
>
- <!-- U+0940: "ी" DEVANAGARI VOWEL SIGN II
+ <!-- U+25CC: "◌" DOTTED CIRCLE
U+0940/U+0902: "ीं" DEVANAGARI VOWEL SIGN II/DEVANAGARI SIGN ANUSVARA -->
<key-style
latin:styleName="moreKeysDevanagariVowelSignIi"
latin:moreKeys="&#x25CC;&#x0940;&#x0902;|&#x0940;&#x0902;,%" />
</case>
+ <case
+ latin:keyboardLayoutSet="hindi_compact"
+ >
+ <!-- U+25CC: "◌" DOTTED CIRCLE
+ U+0940: "ी" DEVANAGARI VOWEL SIGN II -->
+ <key-style
+ latin:styleName="moreKeysDevanagariVowelSignIi"
+ latin:moreKeys="&#x25CC;&#x0940;|&#x0940;,%" />
+ </case>
<default>
<key-style
latin:styleName="moreKeysDevanagariVowelSignIi" />
diff --git a/java/res/xml/keystyle_devanagari_vowel_sign_o.xml b/java/res/xml/keystyle_devanagari_vowel_sign_o.xml
index edc3bef0f..68b176a43 100644
--- a/java/res/xml/keystyle_devanagari_vowel_sign_o.xml
+++ b/java/res/xml/keystyle_devanagari_vowel_sign_o.xml
@@ -30,13 +30,22 @@
latin:keyboardLayoutSet="hindi"
>
<!-- U+25CC: "◌" DOTTED CIRCLE
- U+094B/U+0902: "қं" DEVANAGARI VOWEL SIGN O/DEVANAGARI SIGN ANUSVARA
+ U+094B/U+0902: "ों" DEVANAGARI VOWEL SIGN O/DEVANAGARI SIGN ANUSVARA
U+0949: "ॉ" DEVANAGARI VOWEL SIGN CANDRA O
U+094A: "ॊ" DEVANAGARI VOWEL SIGN SHORT O -->
<key-style
latin:styleName="moreKeysDevanagariVowelSignO"
latin:moreKeys="&#x25CC;&#x094B;&#x0902;|&#x094B;&#x0902;,&#x25CC;&#x0949;|&#x0949;,&#x25CC;&#x094A;|&#x094A;" />
</case>
+ <case
+ latin:keyboardLayoutSet="hindi_compact"
+ >
+ <!-- U+25CC: "◌" DOTTED CIRCLE
+ U+094B: "ो" DEVANAGARI VOWEL SIGN O -->
+ <key-style
+ latin:styleName="moreKeysDevanagariVowelSignO"
+ latin:moreKeys="&#x25CC;&#x094B;|&#x094B;" />
+ </case>
<default>
<key-style
latin:styleName="moreKeysDevanagariVowelSignO" />
diff --git a/java/res/xml/keystyle_devanagari_vowel_sign_u.xml b/java/res/xml/keystyle_devanagari_vowel_sign_u.xml
index c7de4fdd8..7c058b174 100644
--- a/java/res/xml/keystyle_devanagari_vowel_sign_u.xml
+++ b/java/res/xml/keystyle_devanagari_vowel_sign_u.xml
@@ -36,6 +36,15 @@
latin:styleName="moreKeysDevanagariVowelSignU"
latin:moreKeys="&#x25CC;&#x0941;&#x0902;|&#x0941;&#x0902;,&#x25CC;&#x0941;&#x0901;|&#x0941;&#x0901;" />
</case>
+ <case
+ latin:keyboardLayoutSet="hindi_compact"
+ >
+ <!-- U+25CC: "◌" DOTTED CIRCLE
+ U+0941: "ु" DEVANAGARI VOWEL SIGN U -->
+ <key-style
+ latin:styleName="moreKeysDevanagariVowelSignU"
+ latin:moreKeys="&#x25CC;&#x0941;|&#x0941;" />
+ </case>
<default>
<key-style
latin:styleName="moreKeysDevanagariVowelSignU" />
diff --git a/java/res/xml/keystyle_devanagari_vowel_sign_uu.xml b/java/res/xml/keystyle_devanagari_vowel_sign_uu.xml
index 6029d6d2b..73ab63c89 100644
--- a/java/res/xml/keystyle_devanagari_vowel_sign_uu.xml
+++ b/java/res/xml/keystyle_devanagari_vowel_sign_uu.xml
@@ -36,6 +36,15 @@
latin:styleName="moreKeysDevanagariVowelSignUu"
latin:moreKeys="&#x25CC;&#x0942;&#x0902;|&#x0942;&#x0902;,&#x25CC;&#x0942;&#x0901;|&#x0942;&#x0901;,%" />
</case>
+ <case
+ latin:keyboardLayoutSet="hindi_compact"
+ >
+ <!-- U+25CC: "◌" DOTTED CIRCLE
+ U+0942: "ू" DEVANAGARI VOWEL SIGN UU -->
+ <key-style
+ latin:styleName="moreKeysDevanagariVowelSignUu"
+ latin:moreKeys="&#x25CC;&#x0942;|&#x0942;,%" />
+ </case>
<default>
<key-style
latin:styleName="moreKeysDevanagariVowelSignUu" />
diff --git a/java/res/xml/key_devanagari_vowel_sign_vocalic_r.xml b/java/res/xml/keystyle_devanagari_vowel_sign_vocalic_r.xml
index badea3e2c..29b083eb3 100644
--- a/java/res/xml/key_devanagari_vowel_sign_vocalic_r.xml
+++ b/java/res/xml/keystyle_devanagari_vowel_sign_vocalic_r.xml
@@ -36,6 +36,16 @@
latin:moreKeys="&#x25CC;&#x0944;|&#x0944;" />
</case>
<case
+ latin:keyboardLayoutSet="hindi_compact"
+ >
+ <!-- U+090B: "ऋ" DEVANAGARI LETTER VOCALIC R
+ U+25CC: "◌" DOTTED CIRCLE
+ U+0943: "ृ" DEVANAGARI VOWEL SIGN VOCALIC R -->
+ <key-style
+ latin:styleName="moreKeysDevanagariVowelSignVocalicR"
+ latin:moreKeys="&#x090B;,&#x25CC;&#x0943;|&#x0943;" />
+ </case>
+ <case
latin:keyboardLayoutSet="nepali_traditional"
>
<!-- U+0913: "ओ" DEVANAGARI LETTER O -->
@@ -50,8 +60,9 @@
</switch>
<!-- U+25CC: "◌" DOTTED CIRCLE
U+0943: "ृ" DEVANAGARI VOWEL SIGN VOCALIC R -->
- <Key
- latin:keyStyle="moreKeysDevanagariVowelSignVocalicR"
+ <key-style
+ latin:styleName="baseKeyDevanagariVowelSignVocalicR"
+ latin:parentStyle="moreKeysDevanagariVowelSignVocalicR"
latin:keySpec="&#x25CC;&#x0943;|&#x0943;"
latin:keyLabelFlags="fontNormal|followKeyLetterRatio" />
</merge>
diff --git a/java/res/xml/method.xml b/java/res/xml/method.xml
index c64b3a4e0..ee1b54b1b 100644
--- a/java/res/xml/method.xml
+++ b/java/res/xml/method.xml
@@ -49,6 +49,7 @@
fr_CH: French (Switzerland)/swiss
gl_ES: Galician (Spain)/spanish
hi: Hindi/hindi
+ hi: Hindi/hindi_compact
hr: Croatian/qwertz
hu: Hungarian/qwertz
hy_AM: Armenian (Armenia) Phonetic/armenian_phonetic
@@ -321,6 +322,14 @@
android:isAsciiCapable="false"
/>
<subtype android:icon="@drawable/ic_ime_switcher_dark"
+ android:label="@string/subtype_generic_compact"
+ android:subtypeId="0xe49c89a1"
+ android:imeSubtypeLocale="hi"
+ android:imeSubtypeMode="keyboard"
+ android:imeSubtypeExtraValue="KeyboardLayoutSet=hindi_compact,EmojiCapable"
+ android:isAsciiCapable="false"
+ />
+ <subtype android:icon="@drawable/ic_ime_switcher_dark"
android:label="@string/subtype_generic"
android:subtypeId="0x35b7526a"
android:imeSubtypeLocale="hr"
@@ -485,7 +494,7 @@
android:isAsciiCapable="false"
/>
<subtype android:icon="@drawable/ic_ime_switcher_dark"
- android:label="@string/subtype_nepali_traditional"
+ android:label="@string/subtype_generic_traditional"
android:subtypeId="0x5fafea88"
android:imeSubtypeLocale="ne_NP"
android:imeSubtypeMode="keyboard"
diff --git a/java/res/xml/rowkeys_hindi1.xml b/java/res/xml/rowkeys_hindi1.xml
index 5d696b32c..cff9756cf 100644
--- a/java/res/xml/rowkeys_hindi1.xml
+++ b/java/res/xml/rowkeys_hindi1.xml
@@ -92,9 +92,9 @@
<!-- Because the font rendering system prior to API version 16 can't automatically
render dotted circle for incomplete combining letter of some scripts, different
set of Key definitions are needed based on the API version. -->
- <!-- U+0967: "१" DEVANAGARI DIGIT ONE -->
<include
latin:keyboardLayout="@xml/keystyle_devanagari_vowel_sign_au" />
+ <!-- U+0967: "१" DEVANAGARI DIGIT ONE -->
<Key
latin:keyStyle="baseKeyDevanagariVowelSignAu"
latin:keyHintLabel="1"
@@ -102,9 +102,9 @@
<!-- Because the font rendering system prior to API version 16 can't automatically
render dotted circle for incomplete combining letter of some scripts, different
set of Key definitions are needed based on the API version. -->
- <!-- U+0968: "२" DEVANAGARI DIGIT TWO -->
<include
latin:keyboardLayout="@xml/keystyle_devanagari_vowel_sign_ai" />
+ <!-- U+0968: "२" DEVANAGARI DIGIT TWO -->
<Key
latin:keyStyle="baseKeyDevanagariVowelSignAi"
latin:keyHintLabel="2"
@@ -112,9 +112,9 @@
<!-- Because the font rendering system prior to API version 16 can't automatically
render dotted circle for incomplete combining letter of some scripts, different
set of Key definitions are needed based on the API version. -->
- <!-- U+0969: "३" DEVANAGARI DIGIT THREE -->
<include
latin:keyboardLayout="@xml/keystyle_devanagari_vowel_sign_aa" />
+ <!-- U+0969: "३" DEVANAGARI DIGIT THREE -->
<Key
latin:keyStyle="baseKeyDevanagariVowelSignAa"
latin:keyHintLabel="3"
@@ -122,9 +122,9 @@
<!-- Because the font rendering system prior to API version 16 can't automatically
render dotted circle for incomplete combining letter of some scripts, different
set of Key definitions are needed based on the API version. -->
- <!-- U+096A: "४" DEVANAGARI DIGIT FOUR -->
<include
latin:keyboardLayout="@xml/keystyle_devanagari_vowel_sign_ii" />
+ <!-- U+096A: "४" DEVANAGARI DIGIT FOUR -->
<Key
latin:keyStyle="baseKeyDevanagariVowelSignIi"
latin:keyHintLabel="4"
@@ -132,9 +132,9 @@
<!-- Because the font rendering system prior to API version 16 can't automatically
render dotted circle for incomplete combining letter of some scripts, different
set of Key definitions are needed based on the API version. -->
- <!-- U+096B: "५" DEVANAGARI DIGIT FIVE -->
<include
latin:keyboardLayout="@xml/keystyle_devanagari_vowel_sign_uu" />
+ <!-- U+096B: "५" DEVANAGARI DIGIT FIVE -->
<Key
latin:keyStyle="baseKeyDevanagariVowelSignUu"
latin:keyHintLabel="5"
diff --git a/java/res/xml/rowkeys_hindi3.xml b/java/res/xml/rowkeys_hindi3.xml
index a9be47266..cf36fc5d4 100644
--- a/java/res/xml/rowkeys_hindi3.xml
+++ b/java/res/xml/rowkeys_hindi3.xml
@@ -33,7 +33,9 @@
render dotted circle for incomplete combining letter of some scripts, different
set of Key definitions are needed based on the API version. -->
<include
- latin:keyboardLayout="@xml/key_devanagari_sign_candrabindu" />
+ latin:keyboardLayout="@xml/keystyle_devanagari_sign_candrabindu" />
+ <Key
+ latin:keyStyle="baseKeyDevanagariSignCandrabindu" />
<!-- U+0923: "ण" DEVANAGARI LETTER NNA -->
<Key
latin:keySpec="&#x0923;"
@@ -59,7 +61,9 @@
render dotted circle for incomplete combining letter of some scripts, different
set of Key definitions are needed based on the API version. -->
<include
- latin:keyboardLayout="@xml/key_devanagari_vowel_sign_vocalic_r" />
+ latin:keyboardLayout="@xml/keystyle_devanagari_vowel_sign_vocalic_r" />
+ <Key
+ latin:keyStyle="baseKeyDevanagariVowelSignVocalicR" />
<!-- U+091E: "ञ" DEVANAGARI LETTER NYA -->
<Key
latin:keySpec="&#x091E;"
@@ -70,9 +74,16 @@
render dotted circle for incomplete combining letter of some scripts, different
set of Key definitions are needed based on the API version. -->
<include
- latin:keyboardLayout="@xml/key_devanagari_vowel_sign_candra_o" />
+ latin:keyboardLayout="@xml/keystyle_devanagari_vowel_sign_candra_o" />
+ <Key
+ latin:keyStyle="baseKeyDevanagariVowelSignCandraO" />
+ <!-- Because the font rendering system prior to API version 16 can't automatically
+ render dotted circle for incomplete combining letter of some scripts, different
+ set of Key definitions are needed based on the API version. -->
<include
- latin:keyboardLayout="@xml/key_devanagari_sign_anusvara" />
+ latin:keyboardLayout="@xml/keystyle_devanagari_sign_anusvara" />
+ <Key
+ latin:keyStyle="baseKeyDevanagariSignAnusvara" />
<!-- U+092E: "म" DEVANAGARI LETTER MA
U+0950: "ॐ" DEVANAGARI OM -->
<Key
@@ -112,7 +123,9 @@
render dotted circle for incomplete combining letter of some scripts, different
set of Key definitions are needed based on the API version. -->
<include
- latin:keyboardLayout="@xml/key_devanagari_sign_nukta" />
- </default>
+ latin:keyboardLayout="@xml/keystyle_devanagari_sign_nukta" />
+ <Key
+ latin:keyStyle="baseKeyDevanagariSignNukta" />
+ </default>
</switch>
</merge>
diff --git a/java/res/xml/rowkeys_hindi_compact1.xml b/java/res/xml/rowkeys_hindi_compact1.xml
new file mode 100644
index 000000000..c63de4f0b
--- /dev/null
+++ b/java/res/xml/rowkeys_hindi_compact1.xml
@@ -0,0 +1,139 @@
+<?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"
+>
+ <!-- Because the font rendering system prior to API version 16 can't automatically
+ render dotted circle for incomplete combining letter of some scripts, different
+ set of Key definitions are needed based on the API version. -->
+ <include
+ latin:keyboardLayout="@xml/keystyle_devanagari_vowel_sign_au" />
+ <!-- U+0914: "औ" DEVANAGARI LETTER AU
+ U+0967: "१" DEVANAGARI DIGIT ONE -->
+ <Key
+ latin:keySpec="&#x0914;"
+ latin:keyStyle="moreKeysDevanagariVowelSignAu"
+ latin:keyHintLabel="1"
+ latin:additionalMoreKeys="&#x0967;,1"
+ latin:keyLabelFlags="fontNormal" />
+ <!-- Because the font rendering system prior to API version 16 can't automatically
+ render dotted circle for incomplete combining letter of some scripts, different
+ set of Key definitions are needed based on the API version. -->
+ <include
+ latin:keyboardLayout="@xml/keystyle_devanagari_vowel_sign_ai" />
+ <!-- U+0910: "ऐ" DEVANAGARI LETTER AI
+ U+0968: "२" DEVANAGARI DIGIT TWO -->
+ <Key
+ latin:keySpec="&#x0910;"
+ latin:keyStyle="moreKeysDevanagariVowelSignAi"
+ latin:keyHintLabel="2"
+ latin:additionalMoreKeys="&#x0968;,2"
+ latin:keyLabelFlags="fontNormal" />
+ <!-- Because the font rendering system prior to API version 16 can't automatically
+ render dotted circle for incomplete combining letter of some scripts, different
+ set of Key definitions are needed based on the API version. -->
+ <include
+ latin:keyboardLayout="@xml/keystyle_devanagari_vowel_sign_aa" />
+ <!-- U+0906: "आ" DEVANAGARI LETTER AA
+ U+0969: "३" DEVANAGARI DIGIT THREE -->
+ <Key
+ latin:keySpec="&#x0906;"
+ latin:keyStyle="moreKeysDevanagariVowelSignAa"
+ latin:keyHintLabel="3"
+ latin:additionalMoreKeys="&#x0969;,3"
+ latin:keyLabelFlags="fontNormal" />
+ <!-- Because the font rendering system prior to API version 16 can't automatically
+ render dotted circle for incomplete combining letter of some scripts, different
+ set of Key definitions are needed based on the API version. -->
+ <include
+ latin:keyboardLayout="@xml/keystyle_devanagari_vowel_sign_ii" />
+ <!-- U+0908: "ई" DEVANAGARI LETTER II
+ U+096A: "४" DEVANAGARI DIGIT FOUR -->
+ <Key
+ latin:keySpec="&#x0908;"
+ latin:keyStyle="moreKeysDevanagariVowelSignIi"
+ latin:keyHintLabel="4"
+ latin:additionalMoreKeys="&#x096A;,4"
+ latin:keyLabelFlags="fontNormal" />
+ <!-- Because the font rendering system prior to API version 16 can't automatically
+ render dotted circle for incomplete combining letter of some scripts, different
+ set of Key definitions are needed based on the API version. -->
+ <include
+ latin:keyboardLayout="@xml/keystyle_devanagari_vowel_sign_uu" />
+ <!-- U+090A: "ऊ" DEVANAGARI LETTER UU
+ U+096B: "५" DEVANAGARI DIGIT FIVE -->
+ <Key
+ latin:keySpec="&#x090A;"
+ latin:keyStyle="moreKeysDevanagariVowelSignUu"
+ latin:keyHintLabel="5"
+ latin:additionalMoreKeys="&#x096B;,5"
+ latin:keyLabelFlags="fontNormal" />
+ <!-- U+092C: "ब" DEVANAGARI LETTER BA
+ U+092D: "भ" DEVANAGARI LETTER BHA
+ U+096C: "६" DEVANAGARI DIGIT SIX -->
+ <Key
+ latin:keySpec="&#x092C;"
+ latin:moreKeys="&#x092D;,%"
+ latin:keyHintLabel="6"
+ latin:additionalMoreKeys="&#x096C;,6"
+ latin:keyLabelFlags="fontNormal" />
+ <!-- U+0939: "ह" DEVANAGARI LETTER HA
+ U+096D: "७" DEVANAGARI DIGIT SEVEN -->
+ <Key
+ latin:keySpec="&#x0939;"
+ latin:keyHintLabel="7"
+ latin:additionalMoreKeys="&#x096D;,7"
+ latin:keyLabelFlags="fontNormal" />
+ <!-- U+0917: "ग" DEVANAGARI LETTER GA
+ U+0918: "घ" DEVANAGARI LETTER GHA
+ U+096E: "८" DEVANAGARI DIGIT EIGHT -->
+ <Key
+ latin:keySpec="&#x0917;"
+ latin:moreKeys="&#x0918;,%"
+ latin:keyHintLabel="8"
+ latin:additionalMoreKeys="&#x096E;,8"
+ latin:keyLabelFlags="fontNormal" />
+ <!-- U+0926: "द" DEVANAGARI LETTER DA
+ U+0927: "ध" DEVANAGARI LETTER DHA
+ U+096F: "९" DEVANAGARI DIGIT NINE -->
+ <Key
+ latin:keySpec="&#x0926;"
+ latin:moreKeys="&#x0927;,%"
+ latin:keyHintLabel="9"
+ latin:additionalMoreKeys="&#x096F;,9"
+ latin:keyLabelFlags="fontNormal" />
+ <!-- U+091C: "ज" DEVANAGARI LETTER JA
+ U+091D: "झ" DEVANAGARI LETTER JHA
+ U+091C/U+094D/U+091E: "ज्ञ" DEVANAGARI LETTER JA/DEVANAGARI SIGN VIRAMA/DEVANAGARI LETTER NYA
+ U+0966: "०" DEVANAGARI DIGIT ZERO -->
+ <Key
+ latin:keySpec="&#x091C;"
+ latin:moreKeys="&#x091D;,&#x091C;&#x094D;&#x091E;,%"
+ latin:keyHintLabel="0"
+ latin:additionalMoreKeys="&#x0966;,0"
+ latin:keyLabelFlags="fontNormal" />
+ <!-- U+0921: "ड" DEVANAGARI LETTER DDA
+ U+0922: "ढ" DEVANAGARI LETTER DDHA -->
+ <Key
+ latin:keySpec="&#x0921;"
+ latin:moreKeys="&#x0922;"
+ latin:keyLabelFlags="fontNormal" />
+</merge>
diff --git a/java/res/xml/rowkeys_hindi_compact2.xml b/java/res/xml/rowkeys_hindi_compact2.xml
new file mode 100644
index 000000000..06364c209
--- /dev/null
+++ b/java/res/xml/rowkeys_hindi_compact2.xml
@@ -0,0 +1,115 @@
+<?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"
+>
+ <!-- Because the font rendering system prior to API version 16 can't automatically
+ render dotted circle for incomplete combining letter of some scripts, different
+ set of Key definitions are needed based on the API version. -->
+ <include
+ latin:keyboardLayout="@xml/keystyle_devanagari_vowel_sign_o" />
+ <!-- U+0913: "ओ" DEVANAGARI LETTER O -->
+ <Key
+ latin:keySpec="&#x0913;"
+ latin:keyStyle="moreKeysDevanagariVowelSignO"
+ latin:keyLabelFlags="fontNormal" />
+ <!-- Because the font rendering system prior to API version 16 can't automatically
+ render dotted circle for incomplete combining letter of some scripts, different
+ set of Key definitions are needed based on the API version. -->
+ <include
+ latin:keyboardLayout="@xml/keystyle_devanagari_vowel_sign_e" />
+ <!-- U+090F: "ए" DEVANAGARI LETTER E -->
+ <Key
+ latin:keySpec="&#x090F;"
+ latin:keyStyle="moreKeysDevanagariVowelSignE"
+ latin:keyLabelFlags="fontNormal" />
+ <!-- Because the font rendering system prior to API version 16 can't automatically
+ render dotted circle for incomplete combining letter of some scripts, different
+ set of Key definitions are needed based on the API version. -->
+ <include
+ latin:keyboardLayout="@xml/keystyle_devanagari_sign_virama" />
+ <!-- U+0905: "अ" DEVANAGARI LETTER A -->
+ <Key
+ latin:keySpec="&#x0905;"
+ latin:keyStyle="moreKeysDevanagariSignVirama"
+ latin:keyLabelFlags="fontNormal" />
+ <!-- Because the font rendering system prior to API version 16 can't automatically
+ render dotted circle for incomplete combining letter of some scripts, different
+ set of Key definitions are needed based on the API version. -->
+ <include
+ latin:keyboardLayout="@xml/keystyle_devanagari_vowel_sign_i" />
+ <!-- U+0907: "इ" DEVANAGARI LETTER I -->
+ <Key
+ latin:keySpec="&#x0907;"
+ latin:keyStyle="moreKeysDevanagariVowelSignI"
+ latin:keyLabelFlags="fontNormal" />
+ <!-- Because the font rendering system prior to API version 16 can't automatically
+ render dotted circle for incomplete combining letter of some scripts, different
+ set of Key definitions are needed based on the API version. -->
+ <include
+ latin:keyboardLayout="@xml/keystyle_devanagari_vowel_sign_u" />
+ <!-- U+0909: "उ" DEVANAGARI LETTER U -->
+ <Key
+ latin:keySpec="&#x0909;"
+ latin:keyStyle="moreKeysDevanagariVowelSignU"
+ latin:keyLabelFlags="fontNormal" />
+ <!-- U+092A: "प" DEVANAGARI LETTER PA
+ U+092B: "फ" DEVANAGARI LETTER PHA -->
+ <Key
+ latin:keySpec="&#x092A;"
+ latin:moreKeys="&#x092B;"
+ latin:keyLabelFlags="fontNormal" />
+ <!-- Because the font rendering system prior to API version 16 can't automatically
+ render dotted circle for incomplete combining letter of some scripts, different
+ set of Key definitions are needed based on the API version. -->
+ <include
+ latin:keyboardLayout="@xml/keystyle_devanagari_vowel_sign_vocalic_r" />
+ <!-- U+0930: "र" DEVANAGARI LETTER RA -->
+ <Key
+ latin:keySpec="&#x0930;"
+ latin:keyStyle="moreKeysDevanagariVowelSignVocalicR"
+ latin:keyLabelFlags="fontNormal" />
+ <!-- U+0915: "क" DEVANAGARI LETTER KA
+ U+0916: "ख" DEVANAGARI LETTER KHA -->
+ <Key
+ latin:keySpec="&#x0915;"
+ latin:moreKeys="&#x0916;"
+ latin:keyLabelFlags="fontNormal" />
+ <!-- U+0924: "त" DEVANAGARI LETTER TA
+ U+0925: "थ" DEVANAGARI LETTER THA
+ U+0924/U+094D/U+0930: "त्र" DEVANAGARI LETTER TA/DEVANAGARI SIGN VIRAMA/DEVANAGARI LETTER RA -->
+ <Key
+ latin:keySpec="&#x0924;"
+ latin:moreKeys="&#x0925;,&#x0924;&#x094D;&#x0930;"
+ latin:keyLabelFlags="fontNormal" />
+ <!-- U+091A: "च" DEVANAGARI LETTER CA
+ U+091B: "छ" DEVANAGARI LETTER CHA -->
+ <Key
+ latin:keySpec="&#x091A;"
+ latin:moreKeys="&#x091B;"
+ latin:keyLabelFlags="fontNormal" />
+ <!-- U+091F: "ट" DEVANAGARI LETTER TTA
+ U+0920: "ठ" DEVANAGARI LETTER TTHA -->
+ <Key
+ latin:keySpec="&#x091F;"
+ latin:moreKeys="&#x0920;"
+ latin:keyLabelFlags="fontNormal" />
+</merge>
diff --git a/java/res/xml/rowkeys_hindi_compact3.xml b/java/res/xml/rowkeys_hindi_compact3.xml
new file mode 100644
index 000000000..0e8165ecc
--- /dev/null
+++ b/java/res/xml/rowkeys_hindi_compact3.xml
@@ -0,0 +1,89 @@
+<?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"
+>
+ <!-- Because the font rendering system prior to API version 16 can't automatically
+ render dotted circle for incomplete combining letter of some scripts, different
+ set of Key definitions are needed based on the API version. -->
+ <include
+ latin:keyboardLayout="@xml/keystyle_devanagari_vowel_sign_candra_o" />
+ <!-- U+0911: "ऑ" DEVANAGARI LETTER CANDRA O -->
+ <Key
+ latin:keySpec="&#x0911;"
+ latin:keyStyle="moreKeysDevanagariVowelSignCandraO"
+ latin:keyLabelFlags="fontNormal" />
+ <!-- Because the font rendering system prior to API version 16 can't automatically
+ render dotted circle for incomplete combining letter of some scripts, different
+ set of Key definitions are needed based on the API version. -->
+ <include
+ latin:keyboardLayout="@xml/keystyle_devanagari_vowel_sign_candra_e" />
+ <!-- U+090D: "ऍ" DEVANAGARI LETTER CANDRA E -->
+ <Key
+ latin:keySpec="&#x090D;"
+ latin:keyStyle="moreKeysDevanagariVowelSignCandraE"
+ latin:keyLabelFlags="fontNormal" />
+ <!-- Because the font rendering system prior to API version 16 can't automatically
+ render dotted circle for incomplete combining letter of some scripts, different
+ set of Key definitions are needed based on the API version. -->
+ <include
+ latin:keyboardLayout="@xml/keystyle_devanagari_sign_anusvara" />
+ <Key
+ latin:keyStyle="baseKeyDevanagariSignAnusvara" />
+ <!-- U+092E: "म" DEVANAGARI LETTER MA
+ U+0950: "ॐ" DEVANAGARI OM -->
+ <Key
+ latin:keySpec="&#x092E;"
+ latin:moreKeys="&#x0950;"
+ latin:keyLabelFlags="fontNormal" />
+ <!-- U+0928: "न" DEVANAGARI LETTER NA
+ U+0923: "ण" DEVANAGARI LETTER NNA
+ U+091E: "ञ" DEVANAGARI LETTER NYA
+ U+0919: "ङ" DEVANAGARI LETTER NGA -->
+ <Key
+ latin:keySpec="&#x0928;"
+ latin:moreKeys="&#x0923;,&#x091E;,&#x0919;"
+ latin:keyLabelFlags="fontNormal" />
+ <!-- U+0935: "व" DEVANAGARI LETTER VA -->
+ <Key
+ latin:keySpec="&#x0935;"
+ latin:keyLabelFlags="fontNormal" />
+ <!-- U+0932: "ल" DEVANAGARI LETTER LA -->
+ <Key
+ latin:keySpec="&#x0932;"
+ latin:keyLabelFlags="fontNormal" />
+ <!-- U+0938: "स" DEVANAGARI LETTER SA
+ U+0936: "श" DEVANAGARI LETTER SHA
+ U+0937: "ष" DEVANAGARI LETTER SSA
+ U+0936/U+094D/U+0930: "श्र" DEVANAGARI LETTER SHA/DEVANAGARI SIGN VIRAMA/DEVANAGARI LETTER RA -->
+ <Key
+ latin:keySpec="&#x0938;"
+ latin:moreKeys="&#x0936;,&#x0937;,&#x0936;&#x094D;&#x0930;"
+ latin:keyLabelFlags="fontNormal" />
+ <!-- U+092F: "य" DEVANAGARI LETTER YA -->
+ <Key
+ latin:keySpec="&#x092F;"
+ latin:keyLabelFlags="fontNormal" />
+ <!-- U+0915/U+094D/U+0937: "क्ष" DEVANAGARI LETTER KA/DEVANAGARI SIGN VIRAMA/DEVANAGARI LETTER SSA -->
+ <Key
+ latin:keySpec="&#x0915;&#x094D;&#x0937;"
+ latin:keyLabelFlags="fontNormal|followKeyLetterRatio" />
+</merge>
diff --git a/java/res/xml/rowkeys_nepali_romanized1.xml b/java/res/xml/rowkeys_nepali_romanized1.xml
index 3c082c2fe..616b259a3 100644
--- a/java/res/xml/rowkeys_nepali_romanized1.xml
+++ b/java/res/xml/rowkeys_nepali_romanized1.xml
@@ -44,7 +44,9 @@
render dotted circle for incomplete combining letter of some scripts, different
set of Key definitions are needed based on the API version. -->
<include
- latin:keyboardLayout="@xml/key_devanagari_vowel_sign_vocalic_r" />
+ latin:keyboardLayout="@xml/keystyle_devanagari_vowel_sign_vocalic_r" />
+ <Key
+ latin:keyStyle="baseKeyDevanagariVowelSignVocalicR" />
<!-- U+0925: "थ" DEVANAGARI LETTER THA -->
<Key
latin:keySpec="&#x0925;"
@@ -81,21 +83,25 @@
latin:keyLabelFlags="fontNormal" />
</case>
<default>
+ <!-- Because the font rendering system prior to API version 16 can't automatically
+ render dotted circle for incomplete combining letter of some scripts, different
+ set of Key definitions are needed based on the API version. -->
+ <include
+ latin:keyboardLayout="@xml/keystyle_devanagari_sign_nukta" />
<!-- U+091F: "ट" DEVANAGARI LETTER TTA
- U+0967: "१" DEVANAGARI DIGIT ONE
- U+093C: "़" DEVANAGARI SIGN NUKTA -->
+ U+0967: "१" DEVANAGARI DIGIT ONE -->
<Key
latin:keySpec="&#x091F;"
latin:keyHintLabel="1"
latin:additionalMoreKeys="&#x0967;,1"
- latin:moreKeys="&#x093C;"
+ latin:keyStyle="moreKeysDevanagariSignNukta"
latin:keyLabelFlags="fontNormal" />
<!-- Because the font rendering system prior to API version 16 can't automatically
render dotted circle for incomplete combining letter of some scripts, different
set of Key definitions are needed based on the API version. -->
- <!-- U+0968: "२" DEVANAGARI DIGIT TWO -->
<include
latin:keyboardLayout="@xml/keystyle_devanagari_vowel_sign_au" />
+ <!-- U+0968: "२" DEVANAGARI DIGIT TWO -->
<Key
latin:keyStyle="baseKeyDevanagariVowelSignAu"
latin:keyHintLabel="2"
@@ -103,9 +109,9 @@
<!-- Because the font rendering system prior to API version 16 can't automatically
render dotted circle for incomplete combining letter of some scripts, different
set of Key definitions are needed based on the API version. -->
- <!-- U+0969: "३" DEVANAGARI DIGIT THREE -->
<include
latin:keyboardLayout="@xml/keystyle_devanagari_vowel_sign_e" />
+ <!-- U+0969: "३" DEVANAGARI DIGIT THREE -->
<Key
latin:keyStyle="baseKeyDevanagariVowelSignE"
latin:keyHintLabel="3"
@@ -134,9 +140,9 @@
<!-- Because the font rendering system prior to API version 16 can't automatically
render dotted circle for incomplete combining letter of some scripts, different
set of Key definitions are needed based on the API version. -->
- <!-- U+096D: "७" DEVANAGARI DIGIT SEVEN -->
<include
latin:keyboardLayout="@xml/keystyle_devanagari_vowel_sign_u" />
+ <!-- U+096D: "७" DEVANAGARI DIGIT SEVEN -->
<Key
latin:keyStyle="baseKeyDevanagariVowelSignU"
latin:keyHintLabel="7"
@@ -144,9 +150,9 @@
<!-- Because the font rendering system prior to API version 16 can't automatically
render dotted circle for incomplete combining letter of some scripts, different
set of Key definitions are needed based on the API version. -->
- <!-- U+096E: "८" DEVANAGARI DIGIT EIGHT -->
<include
latin:keyboardLayout="@xml/keystyle_devanagari_vowel_sign_i" />
+ <!-- U+096E: "८" DEVANAGARI DIGIT EIGHT -->
<Key
latin:keyStyle="baseKeyDevanagariVowelSignI"
latin:keyHintLabel="8"
@@ -154,9 +160,9 @@
<!-- Because the font rendering system prior to API version 16 can't automatically
render dotted circle for incomplete combining letter of some scripts, different
set of Key definitions are needed based on the API version. -->
- <!-- U+096F: "९" DEVANAGARI DIGIT NINE -->
<include
latin:keyboardLayout="@xml/keystyle_devanagari_vowel_sign_o" />
+ <!-- U+096F: "९" DEVANAGARI DIGIT NINE -->
<Key
latin:keyStyle="baseKeyDevanagariVowelSignO"
latin:keyHintLabel="9"
diff --git a/java/res/xml/rowkeys_nepali_romanized3.xml b/java/res/xml/rowkeys_nepali_romanized3.xml
index 232d96e02..cc2ca8c84 100644
--- a/java/res/xml/rowkeys_nepali_romanized3.xml
+++ b/java/res/xml/rowkeys_nepali_romanized3.xml
@@ -41,7 +41,9 @@
render dotted circle for incomplete combining letter of some scripts, different
set of Key definitions are needed based on the API version. -->
<include
- latin:keyboardLayout="@xml/key_devanagari_sign_candrabindu" />
+ latin:keyboardLayout="@xml/keystyle_devanagari_sign_candrabindu" />
+ <Key
+ latin:keyStyle="baseKeyDevanagariSignCandrabindu" />
<!-- U+092D: "भ" DEVANAGARI LETTER BHA -->
<Key
latin:keySpec="&#x092D;"
@@ -54,7 +56,9 @@
render dotted circle for incomplete combining letter of some scripts, different
set of Key definitions are needed based on the API version. -->
<include
- latin:keyboardLayout="@xml/key_devanagari_sign_anusvara" />
+ latin:keyboardLayout="@xml/keystyle_devanagari_sign_anusvara" />
+ <Key
+ latin:keyStyle="baseKeyDevanagariSignAnusvara" />
<!-- U+0919: "ङ" DEVANAGARI LETTER NGA -->
<Key
latin:keySpec="&#x0919;"
diff --git a/java/res/xml/rowkeys_nepali_traditional1.xml b/java/res/xml/rowkeys_nepali_traditional1.xml
index 98a7be260..cf4bda982 100644
--- a/java/res/xml/rowkeys_nepali_traditional1.xml
+++ b/java/res/xml/rowkeys_nepali_traditional1.xml
@@ -91,7 +91,9 @@
render dotted circle for incomplete combining letter of some scripts, different
set of Key definitions are needed based on the API version. -->
<include
- latin:keyboardLayout="@xml/key_devanagari_vowel_sign_vocalic_r" />
+ latin:keyboardLayout="@xml/keystyle_devanagari_vowel_sign_vocalic_r" />
+ <Key
+ latin:keyStyle="baseKeyDevanagariVowelSignVocalicR" />
</case>
<default>
<!-- U+091F: "ट" DEVANAGARI LETTER TTA
diff --git a/java/res/xml/rowkeys_nepali_traditional2.xml b/java/res/xml/rowkeys_nepali_traditional2.xml
index 5ea14ea0d..58a463e71 100644
--- a/java/res/xml/rowkeys_nepali_traditional2.xml
+++ b/java/res/xml/rowkeys_nepali_traditional2.xml
@@ -41,7 +41,9 @@
render dotted circle for incomplete combining letter of some scripts, different
set of Key definitions are needed based on the API version. -->
<include
- latin:keyboardLayout="@xml/key_devanagari_sign_candrabindu" />
+ latin:keyboardLayout="@xml/keystyle_devanagari_sign_candrabindu" />
+ <Key
+ latin:keyStyle="baseKeyDevanagariSignCandrabindu" />
<!-- U+0926/U+094D/U+0926: "द्द" DEVANAGARI LETTER DA/DEVANAGARI SIGN VIRAMA/DEVANAGARI LETTER DA -->
<Key
latin:keySpec="&#x0926;&#x094D;&#x0926;"
diff --git a/java/res/xml/rowkeys_nepali_traditional3_right3.xml b/java/res/xml/rowkeys_nepali_traditional3_right3.xml
index d6a74d46a..3e6187d11 100644
--- a/java/res/xml/rowkeys_nepali_traditional3_right3.xml
+++ b/java/res/xml/rowkeys_nepali_traditional3_right3.xml
@@ -29,7 +29,9 @@
render dotted circle for incomplete combining letter of some scripts, different
set of Key definitions are needed based on the API version. -->
<include
- latin:keyboardLayout="@xml/key_devanagari_sign_anusvara" />
+ latin:keyboardLayout="@xml/keystyle_devanagari_sign_anusvara" />
+ <Key
+ latin:keyStyle="baseKeyDevanagariSignAnusvara" />
<!-- U+0919: "ङ" DEVANAGARI LETTER NGA -->
<Key
latin:keySpec="&#x0919;"
@@ -54,8 +56,8 @@
<Key
latin:keySpec="&#x0964;"
latin:keyLabelFlags="fontNormal" />
- <!-- U+0930: "र" DEVANAGARI LETTER RA
- U+0930/U+0941: "रु" DEVANAGARI LETTER RA/DEVANAGARI VOWEL SIGN U -->
+ <!-- U+0930: "र" DEVANAGARI LETTER RA
+ U+0930/U+0941: "रु" DEVANAGARI LETTER RA/DEVANAGARI VOWEL SIGN U -->
<Key
latin:keySpec="&#x0930;"
latin:moreKeys="&#x0930;&#x0941;"
diff --git a/java/res/xml/rowkeys_nepali_traditional3_right5.xml b/java/res/xml/rowkeys_nepali_traditional3_right5.xml
index a34f40097..89d5aa469 100644
--- a/java/res/xml/rowkeys_nepali_traditional3_right5.xml
+++ b/java/res/xml/rowkeys_nepali_traditional3_right5.xml
@@ -29,7 +29,9 @@
render dotted circle for incomplete combining letter of some scripts, different
set of Key definitions are needed based on the API version. -->
<include
- latin:keyboardLayout="@xml/key_devanagari_sign_anusvara" />
+ latin:keyboardLayout="@xml/keystyle_devanagari_sign_anusvara" />
+ <Key
+ latin:keyStyle="baseKeyDevanagariSignAnusvara" />
<!-- U+0919: "ङ" DEVANAGARI LETTER NGA -->
<Key
latin:keySpec="&#x0919;"
@@ -53,9 +55,9 @@
<!-- Because the font rendering system prior to API version 16 can't automatically
render dotted circle for incomplete combining letter of some scripts, different
set of Key definitions are needed based on the API version. -->
- <!-- U+093D: "ऽ" DEVANAGARI SIGN AVAGRAHA -->
<include
latin:keyboardLayout="@xml/keystyle_devanagari_sign_visarga" />
+ <!-- U+093D: "ऽ" DEVANAGARI SIGN AVAGRAHA -->
<Key
latin:keyStyle="baseKeyDevanagariSignVisarga"
latin:moreKeys="&#x093D;" />
diff --git a/java/res/xml/rows_hindi_compact.xml b/java/res/xml/rows_hindi_compact.xml
new file mode 100644
index 000000000..a60cf2b02
--- /dev/null
+++ b/java/res/xml/rows_hindi_compact.xml
@@ -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="9.091%p"
+ >
+ <include
+ latin:keyboardLayout="@xml/rowkeys_hindi_compact1" />
+ </Row>
+ <Row
+ latin:keyWidth="9.091%p"
+ >
+ <include
+ latin:keyboardLayout="@xml/rowkeys_hindi_compact2" />
+ </Row>
+ <Row
+ latin:keyWidth="9.091%p"
+ >
+ <include
+ latin:keyboardLayout="@xml/rowkeys_hindi_compact3" />
+ <Key
+ latin:keyStyle="deleteKeyStyle"
+ latin:keyWidth="fillRight" />
+ </Row>
+ <include
+ latin:keyboardLayout="@xml/row_qwerty4" />
+</merge>
diff --git a/java/src/com/android/inputmethod/dictionarypack/MetadataDbHelper.java b/java/src/com/android/inputmethod/dictionarypack/MetadataDbHelper.java
index 8badaf4b9..4a8fa51ee 100644
--- a/java/src/com/android/inputmethod/dictionarypack/MetadataDbHelper.java
+++ b/java/src/com/android/inputmethod/dictionarypack/MetadataDbHelper.java
@@ -45,10 +45,8 @@ public class MetadataDbHelper extends SQLiteOpenHelper {
// This is the first released version of the database that implements CLIENTID. It is
// used to identify the versions for upgrades. This should never change going forward.
private static final int METADATA_DATABASE_VERSION_WITH_CLIENTID = 6;
- // This is the current database version. It should be updated when the database schema
- // gets updated. It is passed to the framework constructor of SQLiteOpenHelper, so
- // that's what the framework uses to track our database version.
- private static final int METADATA_DATABASE_VERSION = 6;
+ // The current database version.
+ private static final int CURRENT_METADATA_DATABASE_VERSION = 7;
private final static long NOT_A_DOWNLOAD_ID = -1;
@@ -169,7 +167,7 @@ public class MetadataDbHelper extends SQLiteOpenHelper {
private MetadataDbHelper(final Context context, final String clientId) {
super(context,
METADATA_DATABASE_NAME_STEM + (TextUtils.isEmpty(clientId) ? "" : "." + clientId),
- null, METADATA_DATABASE_VERSION);
+ null, CURRENT_METADATA_DATABASE_VERSION);
mContext = context;
mClientId = clientId;
}
@@ -219,22 +217,45 @@ public class MetadataDbHelper extends SQLiteOpenHelper {
/**
* Upgrade the database. Upgrade from version 3 is supported.
+ * Version 3 has a DB named METADATA_DATABASE_NAME_STEM containing a table METADATA_TABLE_NAME.
+ * Version 6 and above has a DB named METADATA_DATABASE_NAME_STEM containing a
+ * table CLIENT_TABLE_NAME, and for each client a table called METADATA_TABLE_STEM + "." + the
+ * name of the client and contains a table METADATA_TABLE_NAME.
+ * For schemas, see the above create statements. The schemas have never changed so far.
+ *
+ * This method is called by the framework. See {@link SQLiteOpenHelper#onUpgrade}
+ * @param db The database we are upgrading
+ * @param oldVersion The old database version (the one on the disk)
+ * @param newVersion The new database version as supplied to the constructor of SQLiteOpenHelper
*/
@Override
public void onUpgrade(final SQLiteDatabase db, final int oldVersion, final int newVersion) {
if (METADATA_DATABASE_INITIAL_VERSION == oldVersion
- && METADATA_DATABASE_VERSION_WITH_CLIENTID == newVersion) {
+ && METADATA_DATABASE_VERSION_WITH_CLIENTID <= newVersion
+ && CURRENT_METADATA_DATABASE_VERSION >= newVersion) {
// Upgrade from version METADATA_DATABASE_INITIAL_VERSION to version
// METADATA_DATABASE_VERSION_WITH_CLIENT_ID
+ // Only the default database should contain the client table, so we test for mClientId.
if (TextUtils.isEmpty(mClientId)) {
- // Only the default database should contain the client table.
- // Anyway in version 3 only the default table existed so the emptyness
+ // Anyway in version 3 only the default table existed so the emptiness
// test should always be true, but better check to be sure.
createClientTable(db);
}
+ } else if (METADATA_DATABASE_VERSION_WITH_CLIENTID < newVersion
+ && CURRENT_METADATA_DATABASE_VERSION >= newVersion) {
+ // Here we drop the client table, so that all clients send us their information again.
+ // The client table contains the URL to hit to update the available dictionaries list,
+ // but the info about the dictionaries themselves is stored in the table called
+ // METADATA_TABLE_NAME and we want to keep it, so we only drop the client table.
+ db.execSQL("DROP TABLE IF EXISTS " + CLIENT_TABLE_NAME);
+ // Only the default database should contain the client table, so we test for mClientId.
+ if (TextUtils.isEmpty(mClientId)) {
+ createClientTable(db);
+ }
} else {
- // Version 3 was the earliest version, so we should never come here. If we do, we
- // have no idea what this database is, so we'd better wipe it off.
+ // If we're not in the above case, either we are upgrading from an earlier versionCode
+ // and we should wipe the database, or we are handling a version we never heard about
+ // (can only be a bug) so it's safer to wipe the database.
db.execSQL("DROP TABLE IF EXISTS " + METADATA_TABLE_NAME);
db.execSQL("DROP TABLE IF EXISTS " + CLIENT_TABLE_NAME);
onCreate(db);
diff --git a/java/src/com/android/inputmethod/latin/BinaryDictionary.java b/java/src/com/android/inputmethod/latin/BinaryDictionary.java
index 43a44221d..30c2dfedb 100644
--- a/java/src/com/android/inputmethod/latin/BinaryDictionary.java
+++ b/java/src/com/android/inputmethod/latin/BinaryDictionary.java
@@ -89,6 +89,8 @@ public final class BinaryDictionary extends Dictionary {
private final long mDictSize;
private final String mDictFilePath;
private final boolean mIsUpdatable;
+ private boolean mHasUpdated;
+
private final int[] mInputCodePoints = new int[MAX_WORD_LENGTH];
private final int[] mOutputSuggestionCount = new int[1];
private final int[] mOutputCodePoints = new int[MAX_WORD_LENGTH * MAX_RESULTS];
@@ -138,6 +140,7 @@ public final class BinaryDictionary extends Dictionary {
mDictSize = length;
mDictFilePath = filename;
mIsUpdatable = isUpdatable;
+ mHasUpdated = false;
mNativeSuggestOptions.setUseFullEditDistance(useFullEditDistance);
loadDictionary(filename, offset, length, isUpdatable);
}
@@ -185,6 +188,7 @@ public final class BinaryDictionary extends Dictionary {
// TODO: Move native dict into session
private final void loadDictionary(final String path, final long startOffset,
final long length, final boolean isUpdatable) {
+ mHasUpdated = false;
mNativeDict = openNative(path, startOffset, length, isUpdatable);
}
@@ -401,6 +405,7 @@ public final class BinaryDictionary extends Dictionary {
StringUtils.toCodePointArray(shortcutTarget) : null;
addUnigramWordNative(mNativeDict, codePoints, probability, shortcutTargetCodePoints,
shortcutProbability, isNotAWord, isBlacklisted, timestamp);
+ mHasUpdated = true;
}
// Add a bigram entry to binary dictionary with timestamp in native code.
@@ -412,6 +417,7 @@ public final class BinaryDictionary extends Dictionary {
final int[] codePoints0 = StringUtils.toCodePointArray(word0);
final int[] codePoints1 = StringUtils.toCodePointArray(word1);
addBigramWordsNative(mNativeDict, codePoints0, codePoints1, probability, timestamp);
+ mHasUpdated = true;
}
// Remove a bigram entry form binary dictionary in native code.
@@ -422,6 +428,7 @@ public final class BinaryDictionary extends Dictionary {
final int[] codePoints0 = StringUtils.toCodePointArray(word0);
final int[] codePoints1 = StringUtils.toCodePointArray(word1);
removeBigramWordsNative(mNativeDict, codePoints0, codePoints1);
+ mHasUpdated = true;
}
public void addMultipleDictionaryEntries(final LanguageModelParam[] languageModelParams) {
@@ -433,6 +440,7 @@ public final class BinaryDictionary extends Dictionary {
}
processedParamCount = addMultipleDictionaryEntriesNative(mNativeDict,
languageModelParams, processedParamCount);
+ mHasUpdated = true;
if (processedParamCount <= 0) {
return;
}
@@ -451,8 +459,10 @@ public final class BinaryDictionary extends Dictionary {
public void flush() {
if (!isValidDictionary()) return;
- flushNative(mNativeDict, mDictFilePath);
- reopen();
+ if (mHasUpdated) {
+ flushNative(mNativeDict, mDictFilePath);
+ reopen();
+ }
}
public void flushWithGC() {
diff --git a/java/src/com/android/inputmethod/latin/ContactsBinaryDictionary.java b/java/src/com/android/inputmethod/latin/ContactsBinaryDictionary.java
index 4e17f8389..d5873d70f 100644
--- a/java/src/com/android/inputmethod/latin/ContactsBinaryDictionary.java
+++ b/java/src/com/android/inputmethod/latin/ContactsBinaryDictionary.java
@@ -100,10 +100,6 @@ public class ContactsBinaryDictionary extends ExpandableBinaryDictionary {
});
}
- public void reopen(final Context context) {
- registerObserver(context);
- }
-
@Override
public synchronized void close() {
if (mObserver != null) {
diff --git a/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java b/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java
index aea4811a9..64e9d2b51 100644
--- a/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java
+++ b/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java
@@ -262,6 +262,9 @@ abstract public class ExpandableBinaryDictionary extends Dictionary {
ExecutorUtils.getExecutor(mDictName).execute(new Runnable() {
@Override
public void run() {
+ if (mBinaryDictionary == null) {
+ return;
+ }
runGCAfterAllPrioritizedTasksIfRequiredLocked(mindsBlockByGC);
}
});
@@ -274,9 +277,6 @@ abstract public class ExpandableBinaryDictionary extends Dictionary {
}
private void runGCAfterAllPrioritizedTasksIfRequiredLocked(final boolean mindsBlockByGC) {
- if (mBinaryDictionary == null) {
- return;
- }
// needsToRunGC() have to be called with lock.
if (mBinaryDictionary.needsToRunGC(mindsBlockByGC)) {
if (setProcessingLargeTaskIfNot()) {
@@ -301,9 +301,13 @@ abstract public class ExpandableBinaryDictionary extends Dictionary {
protected void addWordDynamically(final String word, final int frequency,
final String shortcutTarget, final int shortcutFreq, final boolean isNotAWord,
final boolean isBlacklisted, final int timestamp) {
+ reloadDictionaryIfRequired();
ExecutorUtils.getExecutor(mDictName).execute(new Runnable() {
@Override
public void run() {
+ if (mBinaryDictionary == null) {
+ return;
+ }
runGCAfterAllPrioritizedTasksIfRequiredLocked(true /* mindsBlockByGC */);
addWordDynamicallyLocked(word, frequency, shortcutTarget, shortcutFreq,
isNotAWord, isBlacklisted, timestamp);
@@ -323,9 +327,13 @@ abstract public class ExpandableBinaryDictionary extends Dictionary {
*/
protected void addBigramDynamically(final String word0, final String word1,
final int frequency, final int timestamp) {
+ reloadDictionaryIfRequired();
ExecutorUtils.getExecutor(mDictName).execute(new Runnable() {
@Override
public void run() {
+ if (mBinaryDictionary == null) {
+ return;
+ }
runGCAfterAllPrioritizedTasksIfRequiredLocked(true /* mindsBlockByGC */);
addBigramDynamicallyLocked(word0, word1, frequency, timestamp);
}
@@ -341,9 +349,13 @@ abstract public class ExpandableBinaryDictionary extends Dictionary {
* Dynamically remove a word bigram in the dictionary.
*/
protected void removeBigramDynamically(final String word0, final String word1) {
+ reloadDictionaryIfRequired();
ExecutorUtils.getExecutor(mDictName).execute(new Runnable() {
@Override
public void run() {
+ if (mBinaryDictionary == null) {
+ return;
+ }
runGCAfterAllPrioritizedTasksIfRequiredLocked(true /* mindsBlockByGC */);
mBinaryDictionary.removeBigramWords(word0, word1);
}
@@ -360,14 +372,15 @@ abstract public class ExpandableBinaryDictionary extends Dictionary {
protected void addMultipleDictionaryEntriesDynamically(
final ArrayList<LanguageModelParam> languageModelParams,
final AddMultipleDictionaryEntriesCallback callback) {
+ reloadDictionaryIfRequired();
ExecutorUtils.getExecutor(mDictName).execute(new Runnable() {
@Override
public void run() {
+ if (mBinaryDictionary == null) {
+ return;
+ }
final boolean locked = setProcessingLargeTaskIfNot();
try {
- if (mBinaryDictionary == null) {
- return;
- }
mBinaryDictionary.addMultipleDictionaryEntries(
languageModelParams.toArray(
new LanguageModelParam[languageModelParams.size()]));
diff --git a/java/src/com/android/inputmethod/latin/ImportantNoticeDialog.java b/java/src/com/android/inputmethod/latin/ImportantNoticeDialog.java
index 9870faa98..be54b669b 100644
--- a/java/src/com/android/inputmethod/latin/ImportantNoticeDialog.java
+++ b/java/src/com/android/inputmethod/latin/ImportantNoticeDialog.java
@@ -23,6 +23,7 @@ import android.content.DialogInterface.OnClickListener;
import android.content.DialogInterface.OnDismissListener;
import android.content.DialogInterface.OnShowListener;
+import com.android.inputmethod.latin.utils.DialogUtils;
import com.android.inputmethod.latin.utils.ImportantNoticeUtils;
/**
@@ -40,7 +41,7 @@ public final class ImportantNoticeDialog extends AlertDialog implements OnShowLi
public ImportantNoticeDialog(
final Context context, final ImportantNoticeDialogListener listener) {
- super(context, THEME_HOLO_DARK);
+ super(DialogUtils.getPlatformDialogThemeContext(context));
mListener = listener;
mNextImportantNoticeVersion = ImportantNoticeUtils.getNextImportantNoticeVersion(context);
setMessage(ImportantNoticeUtils.getNextImportantNoticeContents(context));
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 8b3e358bd..ca99998e0 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -83,6 +83,7 @@ import com.android.inputmethod.latin.suggestions.SuggestionStripViewAccessor;
import com.android.inputmethod.latin.utils.ApplicationUtils;
import com.android.inputmethod.latin.utils.CapsModeUtils;
import com.android.inputmethod.latin.utils.CoordinateUtils;
+import com.android.inputmethod.latin.utils.DialogUtils;
import com.android.inputmethod.latin.utils.ImportantNoticeUtils;
import com.android.inputmethod.latin.utils.IntentUtils;
import com.android.inputmethod.latin.utils.JniUtils;
@@ -1662,8 +1663,9 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
}
}
};
- final AlertDialog.Builder builder =
- new AlertDialog.Builder(this).setItems(items, listener).setTitle(title);
+ final AlertDialog.Builder builder = new AlertDialog.Builder(
+ DialogUtils.getPlatformDialogThemeContext(this));
+ builder.setItems(items, listener).setTitle(title);
showOptionDialog(builder.create());
}
diff --git a/java/src/com/android/inputmethod/latin/WordComposer.java b/java/src/com/android/inputmethod/latin/WordComposer.java
index f31fb134c..5d21554ae 100644
--- a/java/src/com/android/inputmethod/latin/WordComposer.java
+++ b/java/src/com/android/inputmethod/latin/WordComposer.java
@@ -169,64 +169,63 @@ public final class WordComposer {
* coordinates.
*/
public void add(final Event event) {
+ processEvent(event);
+ }
+
+ private void processEvent(final Event event) {
final int primaryCode = event.mCodePoint;
final int keyX = event.mX;
final int keyY = event.mY;
final int newIndex = size();
- processEvent(event);
+ mCombinerChain.processEvent(mEvents, event);
+ mEvents.add(event);
+ refreshTypedWordCache();
mCursorPositionWithinWord = mCodePointSize;
- if (newIndex < MAX_WORD_LENGTH) {
- mPrimaryKeyCodes[newIndex] = primaryCode >= Constants.CODE_SPACE
- ? Character.toLowerCase(primaryCode) : primaryCode;
- // In the batch input mode, the {@code mInputPointers} holds batch input points and
- // shouldn't be overridden by the "typed key" coordinates
- // (See {@link #setBatchInputWord}).
- if (!mIsBatchMode) {
- // TODO: Set correct pointer id and time
- mInputPointers.addPointerAt(newIndex, keyX, keyY, 0, 0);
- }
+ // We may have deleted the last one.
+ if (0 == mCodePointSize) {
+ mIsFirstCharCapitalized = false;
}
- mIsFirstCharCapitalized = isFirstCharCapitalized(
- newIndex, primaryCode, mIsFirstCharCapitalized);
- if (Character.isUpperCase(primaryCode)) mCapsCount++;
- if (Character.isDigit(primaryCode)) mDigitsCount++;
- if (Constants.CODE_SINGLE_QUOTE == primaryCode) {
- ++mTrailingSingleQuotesCount;
+ if (Constants.CODE_DELETE == event.mKeyCode) {
+ if (mTrailingSingleQuotesCount > 0) {
+ --mTrailingSingleQuotesCount;
+ } else {
+ // Delete, but we didn't end in a quote: must recompute mTrailingSingleQuotesCount
+ // We're only searching for single quotes, so no need to account for code points
+ for (int i = mTypedWordCache.length() - 1; i > 0; --i) {
+ if (Constants.CODE_SINGLE_QUOTE != mTypedWordCache.charAt(i)) {
+ break;
+ }
+ ++mTrailingSingleQuotesCount;
+ }
+ }
} else {
- mTrailingSingleQuotesCount = 0;
+ if (Constants.CODE_SINGLE_QUOTE == primaryCode) {
+ ++mTrailingSingleQuotesCount;
+ } else {
+ mTrailingSingleQuotesCount = 0;
+ }
+ if (newIndex < MAX_WORD_LENGTH) {
+ // In the batch input mode, the {@code mInputPointers} holds batch input points and
+ // shouldn't be overridden by the "typed key" coordinates
+ // (See {@link #setBatchInputWord}).
+ if (!mIsBatchMode) {
+ // TODO: Set correct pointer id and time
+ mInputPointers.addPointerAt(newIndex, keyX, keyY, 0, 0);
+ }
+ }
+ mIsFirstCharCapitalized = isFirstCharCapitalized(
+ newIndex, primaryCode, mIsFirstCharCapitalized);
+ if (Character.isUpperCase(primaryCode)) mCapsCount++;
+ if (Character.isDigit(primaryCode)) mDigitsCount++;
}
mAutoCorrection = null;
}
- private void processEvent(final Event event) {
- mCombinerChain.processEvent(mEvents, event);
- mEvents.add(event);
- refreshTypedWordCache();
- }
-
/**
* Delete the last composing unit as a result of hitting backspace.
*/
public void deleteLast(final Event event) {
processEvent(event);
- // We may have deleted the last one.
- if (0 == size()) {
- mIsFirstCharCapitalized = false;
- }
- if (mTrailingSingleQuotesCount > 0) {
- --mTrailingSingleQuotesCount;
- } else {
- int i = mTypedWordCache.length();
- while (i > 0) {
- i = Character.offsetByCodePoints(mTypedWordCache, i, -1);
- if (Constants.CODE_SINGLE_QUOTE != Character.codePointAt(mTypedWordCache, i)) {
- break;
- }
- ++mTrailingSingleQuotesCount;
- }
- }
- mCursorPositionWithinWord = mCodePointSize;
- mAutoCorrection = null;
}
public void setCursorPositionWithinWord(final int posWithinWord) {
diff --git a/java/src/com/android/inputmethod/latin/debug/ExternalDictionaryGetterForDebug.java b/java/src/com/android/inputmethod/latin/debug/ExternalDictionaryGetterForDebug.java
index 800f56597..139e73aa4 100644
--- a/java/src/com/android/inputmethod/latin/debug/ExternalDictionaryGetterForDebug.java
+++ b/java/src/com/android/inputmethod/latin/debug/ExternalDictionaryGetterForDebug.java
@@ -28,6 +28,7 @@ import com.android.inputmethod.latin.BinaryDictionaryGetter;
import com.android.inputmethod.latin.R;
import com.android.inputmethod.latin.makedict.DictionaryHeader;
import com.android.inputmethod.latin.utils.CollectionUtils;
+import com.android.inputmethod.latin.utils.DialogUtils;
import com.android.inputmethod.latin.utils.DictionaryInfoUtils;
import com.android.inputmethod.latin.utils.LocaleUtils;
@@ -70,7 +71,7 @@ public class ExternalDictionaryGetterForDebug {
}
private static void showNoFileDialog(final Context context) {
- new AlertDialog.Builder(context)
+ new AlertDialog.Builder(DialogUtils.getPlatformDialogThemeContext(context))
.setMessage(R.string.read_external_dictionary_no_files_message)
.setPositiveButton(android.R.string.ok, new OnClickListener() {
@Override
@@ -81,8 +82,8 @@ public class ExternalDictionaryGetterForDebug {
}
private static void showChooseFileDialog(final Context context, final String[] fileNames) {
- final AlertDialog.Builder builder = new AlertDialog.Builder(context);
- builder.setTitle(R.string.read_external_dictionary_multiple_files_title)
+ new AlertDialog.Builder(DialogUtils.getPlatformDialogThemeContext(context))
+ .setTitle(R.string.read_external_dictionary_multiple_files_title)
.setItems(fileNames, new OnClickListener() {
@Override
public void onClick(final DialogInterface dialog, final int which) {
@@ -111,7 +112,7 @@ public class ExternalDictionaryGetterForDebug {
final String title = String.format(
context.getString(R.string.read_external_dictionary_confirm_install_message),
languageName);
- new AlertDialog.Builder(context)
+ new AlertDialog.Builder(DialogUtils.getPlatformDialogThemeContext(context))
.setTitle(title)
.setMessage(message)
.setNegativeButton(android.R.string.cancel, new OnClickListener() {
@@ -167,7 +168,7 @@ public class ExternalDictionaryGetterForDebug {
}
} catch (IOException e) {
// There was an error: show a dialog
- new AlertDialog.Builder(context)
+ new AlertDialog.Builder(DialogUtils.getPlatformDialogThemeContext(context))
.setTitle(R.string.error)
.setMessage(e.toString())
.setPositiveButton(android.R.string.ok, new OnClickListener() {
diff --git a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
index 536d6ef39..7ffc95697 100644
--- a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
+++ b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
@@ -823,13 +823,11 @@ public final class InputLogic {
}
if (Constants.CODE_SPACE == codePoint) {
- if (inputTransaction.mSettingsValues.isSuggestionsRequested()) {
- if (maybeDoubleSpacePeriod(inputTransaction)) {
- inputTransaction.requireShiftUpdate(InputTransaction.SHIFT_UPDATE_NOW);
- mSpaceState = SpaceState.DOUBLE;
- } else if (!mSuggestedWords.isPunctuationSuggestions()) {
- mSpaceState = SpaceState.WEAK;
- }
+ if (maybeDoubleSpacePeriod(inputTransaction)) {
+ inputTransaction.requireShiftUpdate(InputTransaction.SHIFT_UPDATE_NOW);
+ mSpaceState = SpaceState.DOUBLE;
+ } else if (!mSuggestedWords.isPunctuationSuggestions()) {
+ mSpaceState = SpaceState.WEAK;
}
startDoubleSpacePeriodCountdown(inputTransaction);
diff --git a/java/src/com/android/inputmethod/latin/personalization/DecayingExpandableBinaryDictionaryBase.java b/java/src/com/android/inputmethod/latin/personalization/DecayingExpandableBinaryDictionaryBase.java
index 6f84e1f10..712e314a8 100644
--- a/java/src/com/android/inputmethod/latin/personalization/DecayingExpandableBinaryDictionaryBase.java
+++ b/java/src/com/android/inputmethod/latin/personalization/DecayingExpandableBinaryDictionaryBase.java
@@ -66,7 +66,7 @@ public abstract class DecayingExpandableBinaryDictionaryBase extends ExpandableB
}
// Flush pending writes.
flush();
- // TODO: Quit depending on finalize() and really close the dictionary file.
+ super.close();
}
public void flush() {
diff --git a/java/src/com/android/inputmethod/latin/settings/AdditionalSubtypeSettings.java b/java/src/com/android/inputmethod/latin/settings/AdditionalSubtypeSettings.java
index 6dae6206c..39977e76f 100644
--- a/java/src/com/android/inputmethod/latin/settings/AdditionalSubtypeSettings.java
+++ b/java/src/com/android/inputmethod/latin/settings/AdditionalSubtypeSettings.java
@@ -48,6 +48,7 @@ import com.android.inputmethod.latin.R;
import com.android.inputmethod.latin.RichInputMethodManager;
import com.android.inputmethod.latin.utils.AdditionalSubtypeUtils;
import com.android.inputmethod.latin.utils.CollectionUtils;
+import com.android.inputmethod.latin.utils.DialogUtils;
import com.android.inputmethod.latin.utils.IntentUtils;
import com.android.inputmethod.latin.utils.SubtypeLocaleUtils;
@@ -517,7 +518,8 @@ public final class AdditionalSubtypeSettings extends PreferenceFragment {
private AlertDialog createDialog(
@SuppressWarnings("unused") final SubtypePreference subtypePref) {
- final AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
+ final AlertDialog.Builder builder = new AlertDialog.Builder(
+ DialogUtils.getPlatformDialogThemeContext(getActivity()));
builder.setTitle(R.string.custom_input_styles_title)
.setMessage(R.string.custom_input_style_note_message)
.setNegativeButton(R.string.not_now, null)
diff --git a/java/src/com/android/inputmethod/latin/utils/DialogUtils.java b/java/src/com/android/inputmethod/latin/utils/DialogUtils.java
new file mode 100644
index 000000000..a05c932d0
--- /dev/null
+++ b/java/src/com/android/inputmethod/latin/utils/DialogUtils.java
@@ -0,0 +1,34 @@
+/*
+ * 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.latin.utils;
+
+import android.content.Context;
+import android.view.ContextThemeWrapper;
+
+import com.android.inputmethod.latin.R;
+
+public final class DialogUtils {
+ private DialogUtils() {
+ // This utility class is not publicly instantiable.
+ }
+
+ public static Context getPlatformDialogThemeContext(final Context context) {
+ // Because {@link AlertDialog.Builder.create()} doesn't honor the specified theme with
+ // createThemeContextWrapper=false, the result dialog box has unneeded paddings around it.
+ return new ContextThemeWrapper(context, R.style.platformDialogTheme);
+ }
+}