diff options
author | 2011-05-13 21:11:19 +0900 | |
---|---|---|
committer | 2011-05-13 21:11:19 +0900 | |
commit | def6b35a9ed78d128d4cb5e8414c865503ec4192 (patch) | |
tree | 77491cd71b65419fa63d1aacc28288e7e9f8aa99 /java | |
parent | 55f38adab99937eef97626136f57520ebe9c04a9 (diff) | |
parent | 96e822c94c50c548d64e86e0c2c52022a63cc319 (diff) | |
download | latinime-def6b35a9ed78d128d4cb5e8414c865503ec4192.tar.gz latinime-def6b35a9ed78d128d4cb5e8414c865503ec4192.tar.xz latinime-def6b35a9ed78d128d4cb5e8414c865503ec4192.zip |
Merge remote-tracking branch 'goog/master' into merge
Conflicts:
java/res/xml/method.xml
Change-Id: I455cb689f3a1baca7cc8b8ef88d9dbcdca8128a3
Diffstat (limited to 'java')
97 files changed, 890 insertions, 1414 deletions
diff --git a/java/res/values-ar/strings.xml b/java/res/values-ar/strings.xml index 4107d0f88..df5b87ac1 100644 --- a/java/res/values-ar/strings.xml +++ b/java/res/values-ar/strings.xml @@ -61,18 +61,6 @@ <string name="label_more_key" msgid="3760239494604948502">"المزيد"</string> <string name="label_pause_key" msgid="181098308428035340">"توقف مؤقت"</string> <string name="label_wait_key" msgid="6402152600878093134">"انتظار"</string> - <string name="description_delete_key" msgid="5586406298531883960">"حذف"</string> - <string name="description_return_key" msgid="8750044000806461678">"رجوع"</string> - <string name="description_settings_key" msgid="7484527796782969219">"الإعدادات"</string> - <string name="description_shift_key" msgid="346906866277787836">"العالي"</string> - <string name="description_space_key" msgid="8512130111575878517">"مسافة"</string> - <string name="description_switch_alpha_symbol_key" msgid="4537975384274405537">"الرموز"</string> - <string name="description_tab_key" msgid="828186583738307137">"Tab"</string> - <string name="description_voice_key" msgid="3057731675774652754">"الإدخال الصوتي"</string> - <string name="description_symbols_on" msgid="2994366855822840559">"تشغيل الرموز"</string> - <string name="description_symbols_off" msgid="3209578267079515136">"إيقاف الرموز"</string> - <string name="description_shift_on" msgid="6983188949895971587">"تشغيل العالي"</string> - <string name="description_shift_off" msgid="8553265474523069034">"إيقاف العالي"</string> <string name="voice_warning_title" msgid="4419354150908395008">"الإدخال الصوتي"</string> <string name="voice_warning_locale_not_supported" msgid="637923019716442333">"الإدخال الصوتي غير معتمد حاليًا للغتك، ولكنه يعمل باللغة الإنجليزية."</string> <string name="voice_warning_may_not_understand" msgid="5596289095878251072">"يستخدم الإدخال الصوتي خاصية التعرف على الكلام من Google. تنطبق "<a href="http://m.google.com/privacy">"سياسة خصوصية الجوال"</a>"."</string> diff --git a/java/res/values-bg/strings.xml b/java/res/values-bg/strings.xml index aab33df78..7f59a13db 100644 --- a/java/res/values-bg/strings.xml +++ b/java/res/values-bg/strings.xml @@ -61,18 +61,6 @@ <string name="label_more_key" msgid="3760239494604948502">"Още"</string> <string name="label_pause_key" msgid="181098308428035340">"Пауза"</string> <string name="label_wait_key" msgid="6402152600878093134">"Чака"</string> - <string name="description_delete_key" msgid="5586406298531883960">"Изтриване"</string> - <string name="description_return_key" msgid="8750044000806461678">"Return"</string> - <string name="description_settings_key" msgid="7484527796782969219">"Настройки"</string> - <string name="description_shift_key" msgid="346906866277787836">"Shift"</string> - <string name="description_space_key" msgid="8512130111575878517">"Интервал"</string> - <string name="description_switch_alpha_symbol_key" msgid="4537975384274405537">"Символи"</string> - <string name="description_tab_key" msgid="828186583738307137">"Tab"</string> - <string name="description_voice_key" msgid="3057731675774652754">"Гласово въвеждане"</string> - <string name="description_symbols_on" msgid="2994366855822840559">"Символите са включени"</string> - <string name="description_symbols_off" msgid="3209578267079515136">"Символите са изключени"</string> - <string name="description_shift_on" msgid="6983188949895971587">"Shift е включен"</string> - <string name="description_shift_off" msgid="8553265474523069034">"Shift е изключен"</string> <string name="voice_warning_title" msgid="4419354150908395008">"Гласово въвеждане"</string> <string name="voice_warning_locale_not_supported" msgid="637923019716442333">"За вашия език понастоящем не се поддържа гласово въвеждане, но можете да го използвате на английски."</string> <string name="voice_warning_may_not_understand" msgid="5596289095878251072">"Гласовото въвеждане използва функцията на Google за разпознаване на говор. В сила е "<a href="http://m.google.com/privacy">"Декларацията за поверителност за мобилни устройства"</a>"."</string> diff --git a/java/res/values-ca/strings.xml b/java/res/values-ca/strings.xml index 85ac44588..36939fef7 100644 --- a/java/res/values-ca/strings.xml +++ b/java/res/values-ca/strings.xml @@ -61,18 +61,6 @@ <string name="label_more_key" msgid="3760239494604948502">"Més"</string> <string name="label_pause_key" msgid="181098308428035340">"Pausa"</string> <string name="label_wait_key" msgid="6402152600878093134">"Espera"</string> - <string name="description_delete_key" msgid="5586406298531883960">"Suprimeix"</string> - <string name="description_return_key" msgid="8750044000806461678">"Retorn"</string> - <string name="description_settings_key" msgid="7484527796782969219">"Configuració"</string> - <string name="description_shift_key" msgid="346906866277787836">"Majúscules"</string> - <string name="description_space_key" msgid="8512130111575878517">"Espai"</string> - <string name="description_switch_alpha_symbol_key" msgid="4537975384274405537">"Símbols"</string> - <string name="description_tab_key" msgid="828186583738307137">"Tabulador"</string> - <string name="description_voice_key" msgid="3057731675774652754">"Entrada de veu"</string> - <string name="description_symbols_on" msgid="2994366855822840559">"Símbols activats"</string> - <string name="description_symbols_off" msgid="3209578267079515136">"Símbols desactivats"</string> - <string name="description_shift_on" msgid="6983188949895971587">"Majúscules activades"</string> - <string name="description_shift_off" msgid="8553265474523069034">"Majúscules desactivades"</string> <string name="voice_warning_title" msgid="4419354150908395008">"Entrada de veu"</string> <string name="voice_warning_locale_not_supported" msgid="637923019716442333">"Actualment, l\'entrada de veu no és compatible amb el vostre idioma, però funciona en anglès."</string> <string name="voice_warning_may_not_understand" msgid="5596289095878251072">"L\'entrada de veu utilitza el reconeixement de veu de Google. S\'hi aplica la "<a href="http://m.google.com/privacy">"Política de privadesa de Google Mobile"</a>"."</string> diff --git a/java/res/values-cs/strings.xml b/java/res/values-cs/strings.xml index b35520ae5..132bc1c29 100644 --- a/java/res/values-cs/strings.xml +++ b/java/res/values-cs/strings.xml @@ -61,18 +61,6 @@ <string name="label_more_key" msgid="3760239494604948502">"Další"</string> <string name="label_pause_key" msgid="181098308428035340">"Pauza"</string> <string name="label_wait_key" msgid="6402152600878093134">"Čekat"</string> - <string name="description_delete_key" msgid="5586406298531883960">"Smazat"</string> - <string name="description_return_key" msgid="8750044000806461678">"Enter"</string> - <string name="description_settings_key" msgid="7484527796782969219">"Nastavení"</string> - <string name="description_shift_key" msgid="346906866277787836">"Shift"</string> - <string name="description_space_key" msgid="8512130111575878517">"mezera"</string> - <string name="description_switch_alpha_symbol_key" msgid="4537975384274405537">"Symboly"</string> - <string name="description_tab_key" msgid="828186583738307137">"Karta"</string> - <string name="description_voice_key" msgid="3057731675774652754">"Hlasový vstup"</string> - <string name="description_symbols_on" msgid="2994366855822840559">"Symboly jsou zapnuty"</string> - <string name="description_symbols_off" msgid="3209578267079515136">"Symboly jsou vypnuty"</string> - <string name="description_shift_on" msgid="6983188949895971587">"Režim Shift je zapnutý"</string> - <string name="description_shift_off" msgid="8553265474523069034">"Režim Shift je vypnutý"</string> <string name="voice_warning_title" msgid="4419354150908395008">"Hlasový vstup"</string> <string name="voice_warning_locale_not_supported" msgid="637923019716442333">"Pro váš jazyk aktuálně není hlasový vstup podporován, ale funguje v angličtině."</string> <string name="voice_warning_may_not_understand" msgid="5596289095878251072">"Hlasový vstup používá rozpoznávání hlasu Google a vztahují se na něj "<a href="http://m.google.com/privacy">"Zásady ochrany osobních údajů pro mobilní služby"</a>"."</string> diff --git a/java/res/values-da/strings.xml b/java/res/values-da/strings.xml index 9c7dedf7f..ad92b24d1 100644 --- a/java/res/values-da/strings.xml +++ b/java/res/values-da/strings.xml @@ -61,18 +61,6 @@ <string name="label_more_key" msgid="3760239494604948502">"Mere"</string> <string name="label_pause_key" msgid="181098308428035340">"Pause"</string> <string name="label_wait_key" msgid="6402152600878093134">"Vent"</string> - <string name="description_delete_key" msgid="5586406298531883960">"Slet"</string> - <string name="description_return_key" msgid="8750044000806461678">"Tilbage"</string> - <string name="description_settings_key" msgid="7484527796782969219">"Indstillinger"</string> - <string name="description_shift_key" msgid="346906866277787836">"Shift"</string> - <string name="description_space_key" msgid="8512130111575878517">"Mellemrum"</string> - <string name="description_switch_alpha_symbol_key" msgid="4537975384274405537">"Symboler"</string> - <string name="description_tab_key" msgid="828186583738307137">"Fane"</string> - <string name="description_voice_key" msgid="3057731675774652754">"Stemmeinput"</string> - <string name="description_symbols_on" msgid="2994366855822840559">"Symboler: Til"</string> - <string name="description_symbols_off" msgid="3209578267079515136">"Symboler: Fra"</string> - <string name="description_shift_on" msgid="6983188949895971587">"Shift: Til"</string> - <string name="description_shift_off" msgid="8553265474523069034">"Shift: Fra"</string> <string name="voice_warning_title" msgid="4419354150908395008">"Stemmeinput"</string> <string name="voice_warning_locale_not_supported" msgid="637923019716442333">"Stemmeinput understøttes i øjeblikket ikke for dit sprog, men fungerer på engelsk."</string> <string name="voice_warning_may_not_understand" msgid="5596289095878251072">"Stemmeinput anvender Googles stemmegenkendelse. "<a href="http://m.google.com/privacy">"Fortrolighedspolitikken for mobilenheder"</a>" gælder."</string> diff --git a/java/res/values-de/strings.xml b/java/res/values-de/strings.xml index a8b671757..65f0faa32 100644 --- a/java/res/values-de/strings.xml +++ b/java/res/values-de/strings.xml @@ -61,18 +61,6 @@ <string name="label_more_key" msgid="3760239494604948502">"Mehr"</string> <string name="label_pause_key" msgid="181098308428035340">"Pause"</string> <string name="label_wait_key" msgid="6402152600878093134">"Warten"</string> - <string name="description_delete_key" msgid="5586406298531883960">"Löschen"</string> - <string name="description_return_key" msgid="8750044000806461678">"Eingabe"</string> - <string name="description_settings_key" msgid="7484527796782969219">"Einstellungen"</string> - <string name="description_shift_key" msgid="346906866277787836">"Umschalt"</string> - <string name="description_space_key" msgid="8512130111575878517">"Leerzeichen"</string> - <string name="description_switch_alpha_symbol_key" msgid="4537975384274405537">"Symbole"</string> - <string name="description_tab_key" msgid="828186583738307137">"Tab"</string> - <string name="description_voice_key" msgid="3057731675774652754">"Spracheingabe"</string> - <string name="description_symbols_on" msgid="2994366855822840559">"Symbole an"</string> - <string name="description_symbols_off" msgid="3209578267079515136">"Symbole aus"</string> - <string name="description_shift_on" msgid="6983188949895971587">"Umschalt an"</string> - <string name="description_shift_off" msgid="8553265474523069034">"Umschalt aus"</string> <string name="voice_warning_title" msgid="4419354150908395008">"Spracheingabe"</string> <string name="voice_warning_locale_not_supported" msgid="637923019716442333">"Spracheingaben werden derzeit nicht für Ihre Sprache unterstützt, funktionieren jedoch in Englisch."</string> <string name="voice_warning_may_not_understand" msgid="5596289095878251072">"Die Spracheingabe verwendet die Spracherkennung von Google. Es gelten die "<a href="http://m.google.com/privacy">"Google Mobile-Datenschutzbestimmungen"</a>"."</string> diff --git a/java/res/values-el/strings.xml b/java/res/values-el/strings.xml index a23959d1c..5cee959a0 100644 --- a/java/res/values-el/strings.xml +++ b/java/res/values-el/strings.xml @@ -61,18 +61,6 @@ <string name="label_more_key" msgid="3760239494604948502">"Περισσότερα"</string> <string name="label_pause_key" msgid="181098308428035340">"Παύση"</string> <string name="label_wait_key" msgid="6402152600878093134">"Αναμ."</string> - <string name="description_delete_key" msgid="5586406298531883960">"Delete"</string> - <string name="description_return_key" msgid="8750044000806461678">"Return"</string> - <string name="description_settings_key" msgid="7484527796782969219">"Ρυθμίσεις"</string> - <string name="description_shift_key" msgid="346906866277787836">"Shift"</string> - <string name="description_space_key" msgid="8512130111575878517">"Κενό"</string> - <string name="description_switch_alpha_symbol_key" msgid="4537975384274405537">"Σύμβολα"</string> - <string name="description_tab_key" msgid="828186583738307137">"Tab"</string> - <string name="description_voice_key" msgid="3057731675774652754">"Φωνητική εντολή"</string> - <string name="description_symbols_on" msgid="2994366855822840559">"Σύμβολα ενεργά"</string> - <string name="description_symbols_off" msgid="3209578267079515136">"Σύμβολα ανενεργά"</string> - <string name="description_shift_on" msgid="6983188949895971587">"Shift ενεργό"</string> - <string name="description_shift_off" msgid="8553265474523069034">"Shift ανενεργό"</string> <string name="voice_warning_title" msgid="4419354150908395008">"Φωνητική είσοδος"</string> <string name="voice_warning_locale_not_supported" msgid="637923019716442333">"Η φωνητική είσοδος δεν υποστηρίζεται αυτή τη στιγμή για τη γλώσσα σας, ωστόσο λειτουργεί στα Αγγλικά."</string> <string name="voice_warning_may_not_understand" msgid="5596289095878251072">"Οι φωνητικές εντολές χρησιμοποιούν την τεχνολογία αναγνώρισης φωνής της Google. Ισχύει "<a href="http://m.google.com/privacy">"η Πολιτική Απορρήτου για κινητά"</a>"."</string> diff --git a/java/res/values-en-rGB/strings.xml b/java/res/values-en-rGB/strings.xml index 57d4ec4f8..7d5d50177 100644 --- a/java/res/values-en-rGB/strings.xml +++ b/java/res/values-en-rGB/strings.xml @@ -61,18 +61,6 @@ <string name="label_more_key" msgid="3760239494604948502">"More"</string> <string name="label_pause_key" msgid="181098308428035340">"Pause"</string> <string name="label_wait_key" msgid="6402152600878093134">"Wait"</string> - <string name="description_delete_key" msgid="5586406298531883960">"Delete"</string> - <string name="description_return_key" msgid="8750044000806461678">"Return"</string> - <string name="description_settings_key" msgid="7484527796782969219">"Settings"</string> - <string name="description_shift_key" msgid="346906866277787836">"Shift"</string> - <string name="description_space_key" msgid="8512130111575878517">"Space"</string> - <string name="description_switch_alpha_symbol_key" msgid="4537975384274405537">"Symbols"</string> - <string name="description_tab_key" msgid="828186583738307137">"Tab"</string> - <string name="description_voice_key" msgid="3057731675774652754">"Voice Input"</string> - <string name="description_symbols_on" msgid="2994366855822840559">"Symbols on"</string> - <string name="description_symbols_off" msgid="3209578267079515136">"Symbols off"</string> - <string name="description_shift_on" msgid="6983188949895971587">"Shift on"</string> - <string name="description_shift_off" msgid="8553265474523069034">"Shift off"</string> <string name="voice_warning_title" msgid="4419354150908395008">"Voice input"</string> <string name="voice_warning_locale_not_supported" msgid="637923019716442333">"Voice input is not currently supported for your language, but does work in English."</string> <string name="voice_warning_may_not_understand" msgid="5596289095878251072">"Voice input uses Google\'s speech recognition. "<a href="http://m.google.com/privacy">"The Mobile Privacy Policy"</a>" applies."</string> diff --git a/java/res/values-es-rUS/strings.xml b/java/res/values-es-rUS/strings.xml index 48f82f978..e40f98b3b 100644 --- a/java/res/values-es-rUS/strings.xml +++ b/java/res/values-es-rUS/strings.xml @@ -61,18 +61,6 @@ <string name="label_more_key" msgid="3760239494604948502">"Más"</string> <string name="label_pause_key" msgid="181098308428035340">"Pausa"</string> <string name="label_wait_key" msgid="6402152600878093134">"Espera"</string> - <string name="description_delete_key" msgid="5586406298531883960">"Eliminar"</string> - <string name="description_return_key" msgid="8750044000806461678">"Volver"</string> - <string name="description_settings_key" msgid="7484527796782969219">"Configuración"</string> - <string name="description_shift_key" msgid="346906866277787836">"Mayús"</string> - <string name="description_space_key" msgid="8512130111575878517">"Espacio"</string> - <string name="description_switch_alpha_symbol_key" msgid="4537975384274405537">"Símbolos"</string> - <string name="description_tab_key" msgid="828186583738307137">"Tab"</string> - <string name="description_voice_key" msgid="3057731675774652754">"Entrada de voz"</string> - <string name="description_symbols_on" msgid="2994366855822840559">"Símbolos activados"</string> - <string name="description_symbols_off" msgid="3209578267079515136">"Símbolos desactivados"</string> - <string name="description_shift_on" msgid="6983188949895971587">"Mayús activado"</string> - <string name="description_shift_off" msgid="8553265474523069034">"Mayús desactivado"</string> <string name="voice_warning_title" msgid="4419354150908395008">"Entrada por voz"</string> <string name="voice_warning_locale_not_supported" msgid="637923019716442333">"La entrada por voz no está admitida en tu idioma, pero sí funciona en inglés."</string> <string name="voice_warning_may_not_understand" msgid="5596289095878251072">"La entrada de voz usa el reconocimiento de voz de Google. "<a href="http://m.google.com/privacy">"Se aplica la política de privacidad para"</a>" celulares."</string> diff --git a/java/res/values-es/strings.xml b/java/res/values-es/strings.xml index 2116044c1..e1532427a 100644 --- a/java/res/values-es/strings.xml +++ b/java/res/values-es/strings.xml @@ -67,18 +67,6 @@ <string name="label_more_key" msgid="3760239494604948502">"Más"</string> <string name="label_pause_key" msgid="181098308428035340">"Pausa"</string> <string name="label_wait_key" msgid="6402152600878093134">"Espera"</string> - <string name="description_delete_key" msgid="5586406298531883960">"Eliminar"</string> - <string name="description_return_key" msgid="8750044000806461678">"Retroceso"</string> - <string name="description_settings_key" msgid="7484527796782969219">"Ajustes"</string> - <string name="description_shift_key" msgid="346906866277787836">"Mayús"</string> - <string name="description_space_key" msgid="8512130111575878517">"Espacio"</string> - <string name="description_switch_alpha_symbol_key" msgid="4537975384274405537">"Símbolos"</string> - <string name="description_tab_key" msgid="828186583738307137">"Tabulador"</string> - <string name="description_voice_key" msgid="3057731675774652754">"Entrada de voz"</string> - <string name="description_symbols_on" msgid="2994366855822840559">"Símbolos activados"</string> - <string name="description_symbols_off" msgid="3209578267079515136">"Símbolos desactivados"</string> - <string name="description_shift_on" msgid="6983188949895971587">"Mayús activadas"</string> - <string name="description_shift_off" msgid="8553265474523069034">"Mayús desactivadas"</string> <string name="voice_warning_title" msgid="4419354150908395008">"Introducción de voz"</string> <string name="voice_warning_locale_not_supported" msgid="637923019716442333">"Actualmente la introducción de voz no está disponible en tu idioma, pero se puede utilizar en inglés."</string> <string name="voice_warning_may_not_understand" msgid="5596289095878251072">"La entrada de voz utiliza el reconocimiento de voz de Google. Se aplica la "<a href="http://m.google.com/privacy">"Política de privacidad de Google para móviles"</a>"."</string> diff --git a/java/res/values-fa/strings.xml b/java/res/values-fa/strings.xml index e57eb8a03..25ee9dff8 100644 --- a/java/res/values-fa/strings.xml +++ b/java/res/values-fa/strings.xml @@ -61,18 +61,6 @@ <string name="label_more_key" msgid="3760239494604948502">"بیشتر"</string> <string name="label_pause_key" msgid="181098308428035340">"توقف موقت"</string> <string name="label_wait_key" msgid="6402152600878093134">"منتظر بمانید"</string> - <string name="description_delete_key" msgid="5586406298531883960">"Delete"</string> - <string name="description_return_key" msgid="8750044000806461678">"Return"</string> - <string name="description_settings_key" msgid="7484527796782969219">"تنظیمات"</string> - <string name="description_shift_key" msgid="346906866277787836">"Shift"</string> - <string name="description_space_key" msgid="8512130111575878517">"فاصله"</string> - <string name="description_switch_alpha_symbol_key" msgid="4537975384274405537">"نمادها"</string> - <string name="description_tab_key" msgid="828186583738307137">"Tab"</string> - <string name="description_voice_key" msgid="3057731675774652754">"ورودی صوتی"</string> - <string name="description_symbols_on" msgid="2994366855822840559">"نمادها روشن"</string> - <string name="description_symbols_off" msgid="3209578267079515136">"نمادها خاموش"</string> - <string name="description_shift_on" msgid="6983188949895971587">"Shift روشن"</string> - <string name="description_shift_off" msgid="8553265474523069034">"Shift خاموش"</string> <string name="voice_warning_title" msgid="4419354150908395008">"ورودی صوتی"</string> <string name="voice_warning_locale_not_supported" msgid="637923019716442333">"ورودی صوتی در حال حاضر برای زبان شما پشتیبانی نمی شود اما برای زبان انگلیسی فعال است."</string> <string name="voice_warning_may_not_understand" msgid="5596289095878251072">"ورودی صوتی از تشخیص صدای Google استفاده می کند. "<a href="http://m.google.com/privacy">"خط مشی رازداری Mobile "</a>" اعمال می شود."</string> diff --git a/java/res/values-fi/strings.xml b/java/res/values-fi/strings.xml index 5be26f1e6..f02e8217d 100644 --- a/java/res/values-fi/strings.xml +++ b/java/res/values-fi/strings.xml @@ -61,18 +61,6 @@ <string name="label_more_key" msgid="3760239494604948502">"Lisää"</string> <string name="label_pause_key" msgid="181098308428035340">"Tauko"</string> <string name="label_wait_key" msgid="6402152600878093134">"Odota"</string> - <string name="description_delete_key" msgid="5586406298531883960">"Poista"</string> - <string name="description_return_key" msgid="8750044000806461678">"Rivinvaihto"</string> - <string name="description_settings_key" msgid="7484527796782969219">"Asetukset"</string> - <string name="description_shift_key" msgid="346906866277787836">"Shift"</string> - <string name="description_space_key" msgid="8512130111575878517">"Välilyönti"</string> - <string name="description_switch_alpha_symbol_key" msgid="4537975384274405537">"Symbolit"</string> - <string name="description_tab_key" msgid="828186583738307137">"Sarkain"</string> - <string name="description_voice_key" msgid="3057731675774652754">"Äänisyöte"</string> - <string name="description_symbols_on" msgid="2994366855822840559">"Symbolit käytössä"</string> - <string name="description_symbols_off" msgid="3209578267079515136">"Symbolit pois käytöstä"</string> - <string name="description_shift_on" msgid="6983188949895971587">"Shift käytössä"</string> - <string name="description_shift_off" msgid="8553265474523069034">"Shift pois käytöstä"</string> <string name="voice_warning_title" msgid="4419354150908395008">"Äänisyöte"</string> <string name="voice_warning_locale_not_supported" msgid="637923019716442333">"Äänisyötettä ei vielä tueta kielelläsi, mutta voit käyttää sitä englanniksi."</string> <string name="voice_warning_may_not_understand" msgid="5596289095878251072">"Äänisyöte käyttää Googlen puheentunnistusta. "<a href="http://m.google.com/privacy">"Mobile-tietosuojakäytäntö"</a>" on voimassa."</string> diff --git a/java/res/values-fr/strings.xml b/java/res/values-fr/strings.xml index 0526899df..276aed2c5 100644 --- a/java/res/values-fr/strings.xml +++ b/java/res/values-fr/strings.xml @@ -61,18 +61,6 @@ <string name="label_more_key" msgid="3760239494604948502">"Plus"</string> <string name="label_pause_key" msgid="181098308428035340">"Pause"</string> <string name="label_wait_key" msgid="6402152600878093134">"Attente"</string> - <string name="description_delete_key" msgid="5586406298531883960">"Supprimer"</string> - <string name="description_return_key" msgid="8750044000806461678">"Entrée"</string> - <string name="description_settings_key" msgid="7484527796782969219">"Paramètres"</string> - <string name="description_shift_key" msgid="346906866277787836">"Maj"</string> - <string name="description_space_key" msgid="8512130111575878517">"Espace"</string> - <string name="description_switch_alpha_symbol_key" msgid="4537975384274405537">"Symboles"</string> - <string name="description_tab_key" msgid="828186583738307137">"Tabulation"</string> - <string name="description_voice_key" msgid="3057731675774652754">"Saisie vocale"</string> - <string name="description_symbols_on" msgid="2994366855822840559">"Symboles activés"</string> - <string name="description_symbols_off" msgid="3209578267079515136">"Symboles désactivés"</string> - <string name="description_shift_on" msgid="6983188949895971587">"Maj activée"</string> - <string name="description_shift_off" msgid="8553265474523069034">"Maj désactivée"</string> <string name="voice_warning_title" msgid="4419354150908395008">"Saisie vocale"</string> <string name="voice_warning_locale_not_supported" msgid="637923019716442333">"La saisie vocale n\'est pas encore prise en charge pour votre langue, mais elle fonctionne en anglais."</string> <string name="voice_warning_may_not_understand" msgid="5596289095878251072">"La saisie vocale fait appel à la reconnaissance vocale de Google. Les "<a href="http://m.google.com/privacy">"Règles de confidentialité Google Mobile"</a>" s\'appliquent."</string> diff --git a/java/res/values-hr/strings.xml b/java/res/values-hr/strings.xml index 0307afa0c..6117821ee 100644 --- a/java/res/values-hr/strings.xml +++ b/java/res/values-hr/strings.xml @@ -61,18 +61,6 @@ <string name="label_more_key" msgid="3760239494604948502">"Više"</string> <string name="label_pause_key" msgid="181098308428035340">"Pauza"</string> <string name="label_wait_key" msgid="6402152600878093134">"Pričekaj"</string> - <string name="description_delete_key" msgid="5586406298531883960">"Delete"</string> - <string name="description_return_key" msgid="8750044000806461678">"Enter"</string> - <string name="description_settings_key" msgid="7484527796782969219">"Postavke"</string> - <string name="description_shift_key" msgid="346906866277787836">"Shift"</string> - <string name="description_space_key" msgid="8512130111575878517">"Razmaknica"</string> - <string name="description_switch_alpha_symbol_key" msgid="4537975384274405537">"Simboli"</string> - <string name="description_tab_key" msgid="828186583738307137">"Tabulator"</string> - <string name="description_voice_key" msgid="3057731675774652754">"Glasovni unos"</string> - <string name="description_symbols_on" msgid="2994366855822840559">"Simboli uključeni"</string> - <string name="description_symbols_off" msgid="3209578267079515136">"Simboli isključeni"</string> - <string name="description_shift_on" msgid="6983188949895971587">"Shift uključen"</string> - <string name="description_shift_off" msgid="8553265474523069034">"Shift isključen"</string> <string name="voice_warning_title" msgid="4419354150908395008">"Glasovni unos"</string> <string name="voice_warning_locale_not_supported" msgid="637923019716442333">"Vaš jezik trenutno nije podržan za glasovni unos, ali radi za engleski."</string> <string name="voice_warning_may_not_understand" msgid="5596289095878251072">"Glasovni unos upotrebljava Googleovo prepoznavanje govora. Primjenjuju se "<a href="http://m.google.com/privacy">"Pravila o privatnosti za uslugu Mobile"</a>"."</string> diff --git a/java/res/values-hu/strings.xml b/java/res/values-hu/strings.xml index e2c1decb3..81255d719 100644 --- a/java/res/values-hu/strings.xml +++ b/java/res/values-hu/strings.xml @@ -61,18 +61,6 @@ <string name="label_more_key" msgid="3760239494604948502">"Egyebek"</string> <string name="label_pause_key" msgid="181098308428035340">"Szün."</string> <string name="label_wait_key" msgid="6402152600878093134">"Vár"</string> - <string name="description_delete_key" msgid="5586406298531883960">"Törlés"</string> - <string name="description_return_key" msgid="8750044000806461678">"Vissza"</string> - <string name="description_settings_key" msgid="7484527796782969219">"Beállítások"</string> - <string name="description_shift_key" msgid="346906866277787836">"Shift"</string> - <string name="description_space_key" msgid="8512130111575878517">"Szóköz"</string> - <string name="description_switch_alpha_symbol_key" msgid="4537975384274405537">"Szimbólumok"</string> - <string name="description_tab_key" msgid="828186583738307137">"Tab"</string> - <string name="description_voice_key" msgid="3057731675774652754">"Hangbevitel"</string> - <string name="description_symbols_on" msgid="2994366855822840559">"Szimbólumok be"</string> - <string name="description_symbols_off" msgid="3209578267079515136">"Szimbólumok ki"</string> - <string name="description_shift_on" msgid="6983188949895971587">"Shift be"</string> - <string name="description_shift_off" msgid="8553265474523069034">"Shift ki"</string> <string name="voice_warning_title" msgid="4419354150908395008">"Hangbevitel"</string> <string name="voice_warning_locale_not_supported" msgid="637923019716442333">"A hangbevitel szolgáltatás jelenleg nem támogatja az Ön nyelvét, ám angolul működik."</string> <string name="voice_warning_may_not_understand" msgid="5596289095878251072">"A hangbevitel a Google beszédfelismerő technológiáját használja, amelyre a "<a href="http://m.google.com/privacy">"Mobil adatvédelmi irányelvek"</a>" érvényesek."</string> diff --git a/java/res/values-in/strings.xml b/java/res/values-in/strings.xml index 4abc4e51b..32ef38d35 100644 --- a/java/res/values-in/strings.xml +++ b/java/res/values-in/strings.xml @@ -61,18 +61,6 @@ <string name="label_more_key" msgid="3760239494604948502">"Lainnya"</string> <string name="label_pause_key" msgid="181098308428035340">"Jeda"</string> <string name="label_wait_key" msgid="6402152600878093134">"Tunggu"</string> - <string name="description_delete_key" msgid="5586406298531883960">"Hapus"</string> - <string name="description_return_key" msgid="8750044000806461678">"Enter"</string> - <string name="description_settings_key" msgid="7484527796782969219">"Setelan"</string> - <string name="description_shift_key" msgid="346906866277787836">"Shift"</string> - <string name="description_space_key" msgid="8512130111575878517">"Spasi"</string> - <string name="description_switch_alpha_symbol_key" msgid="4537975384274405537">"Simbol"</string> - <string name="description_tab_key" msgid="828186583738307137">"Tab"</string> - <string name="description_voice_key" msgid="3057731675774652754">"Masukan Suara"</string> - <string name="description_symbols_on" msgid="2994366855822840559">"Simbol hidup"</string> - <string name="description_symbols_off" msgid="3209578267079515136">"Simbol mati"</string> - <string name="description_shift_on" msgid="6983188949895971587">"Shift hidup"</string> - <string name="description_shift_off" msgid="8553265474523069034">"Shift mati"</string> <string name="voice_warning_title" msgid="4419354150908395008">"Masukan suara"</string> <string name="voice_warning_locale_not_supported" msgid="637923019716442333">"Masukan suara saat ini tidak didukung untuk bahasa Anda, tetapi bekerja dalam Bahasa Inggris."</string> <string name="voice_warning_may_not_understand" msgid="5596289095878251072">"Masukan suara menggunakan pengenalan ucapan Google. "<a href="http://m.google.com/privacy">"Kebijakan Privasi Seluler"</a>" berlaku."</string> diff --git a/java/res/values-it/strings.xml b/java/res/values-it/strings.xml index d661c8975..3a896fcd7 100644 --- a/java/res/values-it/strings.xml +++ b/java/res/values-it/strings.xml @@ -61,18 +61,6 @@ <string name="label_more_key" msgid="3760239494604948502">"Altro"</string> <string name="label_pause_key" msgid="181098308428035340">"Pausa"</string> <string name="label_wait_key" msgid="6402152600878093134">"Attesa"</string> - <string name="description_delete_key" msgid="5586406298531883960">"Cancella"</string> - <string name="description_return_key" msgid="8750044000806461678">"Invio"</string> - <string name="description_settings_key" msgid="7484527796782969219">"Impostazioni"</string> - <string name="description_shift_key" msgid="346906866277787836">"Maiuscolo"</string> - <string name="description_space_key" msgid="8512130111575878517">"Spazio"</string> - <string name="description_switch_alpha_symbol_key" msgid="4537975384274405537">"Simboli"</string> - <string name="description_tab_key" msgid="828186583738307137">"Tabulazione"</string> - <string name="description_voice_key" msgid="3057731675774652754">"Input vocale"</string> - <string name="description_symbols_on" msgid="2994366855822840559">"Simboli attivati"</string> - <string name="description_symbols_off" msgid="3209578267079515136">"Simboli disattivati"</string> - <string name="description_shift_on" msgid="6983188949895971587">"Maiuscole attivate"</string> - <string name="description_shift_off" msgid="8553265474523069034">"Maiuscole disattivate"</string> <string name="voice_warning_title" msgid="4419354150908395008">"Comandi vocali"</string> <string name="voice_warning_locale_not_supported" msgid="637923019716442333">"I comandi vocali non sono attualmente supportati per la tua lingua ma funzionano in inglese."</string> <string name="voice_warning_may_not_understand" msgid="5596289095878251072">"L\'input vocale utilizza il riconoscimento vocale di Google. Sono valide le "<a href="http://m.google.com/privacy">"norme sulla privacy di Google Mobile"</a>"."</string> diff --git a/java/res/values-iw/strings.xml b/java/res/values-iw/strings.xml index 678804449..0b26ed9fe 100644 --- a/java/res/values-iw/strings.xml +++ b/java/res/values-iw/strings.xml @@ -61,18 +61,6 @@ <string name="label_more_key" msgid="3760239494604948502">"עוד"</string> <string name="label_pause_key" msgid="181098308428035340">"השהה"</string> <string name="label_wait_key" msgid="6402152600878093134">"המתן"</string> - <string name="description_delete_key" msgid="5586406298531883960">"מחק"</string> - <string name="description_return_key" msgid="8750044000806461678">"חזור"</string> - <string name="description_settings_key" msgid="7484527796782969219">"הגדרות"</string> - <string name="description_shift_key" msgid="346906866277787836">"Shift"</string> - <string name="description_space_key" msgid="8512130111575878517">"רווח"</string> - <string name="description_switch_alpha_symbol_key" msgid="4537975384274405537">"סמלים"</string> - <string name="description_tab_key" msgid="828186583738307137">"כרטיסייה"</string> - <string name="description_voice_key" msgid="3057731675774652754">"קלט קולי"</string> - <string name="description_symbols_on" msgid="2994366855822840559">"מצב סמלים פועל"</string> - <string name="description_symbols_off" msgid="3209578267079515136">"מצב סמלים כבוי"</string> - <string name="description_shift_on" msgid="6983188949895971587">"Shift פועל"</string> - <string name="description_shift_off" msgid="8553265474523069034">"Shift כבוי"</string> <string name="voice_warning_title" msgid="4419354150908395008">"קלט קולי"</string> <string name="voice_warning_locale_not_supported" msgid="637923019716442333">"קלט קולי אינו נתמך בשלב זה בשפתך, אך הוא פועל באנגלית."</string> <string name="voice_warning_may_not_understand" msgid="5596289095878251072">"קלט קולי משתמש בזיהוי דיבור של Google. "<a href="http://m.google.com/privacy">"מדיניות הפרטיות של \'Google לנייד\'"</a>" חלה במקרה זה."</string> diff --git a/java/res/values-ja/strings.xml b/java/res/values-ja/strings.xml index 3c6ba0d3a..402c35675 100644 --- a/java/res/values-ja/strings.xml +++ b/java/res/values-ja/strings.xml @@ -61,18 +61,6 @@ <string name="label_more_key" msgid="3760239494604948502">"Shift"</string> <string name="label_pause_key" msgid="181098308428035340">"停止"</string> <string name="label_wait_key" msgid="6402152600878093134">"待機"</string> - <string name="description_delete_key" msgid="5586406298531883960">"Del"</string> - <string name="description_return_key" msgid="8750044000806461678">"Enter"</string> - <string name="description_settings_key" msgid="7484527796782969219">"設定"</string> - <string name="description_shift_key" msgid="346906866277787836">"Shift"</string> - <string name="description_space_key" msgid="8512130111575878517">"Space"</string> - <string name="description_switch_alpha_symbol_key" msgid="4537975384274405537">"記号"</string> - <string name="description_tab_key" msgid="828186583738307137">"Tab"</string> - <string name="description_voice_key" msgid="3057731675774652754">"音声入力"</string> - <string name="description_symbols_on" msgid="2994366855822840559">"記号ON"</string> - <string name="description_symbols_off" msgid="3209578267079515136">"記号OFF"</string> - <string name="description_shift_on" msgid="6983188949895971587">"Shift ON"</string> - <string name="description_shift_off" msgid="8553265474523069034">"Shift OFF"</string> <string name="voice_warning_title" msgid="4419354150908395008">"音声入力"</string> <string name="voice_warning_locale_not_supported" msgid="637923019716442333">"音声入力は現在英語には対応していますが、日本語には対応していません。"</string> <string name="voice_warning_may_not_understand" msgid="5596289095878251072">"音声入力ではGoogleの音声認識技術を利用します。"<a href="http://m.google.com/privacy">"モバイルプライバシーポリシー"</a>"が適用されます。"</string> diff --git a/java/res/values-ko/strings.xml b/java/res/values-ko/strings.xml index 01484d797..ca2f570a8 100644 --- a/java/res/values-ko/strings.xml +++ b/java/res/values-ko/strings.xml @@ -61,18 +61,6 @@ <string name="label_more_key" msgid="3760239494604948502">"더보기"</string> <string name="label_pause_key" msgid="181098308428035340">"일시 중지"</string> <string name="label_wait_key" msgid="6402152600878093134">"대기"</string> - <string name="description_delete_key" msgid="5586406298531883960">"삭제"</string> - <string name="description_return_key" msgid="8750044000806461678">"리턴"</string> - <string name="description_settings_key" msgid="7484527796782969219">"설정"</string> - <string name="description_shift_key" msgid="346906866277787836">"시프트"</string> - <string name="description_space_key" msgid="8512130111575878517">"스페이스"</string> - <string name="description_switch_alpha_symbol_key" msgid="4537975384274405537">"기호"</string> - <string name="description_tab_key" msgid="828186583738307137">"탭"</string> - <string name="description_voice_key" msgid="3057731675774652754">"음성 입력"</string> - <string name="description_symbols_on" msgid="2994366855822840559">"기호 사용"</string> - <string name="description_symbols_off" msgid="3209578267079515136">"기호 사용 안함"</string> - <string name="description_shift_on" msgid="6983188949895971587">"시프트 사용"</string> - <string name="description_shift_off" msgid="8553265474523069034">"시프트 사용 안함"</string> <string name="voice_warning_title" msgid="4419354150908395008">"음성 입력"</string> <string name="voice_warning_locale_not_supported" msgid="637923019716442333">"음성 입력은 현재 자국어로 지원되지 않으며 영어로 작동됩니다."</string> <string name="voice_warning_may_not_understand" msgid="5596289095878251072">"음성 입력에서는 Google의 음성 인식 기능을 사용합니다. "<a href="http://m.google.com/privacy">"모바일 개인정보취급방침"</a>"이 적용됩니다."</string> diff --git a/java/res/values-land/dimens.xml b/java/res/values-land/dimens.xml index c46a51711..8af3cb005 100644 --- a/java/res/values-land/dimens.xml +++ b/java/res/values-land/dimens.xml @@ -21,6 +21,7 @@ <resources> <!-- keyboardHeight = key_height*4 + key_bottom_gap*3, key_height=0.260in --> <dimen name="keyboardHeight">1.100in</dimen> + <fraction name="minKeyboardHeight">45%p</fraction> <!-- key_height + key_bottom_gap = popup_key_height --> <!-- <dimen name="key_height">0.260in</dimen>--> <dimen name="key_bottom_gap">0.020in</dimen> @@ -28,6 +29,10 @@ <dimen name="keyboard_top_padding">0.0in</dimen> <dimen name="keyboard_bottom_padding">0.0in</dimen> <dimen name="keyboard_horizontal_edges_padding">0.0in</dimen> + <fraction name="key_letter_ratio">55%</fraction> + <fraction name="key_label_text_ratio">35%</fraction> + <dimen name="key_preview_offset">0.08in</dimen> + <fraction name="key_preview_text_ratio">90%</fraction> <dimen name="candidate_strip_height">38dip</dimen> <dimen name="candidate_strip_fading_edge_length">63dip</dimen> <dimen name="spacebar_vertical_correction">2dip</dimen> diff --git a/java/res/values-lt/strings.xml b/java/res/values-lt/strings.xml index e808426a8..fbe50e005 100644 --- a/java/res/values-lt/strings.xml +++ b/java/res/values-lt/strings.xml @@ -61,18 +61,6 @@ <string name="label_more_key" msgid="3760239494604948502">"Daugiau"</string> <string name="label_pause_key" msgid="181098308428035340">"Prist."</string> <string name="label_wait_key" msgid="6402152600878093134">"Lauk."</string> - <string name="description_delete_key" msgid="5586406298531883960">"Ištrinti"</string> - <string name="description_return_key" msgid="8750044000806461678">"Grįžti"</string> - <string name="description_settings_key" msgid="7484527796782969219">"Nustatymai"</string> - <string name="description_shift_key" msgid="346906866277787836">"Keitimas"</string> - <string name="description_space_key" msgid="8512130111575878517">"Tarpas"</string> - <string name="description_switch_alpha_symbol_key" msgid="4537975384274405537">"Simboliai"</string> - <string name="description_tab_key" msgid="828186583738307137">"Skirtukas"</string> - <string name="description_voice_key" msgid="3057731675774652754">"Balso įvestis"</string> - <string name="description_symbols_on" msgid="2994366855822840559">"Simboliai įjungti"</string> - <string name="description_symbols_off" msgid="3209578267079515136">"Simboliai išjungti"</string> - <string name="description_shift_on" msgid="6983188949895971587">"Keitimas įjungtas"</string> - <string name="description_shift_off" msgid="8553265474523069034">"Keitimas išjungtas"</string> <string name="voice_warning_title" msgid="4419354150908395008">"Balso įvestis"</string> <string name="voice_warning_locale_not_supported" msgid="637923019716442333">"Šiuo metu balso įvestis jūsų kompiuteryje nepalaikoma, bet ji veikia anglų k."</string> <string name="voice_warning_may_not_understand" msgid="5596289095878251072">"Balso įvesčiai naudojamas „Google“ kalbos atpažinimas. Taikoma "<a href="http://m.google.com/privacy">"privatumo politika mobiliesiems"</a>"."</string> diff --git a/java/res/values-lv/strings.xml b/java/res/values-lv/strings.xml index 69d4ba092..84bee5382 100644 --- a/java/res/values-lv/strings.xml +++ b/java/res/values-lv/strings.xml @@ -61,18 +61,6 @@ <string name="label_more_key" msgid="3760239494604948502">"Vairāk"</string> <string name="label_pause_key" msgid="181098308428035340">"Pauze"</string> <string name="label_wait_key" msgid="6402152600878093134">"Gaidīt"</string> - <string name="description_delete_key" msgid="5586406298531883960">"Dzēšanas taustiņš"</string> - <string name="description_return_key" msgid="8750044000806461678">"Atgriešanās taustiņš"</string> - <string name="description_settings_key" msgid="7484527796782969219">"Iestatījumu taustiņš"</string> - <string name="description_shift_key" msgid="346906866277787836">"Pārslēgšanas taustiņš"</string> - <string name="description_space_key" msgid="8512130111575878517">"Atstarpes taustiņš"</string> - <string name="description_switch_alpha_symbol_key" msgid="4537975384274405537">"Simbolu taustiņš"</string> - <string name="description_tab_key" msgid="828186583738307137">"Tabulēšanas taustiņš"</string> - <string name="description_voice_key" msgid="3057731675774652754">"Runas ievades taustiņš"</string> - <string name="description_symbols_on" msgid="2994366855822840559">"Simbolu režīms ir ieslēgts."</string> - <string name="description_symbols_off" msgid="3209578267079515136">"Simbolu režīms ir izslēgts."</string> - <string name="description_shift_on" msgid="6983188949895971587">"Pārslēgšanas režīms ir ieslēgts."</string> - <string name="description_shift_off" msgid="8553265474523069034">"Pārslēgšanas režīms ir izslēgts."</string> <string name="voice_warning_title" msgid="4419354150908395008">"Balss ievade"</string> <string name="voice_warning_locale_not_supported" msgid="637923019716442333">"Balss ievade jūsu valodā pašlaik netiek atbalstīta, taču tā ir pieejama angļu valodā."</string> <string name="voice_warning_may_not_understand" msgid="5596289095878251072">"Balss ievadei tiek izmantota Google runas atpazīšanas funkcija. Uz šīs funkcijas lietošanu attiecas "<a href="http://m.google.com/privacy">"mobilo sakaru ierīču lietošanas konfidencialitātes politika"</a>"."</string> diff --git a/java/res/values-nb/strings.xml b/java/res/values-nb/strings.xml index 8b4874d91..e20c9515e 100644 --- a/java/res/values-nb/strings.xml +++ b/java/res/values-nb/strings.xml @@ -61,18 +61,6 @@ <string name="label_more_key" msgid="3760239494604948502">"Mer"</string> <string name="label_pause_key" msgid="181098308428035340">"Pause"</string> <string name="label_wait_key" msgid="6402152600878093134">"Vent"</string> - <string name="description_delete_key" msgid="5586406298531883960">"Delete"</string> - <string name="description_return_key" msgid="8750044000806461678">"Enter"</string> - <string name="description_settings_key" msgid="7484527796782969219">"Innstillinger"</string> - <string name="description_shift_key" msgid="346906866277787836">"Shift"</string> - <string name="description_space_key" msgid="8512130111575878517">"Mellomrom"</string> - <string name="description_switch_alpha_symbol_key" msgid="4537975384274405537">"Symboler"</string> - <string name="description_tab_key" msgid="828186583738307137">"Tab"</string> - <string name="description_voice_key" msgid="3057731675774652754">"Taleinndata"</string> - <string name="description_symbols_on" msgid="2994366855822840559">"Symboler er slått på"</string> - <string name="description_symbols_off" msgid="3209578267079515136">"Symboler er slått av"</string> - <string name="description_shift_on" msgid="6983188949895971587">"Shift på"</string> - <string name="description_shift_off" msgid="8553265474523069034">"Shift av"</string> <string name="voice_warning_title" msgid="4419354150908395008">"Stemmedata"</string> <string name="voice_warning_locale_not_supported" msgid="637923019716442333">"Stemmedata håndteres foreløpig ikke på ditt språk, men fungerer på engelsk."</string> <string name="voice_warning_may_not_understand" msgid="5596289095878251072">"Google Voice bruker Googles talegjenkjenning. "<a href="http://m.google.com/privacy">"Personvernreglene for mobil"</a>" gjelder."</string> diff --git a/java/res/values-nl/strings.xml b/java/res/values-nl/strings.xml index ab3f1857d..89b714bc8 100644 --- a/java/res/values-nl/strings.xml +++ b/java/res/values-nl/strings.xml @@ -61,18 +61,6 @@ <string name="label_more_key" msgid="3760239494604948502">"Meer"</string> <string name="label_pause_key" msgid="181098308428035340">"Onderbr."</string> <string name="label_wait_key" msgid="6402152600878093134">"Wacht"</string> - <string name="description_delete_key" msgid="5586406298531883960">"Delete"</string> - <string name="description_return_key" msgid="8750044000806461678">"Return"</string> - <string name="description_settings_key" msgid="7484527796782969219">"Instellingen"</string> - <string name="description_shift_key" msgid="346906866277787836">"Shift"</string> - <string name="description_space_key" msgid="8512130111575878517">"Spatie"</string> - <string name="description_switch_alpha_symbol_key" msgid="4537975384274405537">"Symbolen"</string> - <string name="description_tab_key" msgid="828186583738307137">"Tab"</string> - <string name="description_voice_key" msgid="3057731675774652754">"Spraakinvoer"</string> - <string name="description_symbols_on" msgid="2994366855822840559">"Symbolen aan"</string> - <string name="description_symbols_off" msgid="3209578267079515136">"Symbolen uit"</string> - <string name="description_shift_on" msgid="6983188949895971587">"Shift aan"</string> - <string name="description_shift_off" msgid="8553265474523069034">"Shift uit"</string> <string name="voice_warning_title" msgid="4419354150908395008">"Spraakinvoer"</string> <string name="voice_warning_locale_not_supported" msgid="637923019716442333">"Spraakinvoer wordt momenteel niet ondersteund in uw taal, maar is wel beschikbaar in het Engels."</string> <string name="voice_warning_may_not_understand" msgid="5596289095878251072">"Spraakinvoer maakt gebruik van de spraakherkenning van Google. Het "<a href="http://m.google.com/privacy">"Privacybeleid van Google Mobile"</a>" is van toepassing."</string> diff --git a/java/res/values-pl/strings.xml b/java/res/values-pl/strings.xml index bc352f036..65240d748 100644 --- a/java/res/values-pl/strings.xml +++ b/java/res/values-pl/strings.xml @@ -61,18 +61,6 @@ <string name="label_more_key" msgid="3760239494604948502">"Więcej"</string> <string name="label_pause_key" msgid="181098308428035340">"Pauza"</string> <string name="label_wait_key" msgid="6402152600878093134">"Czekaj"</string> - <string name="description_delete_key" msgid="5586406298531883960">"Delete"</string> - <string name="description_return_key" msgid="8750044000806461678">"Enter"</string> - <string name="description_settings_key" msgid="7484527796782969219">"Ustawienia"</string> - <string name="description_shift_key" msgid="346906866277787836">"Shift"</string> - <string name="description_space_key" msgid="8512130111575878517">"Spacja"</string> - <string name="description_switch_alpha_symbol_key" msgid="4537975384274405537">"Symbole"</string> - <string name="description_tab_key" msgid="828186583738307137">"Tab"</string> - <string name="description_voice_key" msgid="3057731675774652754">"Wprowadzanie głosowe"</string> - <string name="description_symbols_on" msgid="2994366855822840559">"Symbole włączone"</string> - <string name="description_symbols_off" msgid="3209578267079515136">"Symbole wyłączone"</string> - <string name="description_shift_on" msgid="6983188949895971587">"Shift włączony"</string> - <string name="description_shift_off" msgid="8553265474523069034">"Shift wyłączony"</string> <string name="voice_warning_title" msgid="4419354150908395008">"Wprowadzanie głosowe"</string> <string name="voice_warning_locale_not_supported" msgid="637923019716442333">"Wprowadzanie głosowe obecnie nie jest obsługiwane w Twoim języku, ale działa w języku angielskim."</string> <string name="voice_warning_may_not_understand" msgid="5596289095878251072">"Funkcja wprowadzania głosowego wykorzystuje mechanizm rozpoznawania mowy. Obowiązuje "<a href="http://m.google.com/privacy">"Polityka prywatności Google Mobile"</a>"."</string> diff --git a/java/res/values-pt-rPT/strings.xml b/java/res/values-pt-rPT/strings.xml index b881d880f..b972ce049 100644 --- a/java/res/values-pt-rPT/strings.xml +++ b/java/res/values-pt-rPT/strings.xml @@ -61,18 +61,6 @@ <string name="label_more_key" msgid="3760239494604948502">"Mais"</string> <string name="label_pause_key" msgid="181098308428035340">"Pausa"</string> <string name="label_wait_key" msgid="6402152600878093134">"Esp."</string> - <string name="description_delete_key" msgid="5586406298531883960">"Delete"</string> - <string name="description_return_key" msgid="8750044000806461678">"Enter"</string> - <string name="description_settings_key" msgid="7484527796782969219">"Definições"</string> - <string name="description_shift_key" msgid="346906866277787836">"Shift"</string> - <string name="description_space_key" msgid="8512130111575878517">"Espaço"</string> - <string name="description_switch_alpha_symbol_key" msgid="4537975384274405537">"Símbolos"</string> - <string name="description_tab_key" msgid="828186583738307137">"Tab"</string> - <string name="description_voice_key" msgid="3057731675774652754">"Entrada de voz"</string> - <string name="description_symbols_on" msgid="2994366855822840559">"Símbolos ativados"</string> - <string name="description_symbols_off" msgid="3209578267079515136">"Símbolos desativados"</string> - <string name="description_shift_on" msgid="6983188949895971587">"Shift ativado"</string> - <string name="description_shift_off" msgid="8553265474523069034">"Shift desativado"</string> <string name="voice_warning_title" msgid="4419354150908395008">"Entrada de voz"</string> <string name="voice_warning_locale_not_supported" msgid="637923019716442333">"Actualmente, a entrada de voz não é suportada para o seu idioma, mas funciona em inglês."</string> <string name="voice_warning_may_not_understand" msgid="5596289095878251072">"A entrada de voz utiliza o reconhecimento de voz da Google. É aplicável a "<a href="http://m.google.com/privacy">"Política de privacidade do Google Mobile"</a>"."</string> diff --git a/java/res/values-pt/strings.xml b/java/res/values-pt/strings.xml index dedd06e97..a999dc67e 100644 --- a/java/res/values-pt/strings.xml +++ b/java/res/values-pt/strings.xml @@ -61,18 +61,6 @@ <string name="label_more_key" msgid="3760239494604948502">"Mais"</string> <string name="label_pause_key" msgid="181098308428035340">"Pausa"</string> <string name="label_wait_key" msgid="6402152600878093134">"Esp."</string> - <string name="description_delete_key" msgid="5586406298531883960">"Excluir"</string> - <string name="description_return_key" msgid="8750044000806461678">"Voltar"</string> - <string name="description_settings_key" msgid="7484527796782969219">"Configurações"</string> - <string name="description_shift_key" msgid="346906866277787836">"Shift"</string> - <string name="description_space_key" msgid="8512130111575878517">"Espaço"</string> - <string name="description_switch_alpha_symbol_key" msgid="4537975384274405537">"Símbolos"</string> - <string name="description_tab_key" msgid="828186583738307137">"Tab"</string> - <string name="description_voice_key" msgid="3057731675774652754">"Entrada de texto por voz"</string> - <string name="description_symbols_on" msgid="2994366855822840559">"Símbolos ativados"</string> - <string name="description_symbols_off" msgid="3209578267079515136">"Símbolos desativados"</string> - <string name="description_shift_on" msgid="6983188949895971587">"Shift ativado"</string> - <string name="description_shift_off" msgid="8553265474523069034">"Shift desativado"</string> <string name="voice_warning_title" msgid="4419354150908395008">"Entrada de voz"</string> <string name="voice_warning_locale_not_supported" msgid="637923019716442333">"A entrada de voz não é suportada no momento para o seu idioma, mas funciona em inglês."</string> <string name="voice_warning_may_not_understand" msgid="5596289095878251072">"A entrada de texto por voz usa o reconhecimento de voz do Google. "<a href="http://m.google.com/privacy">"A política de privacidade para celulares"</a>" é aplicada."</string> diff --git a/java/res/values-rm/strings.xml b/java/res/values-rm/strings.xml index 8328fc9e8..b0c1bea24 100644 --- a/java/res/values-rm/strings.xml +++ b/java/res/values-rm/strings.xml @@ -85,30 +85,6 @@ <skip /> <!-- no translation found for label_wait_key (6402152600878093134) --> <skip /> - <!-- no translation found for description_delete_key (5586406298531883960) --> - <skip /> - <!-- no translation found for description_return_key (8750044000806461678) --> - <skip /> - <!-- no translation found for description_settings_key (7484527796782969219) --> - <skip /> - <!-- no translation found for description_shift_key (346906866277787836) --> - <skip /> - <!-- no translation found for description_space_key (8512130111575878517) --> - <skip /> - <!-- no translation found for description_switch_alpha_symbol_key (4537975384274405537) --> - <skip /> - <!-- no translation found for description_tab_key (828186583738307137) --> - <skip /> - <!-- no translation found for description_voice_key (3057731675774652754) --> - <skip /> - <!-- no translation found for description_symbols_on (2994366855822840559) --> - <skip /> - <!-- no translation found for description_symbols_off (3209578267079515136) --> - <skip /> - <!-- no translation found for description_shift_on (6983188949895971587) --> - <skip /> - <!-- no translation found for description_shift_off (8553265474523069034) --> - <skip /> <string name="voice_warning_title" msgid="4419354150908395008">"Cumonds vocals"</string> <string name="voice_warning_locale_not_supported" msgid="637923019716442333">"\"Cumonds vocals en Vossa lingua na vegnan actualmain betg sustegnids, ma la funcziun è disponibla per englais.\""</string> <!-- outdated translation 4611518823070986445 --> <string name="voice_warning_may_not_understand" msgid="5596289095878251072">"Ils cumonds vocals èn ina funcziunalitad experimentala che utilisescha la renconuschientscha vocala da rait da Google."</string> diff --git a/java/res/values-ro/strings.xml b/java/res/values-ro/strings.xml index 680bdb8b1..0fcefd1f2 100644 --- a/java/res/values-ro/strings.xml +++ b/java/res/values-ro/strings.xml @@ -61,18 +61,6 @@ <string name="label_more_key" msgid="3760239494604948502">"Mai multe"</string> <string name="label_pause_key" msgid="181098308428035340">"Pauză"</string> <string name="label_wait_key" msgid="6402152600878093134">"Aşt."</string> - <string name="description_delete_key" msgid="5586406298531883960">"Ştergeţi"</string> - <string name="description_return_key" msgid="8750044000806461678">"Tasta Enter"</string> - <string name="description_settings_key" msgid="7484527796782969219">"Setări"</string> - <string name="description_shift_key" msgid="346906866277787836">"Shift"</string> - <string name="description_space_key" msgid="8512130111575878517">"Tasta Space"</string> - <string name="description_switch_alpha_symbol_key" msgid="4537975384274405537">"Simboluri"</string> - <string name="description_tab_key" msgid="828186583738307137">"Tasta Tab"</string> - <string name="description_voice_key" msgid="3057731675774652754">"Intrare vocală"</string> - <string name="description_symbols_on" msgid="2994366855822840559">"Simbolurile sunt activate"</string> - <string name="description_symbols_off" msgid="3209578267079515136">"Simbolurile sunt dezactivate"</string> - <string name="description_shift_on" msgid="6983188949895971587">"Tasta Shift este activată"</string> - <string name="description_shift_off" msgid="8553265474523069034">"Tasta Shift este dezactivată"</string> <string name="voice_warning_title" msgid="4419354150908395008">"Intrare voce"</string> <string name="voice_warning_locale_not_supported" msgid="637923019716442333">"Intrarea vocală nu este acceptată în prezent pentru limba dvs., însă funcţionează în limba engleză."</string> <string name="voice_warning_may_not_understand" msgid="5596289095878251072">"Intrarea vocală utilizează funcţia Google de recunoaştere vocală. Se aplică "<a href="http://m.google.com/privacy">"Politica de confidenţialitate Google Mobil"</a>"."</string> diff --git a/java/res/values-ru/strings.xml b/java/res/values-ru/strings.xml index ae3138ba1..2e8577ea1 100644 --- a/java/res/values-ru/strings.xml +++ b/java/res/values-ru/strings.xml @@ -61,18 +61,6 @@ <string name="label_more_key" msgid="3760239494604948502">"Ещё"</string> <string name="label_pause_key" msgid="181098308428035340">"Приостановить"</string> <string name="label_wait_key" msgid="6402152600878093134">"Подождите"</string> - <string name="description_delete_key" msgid="5586406298531883960">"Клавиша удаления"</string> - <string name="description_return_key" msgid="8750044000806461678">"Клавиша \"Ввод\""</string> - <string name="description_settings_key" msgid="7484527796782969219">"Клавиша настроек"</string> - <string name="description_shift_key" msgid="346906866277787836">"Клавиша верхнего регистра"</string> - <string name="description_space_key" msgid="8512130111575878517">"Клавиша \"Пробел\""</string> - <string name="description_switch_alpha_symbol_key" msgid="4537975384274405537">"Клавиша символов"</string> - <string name="description_tab_key" msgid="828186583738307137">"Клавиша табуляции"</string> - <string name="description_voice_key" msgid="3057731675774652754">"Клавиша голосового ввода"</string> - <string name="description_symbols_on" msgid="2994366855822840559">"Клавиши символов выключены"</string> - <string name="description_symbols_off" msgid="3209578267079515136">"Клавиши символов включены"</string> - <string name="description_shift_on" msgid="6983188949895971587">"Верхний регистр включен"</string> - <string name="description_shift_off" msgid="8553265474523069034">"Верхний регистр выключен"</string> <string name="voice_warning_title" msgid="4419354150908395008">"Голосовой ввод"</string> <string name="voice_warning_locale_not_supported" msgid="637923019716442333">"В настоящее время функция голосового ввода не поддерживает ваш язык, но вы можете пользоваться ей на английском."</string> <string name="voice_warning_may_not_understand" msgid="5596289095878251072">"Голосовой ввод использует алгоритмы распознавания речи Google. Действует "<a href="http://m.google.com/privacy">"политика конфиденциальности для мобильных устройств"</a>"."</string> diff --git a/java/res/values-sk/strings.xml b/java/res/values-sk/strings.xml index 70f9f8bf7..eeefa820f 100644 --- a/java/res/values-sk/strings.xml +++ b/java/res/values-sk/strings.xml @@ -61,18 +61,6 @@ <string name="label_more_key" msgid="3760239494604948502">"Viac"</string> <string name="label_pause_key" msgid="181098308428035340">"Pozastaviť"</string> <string name="label_wait_key" msgid="6402152600878093134">"Čakajte"</string> - <string name="description_delete_key" msgid="5586406298531883960">"Delete"</string> - <string name="description_return_key" msgid="8750044000806461678">"Return"</string> - <string name="description_settings_key" msgid="7484527796782969219">"Nastavenia"</string> - <string name="description_shift_key" msgid="346906866277787836">"Shift"</string> - <string name="description_space_key" msgid="8512130111575878517">"Medzera"</string> - <string name="description_switch_alpha_symbol_key" msgid="4537975384274405537">"Symboly"</string> - <string name="description_tab_key" msgid="828186583738307137">"Tab"</string> - <string name="description_voice_key" msgid="3057731675774652754">"Hlasový vstup"</string> - <string name="description_symbols_on" msgid="2994366855822840559">"Symboly zapnuté"</string> - <string name="description_symbols_off" msgid="3209578267079515136">"Symboly vypnuté"</string> - <string name="description_shift_on" msgid="6983188949895971587">"Shift zapnutý"</string> - <string name="description_shift_off" msgid="8553265474523069034">"Shift vypnutý"</string> <string name="voice_warning_title" msgid="4419354150908395008">"Hlasový vstup"</string> <string name="voice_warning_locale_not_supported" msgid="637923019716442333">"Pre váš jazyk aktuálne nie je hlasový vstup podporovaný, ale funguje v angličtine."</string> <string name="voice_warning_may_not_understand" msgid="5596289095878251072">"Hlasový vstup používa rozpoznávanie hlasu Google. Na používanie hlasového vstupu sa vzťahujú "<a href="http://m.google.com/privacy">"Pravidlá ochrany osobných údajov pre mobilné služby"</a>"."</string> diff --git a/java/res/values-sl/strings.xml b/java/res/values-sl/strings.xml index babf8b097..91f9036e6 100644 --- a/java/res/values-sl/strings.xml +++ b/java/res/values-sl/strings.xml @@ -61,18 +61,6 @@ <string name="label_more_key" msgid="3760239494604948502">"Več"</string> <string name="label_pause_key" msgid="181098308428035340">"Premor"</string> <string name="label_wait_key" msgid="6402152600878093134">"Čakaj"</string> - <string name="description_delete_key" msgid="5586406298531883960">"Izbriši"</string> - <string name="description_return_key" msgid="8750044000806461678">"Vračalka"</string> - <string name="description_settings_key" msgid="7484527796782969219">"Nastavitve"</string> - <string name="description_shift_key" msgid="346906866277787836">"Dvigalka"</string> - <string name="description_space_key" msgid="8512130111575878517">"Preslednica"</string> - <string name="description_switch_alpha_symbol_key" msgid="4537975384274405537">"Znaki"</string> - <string name="description_tab_key" msgid="828186583738307137">"Tabulatorka"</string> - <string name="description_voice_key" msgid="3057731675774652754">"Glasovni vnos"</string> - <string name="description_symbols_on" msgid="2994366855822840559">"Znaki vklopljeni"</string> - <string name="description_symbols_off" msgid="3209578267079515136">"Znaki izklopljeni"</string> - <string name="description_shift_on" msgid="6983188949895971587">"Dvigalka vklopljena"</string> - <string name="description_shift_off" msgid="8553265474523069034">"Dvigalka izklopljena"</string> <string name="voice_warning_title" msgid="4419354150908395008">"Glasovni vnos"</string> <string name="voice_warning_locale_not_supported" msgid="637923019716442333">"Glasovni vnos trenutno ni podprt v vašem jeziku, deluje pa v angleščini."</string> <string name="voice_warning_may_not_understand" msgid="5596289095878251072">"Glasovni vnos uporablja Googlovo prepoznavanje govora. Zanj velja "<a href="http://m.google.com/privacy">"pravilnik o zasebnosti za mobilne naprave"</a>"."</string> diff --git a/java/res/values-sr/strings.xml b/java/res/values-sr/strings.xml index 7a90fbfdc..b20f1df2e 100644 --- a/java/res/values-sr/strings.xml +++ b/java/res/values-sr/strings.xml @@ -61,18 +61,6 @@ <string name="label_more_key" msgid="3760239494604948502">"Још"</string> <string name="label_pause_key" msgid="181098308428035340">"Паузирај"</string> <string name="label_wait_key" msgid="6402152600878093134">"Сачекајте"</string> - <string name="description_delete_key" msgid="5586406298531883960">"Delete"</string> - <string name="description_return_key" msgid="8750044000806461678">"Return"</string> - <string name="description_settings_key" msgid="7484527796782969219">"Подешавања"</string> - <string name="description_shift_key" msgid="346906866277787836">"Shift"</string> - <string name="description_space_key" msgid="8512130111575878517">"Размак"</string> - <string name="description_switch_alpha_symbol_key" msgid="4537975384274405537">"Симболи"</string> - <string name="description_tab_key" msgid="828186583738307137">"Tab"</string> - <string name="description_voice_key" msgid="3057731675774652754">"Гласовни унос"</string> - <string name="description_symbols_on" msgid="2994366855822840559">"Симболи су укључени"</string> - <string name="description_symbols_off" msgid="3209578267079515136">"Симболи су искључени"</string> - <string name="description_shift_on" msgid="6983188949895971587">"Shift је укључен"</string> - <string name="description_shift_off" msgid="8553265474523069034">"Shift је искључен"</string> <string name="voice_warning_title" msgid="4419354150908395008">"Гласовни унос"</string> <string name="voice_warning_locale_not_supported" msgid="637923019716442333">"Гласовни унос тренутно није подржан за ваш језик, али функционише на енглеском."</string> <string name="voice_warning_may_not_understand" msgid="5596289095878251072">"Гласовни унос користи Google-ову функцију за препознавање гласа. Примењује се "<a href="http://m.google.com/privacy">"политика приватности за мобилне уређаје"</a>"."</string> diff --git a/java/res/values-sv/strings.xml b/java/res/values-sv/strings.xml index 922cbf7de..2d35fd87b 100644 --- a/java/res/values-sv/strings.xml +++ b/java/res/values-sv/strings.xml @@ -61,18 +61,6 @@ <string name="label_more_key" msgid="3760239494604948502">"Mer"</string> <string name="label_pause_key" msgid="181098308428035340">"Pausa"</string> <string name="label_wait_key" msgid="6402152600878093134">"Vänta"</string> - <string name="description_delete_key" msgid="5586406298531883960">"Ta bort"</string> - <string name="description_return_key" msgid="8750044000806461678">"Retur"</string> - <string name="description_settings_key" msgid="7484527796782969219">"Inställningar"</string> - <string name="description_shift_key" msgid="346906866277787836">"Skift"</string> - <string name="description_space_key" msgid="8512130111575878517">"Blanksteg"</string> - <string name="description_switch_alpha_symbol_key" msgid="4537975384274405537">"Symboler"</string> - <string name="description_tab_key" msgid="828186583738307137">"Tabb"</string> - <string name="description_voice_key" msgid="3057731675774652754">"Röstinmatning"</string> - <string name="description_symbols_on" msgid="2994366855822840559">"Aktivera symboler"</string> - <string name="description_symbols_off" msgid="3209578267079515136">"Inaktivera symboler"</string> - <string name="description_shift_on" msgid="6983188949895971587">"Aktivera Skift"</string> - <string name="description_shift_off" msgid="8553265474523069034">"Inaktivera Skift"</string> <string name="voice_warning_title" msgid="4419354150908395008">"Röstindata"</string> <string name="voice_warning_locale_not_supported" msgid="637923019716442333">"Röstindata stöds inte på ditt språk än, men tjänsten fungerar på engelska."</string> <string name="voice_warning_may_not_understand" msgid="5596289095878251072">"Röstinmatning använder sig av Googles tjänst för taligenkänning. "<a href="http://m.google.com/privacy">"Sekretesspolicyn för mobila enheter"</a>" gäller."</string> diff --git a/java/res/values-th/strings.xml b/java/res/values-th/strings.xml index de75300ef..cd7fe95c0 100644 --- a/java/res/values-th/strings.xml +++ b/java/res/values-th/strings.xml @@ -61,18 +61,6 @@ <string name="label_more_key" msgid="3760239494604948502">"เพิ่มเติม"</string> <string name="label_pause_key" msgid="181098308428035340">"หยุดชั่วคราว"</string> <string name="label_wait_key" msgid="6402152600878093134">"รอ"</string> - <string name="description_delete_key" msgid="5586406298531883960">"ลบ"</string> - <string name="description_return_key" msgid="8750044000806461678">"Return"</string> - <string name="description_settings_key" msgid="7484527796782969219">"การตั้งค่า"</string> - <string name="description_shift_key" msgid="346906866277787836">"Shift"</string> - <string name="description_space_key" msgid="8512130111575878517">"Space"</string> - <string name="description_switch_alpha_symbol_key" msgid="4537975384274405537">"สัญลักษณ์"</string> - <string name="description_tab_key" msgid="828186583738307137">"Tab"</string> - <string name="description_voice_key" msgid="3057731675774652754">"ป้อนข้อมูลด้วยเสียง"</string> - <string name="description_symbols_on" msgid="2994366855822840559">"สัญลักษณ์เปิดอยู่"</string> - <string name="description_symbols_off" msgid="3209578267079515136">"สัญลักษณ์ปิดอยู่"</string> - <string name="description_shift_on" msgid="6983188949895971587">"Shift เปิดอยู่"</string> - <string name="description_shift_off" msgid="8553265474523069034">"Shift ปิดอยู่"</string> <string name="voice_warning_title" msgid="4419354150908395008">"การป้อนข้อมูลด้วยเสียง"</string> <string name="voice_warning_locale_not_supported" msgid="637923019716442333">"ขณะนี้การป้อนข้อมูลด้วยเสียงยังไม่ได้รับการสนับสนุนในภาษาของคุณ แต่ใช้ได้ในภาษาอังกฤษ"</string> <string name="voice_warning_may_not_understand" msgid="5596289095878251072">"ป้อนข้อมูลด้วยเสียงใช้การจดจำคำพูดของ Google "<a href="http://m.google.com/privacy">" นโยบายส่วนบุคคลของมือถือ"</a>"มีผลบังคับใช้"</string> diff --git a/java/res/values-tl/strings.xml b/java/res/values-tl/strings.xml index 779c56b4f..da62eafc6 100644 --- a/java/res/values-tl/strings.xml +++ b/java/res/values-tl/strings.xml @@ -61,18 +61,6 @@ <string name="label_more_key" msgid="3760239494604948502">"Higit pa"</string> <string name="label_pause_key" msgid="181098308428035340">"Pause"</string> <string name="label_wait_key" msgid="6402152600878093134">"Intay"</string> - <string name="description_delete_key" msgid="5586406298531883960">"Tanggalin"</string> - <string name="description_return_key" msgid="8750044000806461678">"Bumalik"</string> - <string name="description_settings_key" msgid="7484527796782969219">"Mga Setting"</string> - <string name="description_shift_key" msgid="346906866277787836">"Shift"</string> - <string name="description_space_key" msgid="8512130111575878517">"Puwang"</string> - <string name="description_switch_alpha_symbol_key" msgid="4537975384274405537">"Mga Simbolo"</string> - <string name="description_tab_key" msgid="828186583738307137">"Tab"</string> - <string name="description_voice_key" msgid="3057731675774652754">"Input ng Boses"</string> - <string name="description_symbols_on" msgid="2994366855822840559">"Naka-on ang mga simbolo"</string> - <string name="description_symbols_off" msgid="3209578267079515136">"Naka-off ang mga simbolo"</string> - <string name="description_shift_on" msgid="6983188949895971587">"Naka-on ang shift"</string> - <string name="description_shift_off" msgid="8553265474523069034">"Naka-off ang shift"</string> <string name="voice_warning_title" msgid="4419354150908395008">"Pag-input ng boses"</string> <string name="voice_warning_locale_not_supported" msgid="637923019716442333">"Hindi kasalukuyang suportado ang pag-input ng boses para sa iyong wika, ngunit gumagana sa Ingles."</string> <string name="voice_warning_may_not_understand" msgid="5596289095878251072">"Gumagamit ang pag-input ng boses ng speech recognition ng Google. Nalalapat "<a href="http://m.google.com/privacy">"Ang Patakaran sa Privacy ng Mobile"</a>"."</string> diff --git a/java/res/values-tr/strings.xml b/java/res/values-tr/strings.xml index cb993619b..2607ae257 100644 --- a/java/res/values-tr/strings.xml +++ b/java/res/values-tr/strings.xml @@ -61,18 +61,6 @@ <string name="label_more_key" msgid="3760239494604948502">"Diğer"</string> <string name="label_pause_key" msgid="181098308428035340">"Durkl"</string> <string name="label_wait_key" msgid="6402152600878093134">"Bekle"</string> - <string name="description_delete_key" msgid="5586406298531883960">"Sil"</string> - <string name="description_return_key" msgid="8750044000806461678">"Return"</string> - <string name="description_settings_key" msgid="7484527796782969219">"Ayarlar"</string> - <string name="description_shift_key" msgid="346906866277787836">"Üst Karakter"</string> - <string name="description_space_key" msgid="8512130111575878517">"Boşluk"</string> - <string name="description_switch_alpha_symbol_key" msgid="4537975384274405537">"Simgeler"</string> - <string name="description_tab_key" msgid="828186583738307137">"Sekme"</string> - <string name="description_voice_key" msgid="3057731675774652754">"Ses Girişi"</string> - <string name="description_symbols_on" msgid="2994366855822840559">"Simgeler açık"</string> - <string name="description_symbols_off" msgid="3209578267079515136">"Simgeler kapalı"</string> - <string name="description_shift_on" msgid="6983188949895971587">"Üst Karakter açık"</string> - <string name="description_shift_off" msgid="8553265474523069034">"Üst Karakter kapalı"</string> <string name="voice_warning_title" msgid="4419354150908395008">"Ses girişi"</string> <string name="voice_warning_locale_not_supported" msgid="637923019716442333">"Ses girişi, şu anda sizin diliniz için desteklenmiyor ama İngilizce dilinde kullanılabilir."</string> <string name="voice_warning_may_not_understand" msgid="5596289095878251072">"Ses girişi Google\'ın konuşma tanıma işlevini kullanır. "<a href="http://m.google.com/privacy">" Mobil Gizlilik Politikası"</a>" geçerlidir."</string> diff --git a/java/res/values-uk/strings.xml b/java/res/values-uk/strings.xml index ad2665544..a2f589d1d 100644 --- a/java/res/values-uk/strings.xml +++ b/java/res/values-uk/strings.xml @@ -61,18 +61,6 @@ <string name="label_more_key" msgid="3760239494604948502">"Більше"</string> <string name="label_pause_key" msgid="181098308428035340">"Пауза"</string> <string name="label_wait_key" msgid="6402152600878093134">"Чек."</string> - <string name="description_delete_key" msgid="5586406298531883960">"Клавіша Delete"</string> - <string name="description_return_key" msgid="8750044000806461678">"Клавіша Return"</string> - <string name="description_settings_key" msgid="7484527796782969219">"Клавіша Settings"</string> - <string name="description_shift_key" msgid="346906866277787836">"Клавіша Shift"</string> - <string name="description_space_key" msgid="8512130111575878517">"Клавіша Space"</string> - <string name="description_switch_alpha_symbol_key" msgid="4537975384274405537">"Клавіша Symbols"</string> - <string name="description_tab_key" msgid="828186583738307137">"Клавіша Tab"</string> - <string name="description_voice_key" msgid="3057731675774652754">"Клавіша Voice Input"</string> - <string name="description_symbols_on" msgid="2994366855822840559">"Символи ввімкнено"</string> - <string name="description_symbols_off" msgid="3209578267079515136">"Символи вимкнено"</string> - <string name="description_shift_on" msgid="6983188949895971587">"Shift увімкнено"</string> - <string name="description_shift_off" msgid="8553265474523069034">"Shift вимкнено"</string> <string name="voice_warning_title" msgid="4419354150908395008">"Голос. ввід"</string> <string name="voice_warning_locale_not_supported" msgid="637923019716442333">"Голос. ввід наразі не підтрим. для вашої мови, але можна користуватися англійською."</string> <string name="voice_warning_may_not_understand" msgid="5596289095878251072">"Голосовий ввід використовує розпізнавання мовлення Google. Застосовується "<a href="http://m.google.com/privacy">"Політика конфіденційності для мобільних пристроїв"</a>"."</string> diff --git a/java/res/values-vi/strings.xml b/java/res/values-vi/strings.xml index cc74b4ea5..81be8264e 100644 --- a/java/res/values-vi/strings.xml +++ b/java/res/values-vi/strings.xml @@ -61,18 +61,6 @@ <string name="label_more_key" msgid="3760239494604948502">"Khác"</string> <string name="label_pause_key" msgid="181098308428035340">"Tạm dừng"</string> <string name="label_wait_key" msgid="6402152600878093134">"Đợi"</string> - <string name="description_delete_key" msgid="5586406298531883960">"Xóa"</string> - <string name="description_return_key" msgid="8750044000806461678">"Quay lại"</string> - <string name="description_settings_key" msgid="7484527796782969219">"Cài đặt"</string> - <string name="description_shift_key" msgid="346906866277787836">"Shift"</string> - <string name="description_space_key" msgid="8512130111575878517">"Dấu cách"</string> - <string name="description_switch_alpha_symbol_key" msgid="4537975384274405537">"Biểu tượng"</string> - <string name="description_tab_key" msgid="828186583738307137">"Tab"</string> - <string name="description_voice_key" msgid="3057731675774652754">"Nhập liệu bằng giọng nói"</string> - <string name="description_symbols_on" msgid="2994366855822840559">"Bật biểu tượng"</string> - <string name="description_symbols_off" msgid="3209578267079515136">"Tắt biểu tượng"</string> - <string name="description_shift_on" msgid="6983188949895971587">"Bật Shift"</string> - <string name="description_shift_off" msgid="8553265474523069034">"Tắt Shift"</string> <string name="voice_warning_title" msgid="4419354150908395008">"Nhập liệu bằng giọng nói"</string> <string name="voice_warning_locale_not_supported" msgid="637923019716442333">"Nhập liệu bằng giọng nói hiện không được hỗ trợ cho ngôn ngữ của bạn nhưng hoạt động với ngôn ngữ tiếng Anh."</string> <string name="voice_warning_may_not_understand" msgid="5596289095878251072">"Nhập liệu bằng giọng nói sử dụng nhận dạng giọng nói của Google. Áp dụng "<a href="http://m.google.com/privacy">"Chính sách bảo mật dành cho điện thoại di động"</a>"."</string> diff --git a/java/res/values-xlarge-land/dimens.xml b/java/res/values-xlarge-land/dimens.xml index fd6b1f386..ade125639 100644 --- a/java/res/values-xlarge-land/dimens.xml +++ b/java/res/values-xlarge-land/dimens.xml @@ -30,8 +30,8 @@ <dimen name="keyboard_bottom_padding">0.0mm</dimen> <dimen name="keyboard_horizontal_edges_padding">0.0mm</dimen> - <dimen name="key_letter_size">28dip</dimen> - <dimen name="key_label_text_size">20dip</dimen> + <fraction name="key_letter_ratio">30.7%</fraction> + <fraction name="key_label_text_ratio">21.9%</fraction> <!-- left or right padding of label alignment --> <dimen name="key_label_horizontal_alignment_padding">18dip</dimen> <dimen name="key_preview_height_holo">26.5mm</dimen> diff --git a/java/res/values-xlarge/dimens.xml b/java/res/values-xlarge/dimens.xml index 4f78bea4f..2796b6fcb 100644 --- a/java/res/values-xlarge/dimens.xml +++ b/java/res/values-xlarge/dimens.xml @@ -37,11 +37,11 @@ <!-- popup_key_height x -1.0 --> <dimen name="mini_keyboard_vertical_correction">-13.0mm</dimen> - <dimen name="key_letter_size">26dip</dimen> - <dimen name="key_label_text_size">16dip</dimen> + <fraction name="key_letter_ratio">34.4%</fraction> + <fraction name="key_label_text_ratio">21.2%</fraction> <!-- left or right padding of label alignment --> <dimen name="key_label_horizontal_alignment_padding">6dip</dimen> - <dimen name="key_preview_text_size_large">24dip</dimen> + <fraction name="key_preview_text_ratio">26.3%</fraction> <dimen name="key_preview_height_holo">23.0mm</dimen> <dimen name="key_preview_offset_holo">8.0mm</dimen> diff --git a/java/res/values-zh-rCN/strings.xml b/java/res/values-zh-rCN/strings.xml index a8edf1039..1f15831b3 100644 --- a/java/res/values-zh-rCN/strings.xml +++ b/java/res/values-zh-rCN/strings.xml @@ -61,18 +61,6 @@ <string name="label_more_key" msgid="3760239494604948502">"更多"</string> <string name="label_pause_key" msgid="181098308428035340">"暂停"</string> <string name="label_wait_key" msgid="6402152600878093134">"等待"</string> - <string name="description_delete_key" msgid="5586406298531883960">"删除"</string> - <string name="description_return_key" msgid="8750044000806461678">"回车"</string> - <string name="description_settings_key" msgid="7484527796782969219">"设置"</string> - <string name="description_shift_key" msgid="346906866277787836">"Shift"</string> - <string name="description_space_key" msgid="8512130111575878517">"空格"</string> - <string name="description_switch_alpha_symbol_key" msgid="4537975384274405537">"符号"</string> - <string name="description_tab_key" msgid="828186583738307137">"Tab"</string> - <string name="description_voice_key" msgid="3057731675774652754">"语音输入"</string> - <string name="description_symbols_on" msgid="2994366855822840559">"符号模式已打开"</string> - <string name="description_symbols_off" msgid="3209578267079515136">"符号模式已关闭"</string> - <string name="description_shift_on" msgid="6983188949895971587">"Shift 模式已打开"</string> - <string name="description_shift_off" msgid="8553265474523069034">"Shift 模式已关闭"</string> <string name="voice_warning_title" msgid="4419354150908395008">"语音输入"</string> <string name="voice_warning_locale_not_supported" msgid="637923019716442333">"语音输入功能当前还不支持您的语言,您只能输入英语语音。"</string> <string name="voice_warning_may_not_understand" msgid="5596289095878251072">"语音输入采用了 Google 的语音识别技术,因此请遵守"<a href="http://m.google.com/privacy">"“Google 移动”隐私权政策"</a>"。"</string> diff --git a/java/res/values-zh-rTW/strings.xml b/java/res/values-zh-rTW/strings.xml index 58e2bcd45..8a89aeb08 100644 --- a/java/res/values-zh-rTW/strings.xml +++ b/java/res/values-zh-rTW/strings.xml @@ -61,18 +61,6 @@ <string name="label_more_key" msgid="3760239494604948502">"更多"</string> <string name="label_pause_key" msgid="181098308428035340">"暫停"</string> <string name="label_wait_key" msgid="6402152600878093134">"等候"</string> - <string name="description_delete_key" msgid="5586406298531883960">"刪除"</string> - <string name="description_return_key" msgid="8750044000806461678">"返回"</string> - <string name="description_settings_key" msgid="7484527796782969219">"設定"</string> - <string name="description_shift_key" msgid="346906866277787836">"Shift 鍵"</string> - <string name="description_space_key" msgid="8512130111575878517">"空白鍵"</string> - <string name="description_switch_alpha_symbol_key" msgid="4537975384274405537">"符號"</string> - <string name="description_tab_key" msgid="828186583738307137">"Tab 鍵"</string> - <string name="description_voice_key" msgid="3057731675774652754">"語音輸入"</string> - <string name="description_symbols_on" msgid="2994366855822840559">"開啟符號"</string> - <string name="description_symbols_off" msgid="3209578267079515136">"關閉符號"</string> - <string name="description_shift_on" msgid="6983188949895971587">"開啟位移"</string> - <string name="description_shift_off" msgid="8553265474523069034">"關閉位移"</string> <string name="voice_warning_title" msgid="4419354150908395008">"語音輸入"</string> <string name="voice_warning_locale_not_supported" msgid="637923019716442333">"語音輸入目前不支援您的語言,但是可以辨識英文。"</string> <string name="voice_warning_may_not_understand" msgid="5596289095878251072">"語音輸入使用 Google 的語音辨識功能,並遵循《"<a href="http://m.google.com/privacy">"行動服務隱私權政策"</a>"》。"</string> diff --git a/java/res/values/attrs.xml b/java/res/values/attrs.xml index e88b007a9..f03da4f8f 100644 --- a/java/res/values/attrs.xml +++ b/java/res/values/attrs.xml @@ -25,11 +25,13 @@ checkable+checked+pressed. --> <attr name="keyBackground" format="reference" /> - <!-- Size of the text for one letter character keys. --> - <attr name="keyLetterSize" format="dimension" /> + <!-- Size of the text for one letter character keys, in the proportion of key height. + --> + <attr name="keyLetterRatio" format="float" /> - <!-- Size of the text for custom keys with some text and no icon. --> - <attr name="labelTextSize" format="dimension" /> + <!-- Size of the text for custom keys with some text and no icon, in the proportion of key + height. --> + <attr name="labelTextRatio" format="float" /> <!-- Color to use for the label in a key. --> <attr name="keyTextColor" format="color" /> @@ -80,6 +82,9 @@ <attr name="keyboardHeight" format="dimension" /> <!-- Maximum keyboard height, in pixels or percentage of display height --> <attr name="maxKeyboardHeight" format="dimension|fraction" /> + <!-- Minimum keyboard height represented in pixels, percentage of display height if fraction + is positive, or percentage of display width if fraction is negative. --> + <attr name="minKeyboardHeight" format="dimension|fraction" /> <!-- Default width of a key, in pixels or percentage of display width. --> <attr name="keyWidth" format="dimension|fraction" /> <!-- Default height of a row (key height + vertical gap), in pixels or percentage of diff --git a/java/res/values/dimens.xml b/java/res/values/dimens.xml index 69f962f00..4708611e0 100644 --- a/java/res/values/dimens.xml +++ b/java/res/values/dimens.xml @@ -21,6 +21,8 @@ <resources> <!-- keyboardHeight = key_height*4 + key_bottom_gap*3, key_height=0.295in --> <dimen name="keyboardHeight">1.285in</dimen> + <fraction name="maxKeyboardHeight">50%p</fraction> + <fraction name="minKeyboardHeight">-61.8%p</fraction> <!-- key_height + key_bottom_gap = popup_key_height --> <!-- <dimen name="key_height">0.295in</dimen> --> <dimen name="key_bottom_gap">0.035in</dimen> @@ -41,13 +43,13 @@ to user's finger. --> <dimen name="keyboard_vertical_correction">-0.05in</dimen> - <dimen name="key_letter_size">0.13in</dimen> - <dimen name="key_label_text_size">0.083in</dimen> + <fraction name="key_letter_ratio">45%</fraction> + <fraction name="key_label_text_ratio">29%</fraction> <!-- left or right padding of label alignment --> - <dimen name="key_label_horizontal_alignment_padding">0.13in</dimen> + <dimen name="key_label_horizontal_alignment_padding">21dip</dimen> <dimen name="key_preview_height">80sp</dimen> - <dimen name="key_preview_offset">0.000in</dimen> - <dimen name="key_preview_text_size_large">36sp</dimen> + <dimen name="key_preview_offset">0.1in</dimen> + <fraction name="key_preview_text_ratio">82%</fraction> <dimen name="key_preview_height_holo">130sp</dimen> <dimen name="key_preview_offset_holo">0.193in</dimen> diff --git a/java/res/values/keycodes.xml b/java/res/values/keycodes.xml index 7145af574..d5926ecfd 100644 --- a/java/res/values/keycodes.xml +++ b/java/res/values/keycodes.xml @@ -31,24 +31,4 @@ <integer name="key_delete">-5</integer> <integer name="key_settings">-6</integer> <integer name="key_shortcut">-8</integer> - - <!-- Array used for mapping key codes to description strings. --> - <array name="key_descriptions"> - <item>@integer/key_tab</item> - <item>@string/description_tab_key</item> - <item>@integer/key_return</item> - <item>@string/description_return_key</item> - <item>@integer/key_space</item> - <item>@string/description_space_key</item> - <item>@integer/key_shift</item> - <item>@string/description_shift_key</item> - <item>@integer/key_switch_alpha_symbol</item> - <item>@string/description_switch_alpha_symbol_key</item> - <item>@integer/key_delete</item> - <item>@string/description_delete_key</item> - <item>@integer/key_settings</item> - <item>@string/description_settings_key</item> - <item>@integer/key_shortcut</item> - <item>@string/description_voice_key</item> - </array> </resources> diff --git a/java/res/values/strings.xml b/java/res/values/strings.xml index 05d686ea7..ac6082f22 100644 --- a/java/res/values/strings.xml +++ b/java/res/values/strings.xml @@ -46,6 +46,18 @@ <!-- Category title for misc options --> <string name="misc_category">Other options</string> + <!-- Option name for advanced settings screen [CHAR LIMIT=25] --> + <string name="advanced_settings">Advanced settings</string> + <!-- Option summary for advanced settings screen [CHAR LIMIT=65 (two lines) or 30 (fits on one line, preferable)] --> + <string name="advanced_settings_summary">Options for expert users</string> + + <!-- Option for the dismiss delay of the key popup [CHAR LIMIT=25] --> + <string name="key_preview_popup_dismiss_delay">Key popup dismiss delay</string> + <!-- Description for delay for dismissing a popup on keypress: no delay [CHAR LIMIT=15] --> + <string name="key_preview_popup_dismiss_no_delay">No delay</string> + <!-- Description for delay for dismissing a popup on screen: default value of the delay [CHAR LIMIT=15] --> + <string name="key_preview_popup_dismiss_default_delay">Default</string> + <!-- Option to enable auto capitalization of sentences --> <string name="auto_cap">Auto-capitalization</string> @@ -114,31 +126,6 @@ <!-- Label for "Wait" key of phone number keyboard. Must be short to fit on key! [CHAR LIMIT=5]--> <string name="label_wait_key">Wait</string> - <!-- Spoken text description for delete key. --> - <string name="description_delete_key">Delete</string> - <!-- Spoken text description for return key. --> - <string name="description_return_key">Return</string> - <!-- Spoken text description for settings key. --> - <string name="description_settings_key">Settings</string> - <!-- Spoken text description for shift key. --> - <string name="description_shift_key">Shift</string> - <!-- Spoken text description for space key. --> - <string name="description_space_key">Space</string> - <!-- Spoken text description for symbols key. --> - <string name="description_switch_alpha_symbol_key">Symbols</string> - <!-- Spoken text description for tab key. --> - <string name="description_tab_key">Tab</string> - <!-- Spoken text description for voice input key. --> - <string name="description_voice_key">Voice Input</string> - <!-- Spoken text description for symbols mode on. --> - <string name="description_symbols_on">Symbols on</string> - <!-- Spoken text description for symbols mode off. --> - <string name="description_symbols_off">Symbols off</string> - <!-- Spoken text description for shift mode on. --> - <string name="description_shift_on">Shift on</string> - <!-- Spoken text description for shift mode off. --> - <string name="description_shift_off">Shift off</string> - <!-- Voice related labels --> <!-- Title of the warning dialog that shows when a user initiates voice input for @@ -285,6 +272,8 @@ <string name="subtype_mode_nl_keyboard">Dutch Keyboard</string> <!-- Description for Polish keyboard subtype [CHAR LIMIT=35] --> <string name="subtype_mode_pl_keyboard">Polish Keyboard</string> + <!-- Description for Portuguese keyboard subtype [CHAR LIMIT=35] --> + <string name="subtype_mode_pt_keyboard">Portuguese Keyboard</string> <!-- Description for Russian keyboard subtype [CHAR LIMIT=35] --> <string name="subtype_mode_ru_keyboard">Russian Keyboard</string> <!-- Description for Serbian keyboard subtype [CHAR LIMIT=35] --> diff --git a/java/res/values/styles.xml b/java/res/values/styles.xml index 8a4b16d7a..3a389e57b 100644 --- a/java/res/values/styles.xml +++ b/java/res/values/styles.xml @@ -19,14 +19,14 @@ <item name="android:background">@drawable/keyboard_background</item> <item name="keyBackground">@drawable/btn_keyboard_key</item> - <item name="keyLetterSize">@dimen/key_letter_size</item> + <item name="keyLetterRatio">@fraction/key_letter_ratio</item> <item name="keyLetterStyle">normal</item> <item name="keyTextColor">#FFFFFFFF</item> <item name="keyTextColorDisabled">#FFFFFFFF</item> <item name="keyPreviewLayout">@layout/key_preview</item> <item name="keyPreviewOffset">@dimen/key_preview_offset</item> <item name="keyPreviewHeight">@dimen/key_preview_height</item> - <item name="labelTextSize">@dimen/key_label_text_size</item> + <item name="labelTextRatio">@fraction/key_label_text_ratio</item> <item name="popupLayout">@layout/keyboard_popup</item> <item name="keyHysteresisDistance">@dimen/key_hysteresis_distance</item> <item name="verticalCorrection">@dimen/keyboard_vertical_correction</item> diff --git a/java/res/xml-ar/kbd_qwerty.xml b/java/res/xml-ar/kbd_qwerty.xml index 5faf60336..93310bf9c 100644 --- a/java/res/xml-ar/kbd_qwerty.xml +++ b/java/res/xml-ar/kbd_qwerty.xml @@ -21,7 +21,8 @@ <Keyboard xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" latin:keyboardHeight="@dimen/keyboardHeight" - latin:maxKeyboardHeight="50%p" + latin:maxKeyboardHeight="@fraction/maxKeyboardHeight" + latin:minKeyboardHeight="@fraction/minKeyboardHeight" latin:rowHeight="25%p" latin:keyWidth="10%p" latin:horizontalGap="@dimen/key_horizontal_gap" diff --git a/java/res/xml-cs/kbd_qwerty.xml b/java/res/xml-cs/kbd_qwerty.xml index 0e6e40d7c..a74f7fa84 100644 --- a/java/res/xml-cs/kbd_qwerty.xml +++ b/java/res/xml-cs/kbd_qwerty.xml @@ -21,7 +21,8 @@ <Keyboard xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" latin:keyboardHeight="@dimen/keyboardHeight" - latin:maxKeyboardHeight="50%p" + latin:maxKeyboardHeight="@fraction/maxKeyboardHeight" + latin:minKeyboardHeight="@fraction/minKeyboardHeight" latin:rowHeight="25%p" latin:keyWidth="10%p" latin:horizontalGap="@dimen/key_horizontal_gap" diff --git a/java/res/xml-da/kbd_qwerty.xml b/java/res/xml-da/kbd_qwerty.xml index d9847ae83..12ea33c13 100644 --- a/java/res/xml-da/kbd_qwerty.xml +++ b/java/res/xml-da/kbd_qwerty.xml @@ -21,7 +21,8 @@ <Keyboard xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" latin:keyboardHeight="@dimen/keyboardHeight" - latin:maxKeyboardHeight="50%p" + latin:maxKeyboardHeight="@fraction/maxKeyboardHeight" + latin:minKeyboardHeight="@fraction/minKeyboardHeight" latin:rowHeight="25%p" latin:horizontalGap="@dimen/key_horizontal_gap" latin:verticalGap="@dimen/key_bottom_gap" diff --git a/java/res/xml-de/kbd_qwerty.xml b/java/res/xml-de/kbd_qwerty.xml index e6569667d..cc7722a44 100644 --- a/java/res/xml-de/kbd_qwerty.xml +++ b/java/res/xml-de/kbd_qwerty.xml @@ -21,14 +21,15 @@ <Keyboard xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" latin:keyboardHeight="@dimen/keyboardHeight" - latin:maxKeyboardHeight="50%p" + latin:maxKeyboardHeight="@fraction/maxKeyboardHeight" + latin:minKeyboardHeight="@fraction/minKeyboardHeight" latin:rowHeight="25%p" latin:keyWidth="10%p" latin:horizontalGap="@dimen/key_horizontal_gap" latin:verticalGap="@dimen/key_bottom_gap" latin:popupKeyboardTemplate="@xml/kbd_popup_template" latin:maxPopupKeyboardColumn="@integer/config_max_popup_keyboard_column" - latin:keyboardLocale="de_DE" + latin:keyboardLocale="de" > <include latin:keyboardLayout="@xml/kbd_qwertz_rows" /> diff --git a/java/res/xml-es/kbd_qwerty.xml b/java/res/xml-es/kbd_qwerty.xml new file mode 100644 index 000000000..8e7c1e09b --- /dev/null +++ b/java/res/xml-es/kbd_qwerty.xml @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** +** Copyright 2011, The Android Open Source Project +** +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at +** +** http://www.apache.org/licenses/LICENSE-2.0 +** +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and +** limitations under the License. +*/ +--> + +<Keyboard + xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" + latin:keyboardHeight="@dimen/keyboardHeight" + latin:maxKeyboardHeight="50%p" + latin:rowHeight="25%p" + latin:keyWidth="10%p" + latin:horizontalGap="@dimen/key_horizontal_gap" + latin:verticalGap="@dimen/key_bottom_gap" + latin:popupKeyboardTemplate="@xml/kbd_popup_template" + latin:maxPopupKeyboardColumn="@integer/config_max_popup_keyboard_column" + latin:keyboardLocale="es,es_US" +> + <include + latin:keyboardLayout="@xml/kbd_qwerty_rows" /> +</Keyboard> diff --git a/java/res/xml-fi/kbd_qwerty.xml b/java/res/xml-fi/kbd_qwerty.xml index ea08d670b..e35ab2b41 100644 --- a/java/res/xml-fi/kbd_qwerty.xml +++ b/java/res/xml-fi/kbd_qwerty.xml @@ -21,7 +21,8 @@ <Keyboard xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" latin:keyboardHeight="@dimen/keyboardHeight" - latin:maxKeyboardHeight="50%p" + latin:maxKeyboardHeight="@fraction/maxKeyboardHeight" + latin:minKeyboardHeight="@fraction/minKeyboardHeight" latin:rowHeight="25%p" latin:horizontalGap="@dimen/key_horizontal_gap" latin:verticalGap="@dimen/key_bottom_gap" diff --git a/java/res/xml-fr-rCA/kbd_qwerty.xml b/java/res/xml-fr-rCA/kbd_qwerty.xml index f9c29698b..e649a1e9c 100644 --- a/java/res/xml-fr-rCA/kbd_qwerty.xml +++ b/java/res/xml-fr-rCA/kbd_qwerty.xml @@ -21,7 +21,8 @@ <Keyboard xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" latin:keyboardHeight="@dimen/keyboardHeight" - latin:maxKeyboardHeight="50%p" + latin:maxKeyboardHeight="@fraction/maxKeyboardHeight" + latin:minKeyboardHeight="@fraction/minKeyboardHeight" latin:rowHeight="25%p" latin:keyWidth="10%p" latin:horizontalGap="@dimen/key_horizontal_gap" diff --git a/java/res/xml-fr-rCH/kbd_qwerty.xml b/java/res/xml-fr-rCH/kbd_qwerty.xml index e47cfd9b4..f82becb48 100644 --- a/java/res/xml-fr-rCH/kbd_qwerty.xml +++ b/java/res/xml-fr-rCH/kbd_qwerty.xml @@ -21,7 +21,8 @@ <Keyboard xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" latin:keyboardHeight="@dimen/keyboardHeight" - latin:maxKeyboardHeight="50%p" + latin:maxKeyboardHeight="@fraction/maxKeyboardHeight" + latin:minKeyboardHeight="@fraction/minKeyboardHeight" latin:rowHeight="25%p" latin:keyWidth="10%p" latin:horizontalGap="@dimen/key_horizontal_gap" diff --git a/java/res/xml-fr/kbd_qwerty.xml b/java/res/xml-fr/kbd_qwerty.xml index 2f8e67bb1..5d1f10c6b 100644 --- a/java/res/xml-fr/kbd_qwerty.xml +++ b/java/res/xml-fr/kbd_qwerty.xml @@ -21,14 +21,15 @@ <Keyboard xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" latin:keyboardHeight="@dimen/keyboardHeight" - latin:maxKeyboardHeight="50%p" + latin:maxKeyboardHeight="@fraction/maxKeyboardHeight" + latin:minKeyboardHeight="@fraction/minKeyboardHeight" latin:rowHeight="25%p" latin:keyWidth="10%p" latin:horizontalGap="@dimen/key_horizontal_gap" latin:verticalGap="@dimen/key_bottom_gap" latin:popupKeyboardTemplate="@xml/kbd_popup_template" latin:maxPopupKeyboardColumn="@integer/config_max_popup_keyboard_column" - latin:keyboardLocale="fr_FR" + latin:keyboardLocale="fr" > <include latin:keyboardLayout="@xml/kbd_azerty_rows" /> diff --git a/java/res/xml-hu/kbd_qwerty.xml b/java/res/xml-hu/kbd_qwerty.xml index db729cf02..952ad9a0f 100644 --- a/java/res/xml-hu/kbd_qwerty.xml +++ b/java/res/xml-hu/kbd_qwerty.xml @@ -21,7 +21,8 @@ <Keyboard xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" latin:keyboardHeight="@dimen/keyboardHeight" - latin:maxKeyboardHeight="50%p" + latin:maxKeyboardHeight="@fraction/maxKeyboardHeight" + latin:minKeyboardHeight="@fraction/minKeyboardHeight" latin:rowHeight="25%p" latin:keyWidth="10%p" latin:horizontalGap="@dimen/key_horizontal_gap" diff --git a/java/res/xml-iw/kbd_qwerty.xml b/java/res/xml-iw/kbd_qwerty.xml index 4cd565b88..cfe404c9d 100644 --- a/java/res/xml-iw/kbd_qwerty.xml +++ b/java/res/xml-iw/kbd_qwerty.xml @@ -21,7 +21,8 @@ <Keyboard xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" latin:keyboardHeight="@dimen/keyboardHeight" - latin:maxKeyboardHeight="50%p" + latin:maxKeyboardHeight="@fraction/maxKeyboardHeight" + latin:minKeyboardHeight="@fraction/minKeyboardHeight" latin:rowHeight="25%p" latin:keyWidth="10%p" latin:horizontalGap="@dimen/key_horizontal_gap" diff --git a/java/res/xml-nb/kbd_qwerty.xml b/java/res/xml-nb/kbd_qwerty.xml index 7b20ca28d..e7a743ca9 100644 --- a/java/res/xml-nb/kbd_qwerty.xml +++ b/java/res/xml-nb/kbd_qwerty.xml @@ -21,7 +21,8 @@ <Keyboard xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" latin:keyboardHeight="@dimen/keyboardHeight" - latin:maxKeyboardHeight="50%p" + latin:maxKeyboardHeight="@fraction/maxKeyboardHeight" + latin:minKeyboardHeight="@fraction/minKeyboardHeight" latin:rowHeight="25%p" latin:horizontalGap="@dimen/key_horizontal_gap" latin:verticalGap="@dimen/key_bottom_gap" diff --git a/java/res/xml-pl/kbd_qwerty.xml b/java/res/xml-pl/kbd_qwerty.xml index fad28d641..ea52b296f 100644 --- a/java/res/xml-pl/kbd_qwerty.xml +++ b/java/res/xml-pl/kbd_qwerty.xml @@ -28,7 +28,7 @@ latin:verticalGap="@dimen/key_bottom_gap" latin:popupKeyboardTemplate="@xml/kbd_popup_template" latin:maxPopupKeyboardColumn="@integer/config_max_popup_keyboard_column" - latin:keyboardLocale="pl_PL" + latin:keyboardLocale="pl" > <include latin:keyboardLayout="@xml/kbd_qwerty_rows" /> diff --git a/java/res/xml-pt/kbd_qwerty.xml b/java/res/xml-pt/kbd_qwerty.xml new file mode 100644 index 000000000..64c1a0137 --- /dev/null +++ b/java/res/xml-pt/kbd_qwerty.xml @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** +** Copyright 2011, The Android Open Source Project +** +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at +** +** http://www.apache.org/licenses/LICENSE-2.0 +** +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and +** limitations under the License. +*/ +--> + +<Keyboard + xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" + latin:keyboardHeight="@dimen/keyboardHeight" + latin:maxKeyboardHeight="50%p" + latin:rowHeight="25%p" + latin:keyWidth="10%p" + latin:horizontalGap="@dimen/key_horizontal_gap" + latin:verticalGap="@dimen/key_bottom_gap" + latin:popupKeyboardTemplate="@xml/kbd_popup_template" + latin:maxPopupKeyboardColumn="@integer/config_max_popup_keyboard_column" + latin:keyboardLocale="pt" +> + <include + latin:keyboardLayout="@xml/kbd_qwerty_rows" /> +</Keyboard> diff --git a/java/res/xml-ru/kbd_qwerty.xml b/java/res/xml-ru/kbd_qwerty.xml index e5aea581e..826818c46 100644 --- a/java/res/xml-ru/kbd_qwerty.xml +++ b/java/res/xml-ru/kbd_qwerty.xml @@ -21,13 +21,14 @@ <Keyboard xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" latin:keyboardHeight="@dimen/keyboardHeight" - latin:maxKeyboardHeight="50%p" + latin:maxKeyboardHeight="@fraction/maxKeyboardHeight" + latin:minKeyboardHeight="@fraction/minKeyboardHeight" latin:rowHeight="25%p" latin:horizontalGap="@dimen/key_horizontal_gap" latin:verticalGap="@dimen/key_bottom_gap" latin:popupKeyboardTemplate="@xml/kbd_popup_template" latin:maxPopupKeyboardColumn="@integer/config_max_popup_keyboard_column" - latin:keyboardLocale="ru_RU" + latin:keyboardLocale="ru" > <include latin:keyboardLayout="@xml/kbd_ru_rows" /> diff --git a/java/res/xml-sr/kbd_qwerty.xml b/java/res/xml-sr/kbd_qwerty.xml index 9782cd5eb..6116c7536 100644 --- a/java/res/xml-sr/kbd_qwerty.xml +++ b/java/res/xml-sr/kbd_qwerty.xml @@ -21,7 +21,8 @@ <Keyboard xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" latin:keyboardHeight="@dimen/keyboardHeight" - latin:maxKeyboardHeight="50%p" + latin:maxKeyboardHeight="@fraction/maxKeyboardHeight" + latin:minKeyboardHeight="@fraction/minKeyboardHeight" latin:rowHeight="25%p" latin:horizontalGap="@dimen/key_horizontal_gap" latin:verticalGap="@dimen/key_bottom_gap" diff --git a/java/res/xml-sv/kbd_qwerty.xml b/java/res/xml-sv/kbd_qwerty.xml index 3ff1679a2..69f0b3fa0 100644 --- a/java/res/xml-sv/kbd_qwerty.xml +++ b/java/res/xml-sv/kbd_qwerty.xml @@ -21,7 +21,8 @@ <Keyboard xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" latin:keyboardHeight="@dimen/keyboardHeight" - latin:maxKeyboardHeight="50%p" + latin:maxKeyboardHeight="@fraction/maxKeyboardHeight" + latin:minKeyboardHeight="@fraction/minKeyboardHeight" latin:rowHeight="25%p" latin:horizontalGap="@dimen/key_horizontal_gap" latin:verticalGap="@dimen/key_bottom_gap" diff --git a/java/res/xml-xlarge/kbd_number.xml b/java/res/xml-xlarge/kbd_number.xml index 012b75115..7cb77ea00 100644 --- a/java/res/xml-xlarge/kbd_number.xml +++ b/java/res/xml-xlarge/kbd_number.xml @@ -21,7 +21,8 @@ <Keyboard xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" latin:keyboardHeight="@dimen/keyboardHeight" - latin:maxKeyboardHeight="50%p" + latin:maxKeyboardHeight="@fraction/maxKeyboardHeight" + latin:minKeyboardHeight="@fraction/minKeyboardHeight" latin:rowHeight="25%p" latin:keyWidth="11.949%p" latin:horizontalGap="@dimen/key_horizontal_gap" diff --git a/java/res/xml-xlarge/kbd_phone.xml b/java/res/xml-xlarge/kbd_phone.xml index 9122176a9..60edcf2bd 100644 --- a/java/res/xml-xlarge/kbd_phone.xml +++ b/java/res/xml-xlarge/kbd_phone.xml @@ -21,7 +21,8 @@ <Keyboard xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" latin:keyboardHeight="@dimen/keyboardHeight" - latin:maxKeyboardHeight="50%p" + latin:maxKeyboardHeight="@fraction/maxKeyboardHeight" + latin:minKeyboardHeight="@fraction/minKeyboardHeight" latin:rowHeight="25%p" latin:keyWidth="11.949%p" latin:horizontalGap="@dimen/key_horizontal_gap" diff --git a/java/res/xml-xlarge/kbd_phone_symbols.xml b/java/res/xml-xlarge/kbd_phone_symbols.xml index 055c14867..c388a4667 100644 --- a/java/res/xml-xlarge/kbd_phone_symbols.xml +++ b/java/res/xml-xlarge/kbd_phone_symbols.xml @@ -21,7 +21,8 @@ <Keyboard xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" latin:keyboardHeight="@dimen/keyboardHeight" - latin:maxKeyboardHeight="50%p" + latin:maxKeyboardHeight="@fraction/maxKeyboardHeight" + latin:minKeyboardHeight="@fraction/minKeyboardHeight" latin:rowHeight="25%p" latin:keyWidth="11.949%p" latin:horizontalGap="@dimen/key_horizontal_gap" diff --git a/java/res/xml-xlarge/kbd_sr_rows.xml b/java/res/xml-xlarge/kbd_sr_rows.xml index ce9e20817..be0058505 100644 --- a/java/res/xml-xlarge/kbd_sr_rows.xml +++ b/java/res/xml-xlarge/kbd_sr_rows.xml @@ -30,7 +30,7 @@ <Key latin:keyStyle="tabKeyStyle" latin:keyLabelOption="alignLeft" - latin:keyWidth="7.949%p" + latin:keyWidth="8.640%p" latin:keyEdgeFlags="left" /> <Key latin:keyLabel="љ" @@ -66,7 +66,7 @@ latin:keyLabel="ш" /> <Key latin:keyStyle="deleteKeyStyle" - latin:keyWidth="9.331%p" + latin:keyWidth="8.640%p" latin:keyEdgeFlags="right" /> </Row> <Row @@ -75,7 +75,7 @@ <Key latin:keyStyle="toSymbolKeyStyle" latin:keyLabelOption="alignLeft" - latin:keyWidth="7.949%p" + latin:keyWidth="8.640%p" latin:keyEdgeFlags="left" /> <Key latin:keyLabel="а" /> @@ -101,7 +101,7 @@ latin:keyLabel="ћ" /> <Key latin:keyStyle="returnKeyStyle" - latin:keyWidth="9.331%p" + latin:keyWidth="8.640%p" latin:keyEdgeFlags="right" /> </Row> <Row @@ -109,12 +109,10 @@ > <Key latin:keyStyle="shiftKeyStyle" - latin:keyWidth="12.400%p" + latin:keyWidth="8.640%p" latin:keyEdgeFlags="left" /> <Key - latin:keyLabel="ђ" /> - <Key - latin:keyLabel="ж" /> + latin:keyLabel="ѕ" /> <Key latin:keyLabel="џ" /> <Key @@ -128,6 +126,10 @@ <Key latin:keyLabel="м" /> <Key + latin:keyLabel="ђ" /> + <Key + latin:keyLabel="ж" /> + <Key latin:keyLabel="," latin:manualTemporaryUpperCaseCode="33" latin:keyHintIcon="@drawable/key_hint_exclamation_holo" @@ -141,7 +143,7 @@ latin:popupCharacters="\?" /> <Key latin:keyStyle="shiftKeyStyle" - latin:keyWidth="12.400%p" + latin:keyWidth="8.640%p" latin:keyEdgeFlags="right" /> </Row> <include diff --git a/java/res/xml-xlarge/kbd_symbols.xml b/java/res/xml-xlarge/kbd_symbols.xml index f1deae0f9..41e8522dc 100644 --- a/java/res/xml-xlarge/kbd_symbols.xml +++ b/java/res/xml-xlarge/kbd_symbols.xml @@ -21,7 +21,8 @@ <Keyboard xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" latin:keyboardHeight="@dimen/keyboardHeight" - latin:maxKeyboardHeight="50%p" + latin:maxKeyboardHeight="@fraction/maxKeyboardHeight" + latin:minKeyboardHeight="@fraction/minKeyboardHeight" latin:rowHeight="25%p" latin:horizontalGap="@dimen/key_horizontal_gap" latin:verticalGap="@dimen/key_bottom_gap" @@ -137,7 +138,8 @@ latin:mode="url" > <Key - latin:keyLabel="\'" /> + latin:keyLabel="\'" + latin:popupCharacters="‘,’,‚,‛" /> </case> <default> <Key @@ -151,10 +153,13 @@ latin:languageCode="ru" > <Key - latin:keyLabel="\'" /> + latin:keyLabel="\'" + latin:popupCharacters="‘,’,‚,‛" /> + <!-- Note: DroidSans doesn't have double-high-reversed-quotation '\u201f' glyph. --> + <!-- latin:popupCharacters="“,”,„,‟,«,»" --> <Key latin:keyLabel=""" - latin:popupCharacters="“,”,«,»,˝" /> + latin:popupCharacters="“,”,«,»" /> <Key latin:keyLabel="." /> <Key @@ -212,9 +217,10 @@ </case> <default> <!-- Note: DroidSans doesn't have double-high-reversed-quotation '\u201f' glyph. --> + <!-- latin:popupCharacters="“,”,„,‟,«,»,‘,’,‚,‛" --> <Key latin:keyLabel=""" - latin:popupCharacters="“,”,„,‟,«,»,‘,’,‚,‛" /> + latin:popupCharacters="“,”,«,»,‘,’,‚,‛" /> <Key latin:keyLabel="_" /> </default> diff --git a/java/res/xml-xlarge/kbd_symbols_shift.xml b/java/res/xml-xlarge/kbd_symbols_shift.xml index cc23358a5..d7f5958b7 100644 --- a/java/res/xml-xlarge/kbd_symbols_shift.xml +++ b/java/res/xml-xlarge/kbd_symbols_shift.xml @@ -21,7 +21,8 @@ <Keyboard xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" latin:keyboardHeight="@dimen/keyboardHeight" - latin:maxKeyboardHeight="50%p" + latin:maxKeyboardHeight="@fraction/maxKeyboardHeight" + latin:minKeyboardHeight="@fraction/minKeyboardHeight" latin:rowHeight="25%p" latin:horizontalGap="@dimen/key_horizontal_gap" latin:verticalGap="@dimen/key_bottom_gap" diff --git a/java/res/xml/kbd_azerty_rows.xml b/java/res/xml/kbd_azerty_rows.xml index ab3e1a097..e805d5b1b 100644 --- a/java/res/xml/kbd_azerty_rows.xml +++ b/java/res/xml/kbd_azerty_rows.xml @@ -128,7 +128,8 @@ latin:keyLabel="n" latin:popupCharacters="@string/alternates_for_n" /> <Key - latin:keyLabel="\'" /> + latin:keyLabel="\'" + latin:popupCharacters="‘,’,‚,‛" /> <Key latin:keyStyle="deleteKeyStyle" latin:keyWidth="15%p" diff --git a/java/res/xml/kbd_number.xml b/java/res/xml/kbd_number.xml index 7bd679bce..2556f6830 100644 --- a/java/res/xml/kbd_number.xml +++ b/java/res/xml/kbd_number.xml @@ -21,7 +21,8 @@ <Keyboard xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" latin:keyboardHeight="@dimen/keyboardHeight" - latin:maxKeyboardHeight="50%p" + latin:maxKeyboardHeight="@fraction/maxKeyboardHeight" + latin:minKeyboardHeight="@fraction/minKeyboardHeight" latin:rowHeight="25%p" latin:keyWidth="26.67%p" latin:horizontalGap="@dimen/key_horizontal_gap" diff --git a/java/res/xml/kbd_phone.xml b/java/res/xml/kbd_phone.xml index 62fbdeeec..ca591c72d 100644 --- a/java/res/xml/kbd_phone.xml +++ b/java/res/xml/kbd_phone.xml @@ -21,7 +21,8 @@ <Keyboard xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" latin:keyboardHeight="@dimen/keyboardHeight" - latin:maxKeyboardHeight="50%p" + latin:maxKeyboardHeight="@fraction/maxKeyboardHeight" + latin:minKeyboardHeight="@fraction/minKeyboardHeight" latin:rowHeight="25%p" latin:keyWidth="26.67%p" latin:horizontalGap="@dimen/key_horizontal_gap" diff --git a/java/res/xml/kbd_phone_symbols.xml b/java/res/xml/kbd_phone_symbols.xml index 67cd330e7..99db23ef1 100644 --- a/java/res/xml/kbd_phone_symbols.xml +++ b/java/res/xml/kbd_phone_symbols.xml @@ -21,7 +21,8 @@ <Keyboard xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" latin:keyboardHeight="@dimen/keyboardHeight" - latin:maxKeyboardHeight="50%p" + latin:maxKeyboardHeight="@fraction/maxKeyboardHeight" + latin:minKeyboardHeight="@fraction/minKeyboardHeight" latin:rowHeight="25%p" latin:keyWidth="26.67%p" latin:horizontalGap="@dimen/key_horizontal_gap" diff --git a/java/res/xml/kbd_qwerty.xml b/java/res/xml/kbd_qwerty.xml index a4251c0bd..fd43740a7 100644 --- a/java/res/xml/kbd_qwerty.xml +++ b/java/res/xml/kbd_qwerty.xml @@ -21,7 +21,8 @@ <Keyboard xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" latin:keyboardHeight="@dimen/keyboardHeight" - latin:maxKeyboardHeight="50%p" + latin:maxKeyboardHeight="@fraction/maxKeyboardHeight" + latin:minKeyboardHeight="@fraction/minKeyboardHeight" latin:rowHeight="25%p" latin:keyWidth="10%p" latin:horizontalGap="@dimen/key_horizontal_gap" diff --git a/java/res/xml/kbd_sr_rows.xml b/java/res/xml/kbd_sr_rows.xml index 4a5ed1195..8d6b070b2 100644 --- a/java/res/xml/kbd_sr_rows.xml +++ b/java/res/xml/kbd_sr_rows.xml @@ -73,7 +73,7 @@ latin:keyEdgeFlags="right" /> </Row> <Row - latin:keyWidth="8.333%p" + latin:keyWidth="9.09%p" > <Key latin:keyLabel="а" @@ -97,20 +97,17 @@ <Key latin:keyLabel="ч" /> <Key - latin:keyLabel="ћ" /> - <Key - latin:keyLabel="ђ" + latin:keyLabel="ћ" latin:keyEdgeFlags="right" /> </Row> <Row - latin:keyWidth="8.5%p" + latin:keyWidth="8.90%p" > <Key latin:keyStyle="shiftKeyStyle" - latin:keyWidth="11.75%p" latin:keyEdgeFlags="left" /> <Key - latin:keyLabel="ж" /> + latin:keyLabel="ѕ" /> <Key latin:keyLabel="џ" /> <Key @@ -124,8 +121,12 @@ <Key latin:keyLabel="м" /> <Key + latin:keyLabel="ђ" /> + <Key + latin:keyLabel="ж" /> + <Key latin:keyStyle="deleteKeyStyle" - latin:keyWidth="11.75%p" + latin:keyWidth="11.00%p" latin:keyEdgeFlags="right" /> </Row> <include diff --git a/java/res/xml/kbd_symbols.xml b/java/res/xml/kbd_symbols.xml index 9748bce8b..0a8068991 100644 --- a/java/res/xml/kbd_symbols.xml +++ b/java/res/xml/kbd_symbols.xml @@ -21,7 +21,8 @@ <Keyboard xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" latin:keyboardHeight="@dimen/keyboardHeight" - latin:maxKeyboardHeight="50%p" + latin:maxKeyboardHeight="@fraction/maxKeyboardHeight" + latin:minKeyboardHeight="@fraction/minKeyboardHeight" latin:rowHeight="25%p" latin:keyWidth="10%p" latin:horizontalGap="@dimen/key_horizontal_gap" @@ -106,13 +107,14 @@ latin:keyLabel="!" latin:popupCharacters="¡" /> <!-- Note: DroidSans doesn't have double-high-reversed-quotation '\u201f' glyph. --> + <!-- latin:popupCharacters="“,”,„,‟,«,»" --> <Key latin:keyLabel=""" - latin:popupCharacters="“,”,„,‟,«,»" + latin:popupCharacters="“,”,«,»" latin:maxPopupKeyboardColumn="6" /> <Key latin:keyLabel="\'" - latin:popupCharacters="‘,’,‚,‛,´" /> + latin:popupCharacters="‘,’,‚,‛" /> <Key latin:keyLabel=":" /> <Key diff --git a/java/res/xml/kbd_symbols_shift.xml b/java/res/xml/kbd_symbols_shift.xml index 3978f1776..cde07333b 100644 --- a/java/res/xml/kbd_symbols_shift.xml +++ b/java/res/xml/kbd_symbols_shift.xml @@ -21,7 +21,8 @@ <Keyboard xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" latin:keyboardHeight="@dimen/keyboardHeight" - latin:maxKeyboardHeight="50%p" + latin:maxKeyboardHeight="@fraction/maxKeyboardHeight" + latin:minKeyboardHeight="@fraction/minKeyboardHeight" latin:rowHeight="25%p" latin:keyWidth="10%p" latin:horizontalGap="@dimen/key_horizontal_gap" diff --git a/java/res/xml/prefs.xml b/java/res/xml/prefs.xml index 24a1d45a5..b0497a51c 100644 --- a/java/res/xml/prefs.xml +++ b/java/res/xml/prefs.xml @@ -130,6 +130,15 @@ android:entries="@array/keyboard_layout_modes" android:defaultValue="@string/config_default_keyboard_theme_id" /> </PreferenceCategory> + <PreferenceScreen + android:key="pref_advanced_settings" + android:title="@string/advanced_settings" + android:summary="@string/advanced_settings_summary"> + <!-- Values for popup dismiss delay are added programatically --> + <ListPreference + android:key="pref_key_preview_popup_dismiss_delay" + android:title="@string/key_preview_popup_dismiss_delay" /> + </PreferenceScreen> <!-- <Preference android:title="Debug Settings" android:key="debug_settings"> diff --git a/java/src/com/android/inputmethod/deprecated/languageswitcher/InputLanguageSelection.java b/java/src/com/android/inputmethod/deprecated/languageswitcher/InputLanguageSelection.java index a1b49b475..b8655d112 100644 --- a/java/src/com/android/inputmethod/deprecated/languageswitcher/InputLanguageSelection.java +++ b/java/src/com/android/inputmethod/deprecated/languageswitcher/InputLanguageSelection.java @@ -43,6 +43,8 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.Locale; +import java.util.Map.Entry; +import java.util.TreeMap; public class InputLanguageSelection extends PreferenceActivity { @@ -51,21 +53,17 @@ public class InputLanguageSelection extends PreferenceActivity { private HashMap<CheckBoxPreference, Locale> mLocaleMap = new HashMap<CheckBoxPreference, Locale>(); - private static class Loc implements Comparable<Object> { + private static class LocaleEntry implements Comparable<Object> { private static Collator sCollator = Collator.getInstance(); private String mLabel; public final Locale mLocale; - public Loc(String label, Locale locale) { + public LocaleEntry(String label, Locale locale) { this.mLabel = label; this.mLocale = locale; } - public void setLabel(String label) { - this.mLabel = label; - } - @Override public String toString() { return this.mLabel; @@ -73,7 +71,7 @@ public class InputLanguageSelection extends PreferenceActivity { @Override public int compareTo(Object o) { - return sCollator.compare(this.mLabel, ((Loc) o).mLabel); + return sCollator.compare(this.mLabel, ((LocaleEntry) o).mLabel); } } @@ -85,21 +83,58 @@ public class InputLanguageSelection extends PreferenceActivity { mPrefs = PreferenceManager.getDefaultSharedPreferences(this); mSelectedLanguages = mPrefs.getString(Settings.PREF_SELECTED_LANGUAGES, ""); String[] languageList = mSelectedLanguages.split(","); - ArrayList<Loc> availableLanguages = getUniqueLocales(); + ArrayList<LocaleEntry> availableLanguages = getUniqueLocales(); PreferenceGroup parent = getPreferenceScreen(); + final HashMap<Long, LocaleEntry> dictionaryIdLocaleMap = new HashMap<Long, LocaleEntry>(); + final TreeMap<LocaleEntry, Boolean> localeHasDictionaryMap = + new TreeMap<LocaleEntry, Boolean>(); for (int i = 0; i < availableLanguages.size(); i++) { - Locale locale = availableLanguages.get(i).mLocale; - final Pair<Boolean, Boolean> hasDictionaryOrLayout = hasDictionaryOrLayout(locale); - final boolean hasDictionary = hasDictionaryOrLayout.first; + LocaleEntry loc = availableLanguages.get(i); + Locale locale = loc.mLocale; + final Pair<Long, Boolean> hasDictionaryOrLayout = hasDictionaryOrLayout(locale); + final Long dictionaryId = hasDictionaryOrLayout.first; final boolean hasLayout = hasDictionaryOrLayout.second; + final boolean hasDictionary = dictionaryId != null; // Add this locale to the supported list if: - // 1) this locale has a layout/ 2) this locale has a dictionary and the length - // of the locale is equal to or larger than 5. - if (!hasLayout && !(hasDictionary && locale.toString().length() >= 5)) { + // 1) this locale has a layout/ 2) this locale has a dictionary + // If some locales have no layout but have a same dictionary, the shortest locale + // will be added to the supported list. + if (!hasLayout && !hasDictionary) { continue; } + if (hasLayout) { + localeHasDictionaryMap.put(loc, hasDictionary); + } + if (!hasDictionary) { + continue; + } + if (dictionaryIdLocaleMap.containsKey(dictionaryId)) { + final String newLocale = locale.toString(); + final String oldLocale = + dictionaryIdLocaleMap.get(dictionaryId).mLocale.toString(); + // Check if this locale is more appropriate to be the candidate of the input locale. + if (oldLocale.length() <= newLocale.length() && !hasLayout) { + // Don't add this new locale to the map<dictionary id, locale> if: + // 1) the new locale's name is longer than the existing one, and + // 2) the new locale doesn't have its layout + continue; + } + } + dictionaryIdLocaleMap.put(dictionaryId, loc); + } + + for (LocaleEntry localeEntry : dictionaryIdLocaleMap.values()) { + if (!localeHasDictionaryMap.containsKey(localeEntry)) { + localeHasDictionaryMap.put(localeEntry, true); + } + } + + for (Entry<LocaleEntry, Boolean> entry : localeHasDictionaryMap.entrySet()) { + final LocaleEntry localeEntry = entry.getKey(); + final Locale locale = localeEntry.mLocale; + final Boolean hasDictionary = entry.getValue(); CheckBoxPreference pref = new CheckBoxPreference(this); - pref.setTitle(SubtypeSwitcher.getFullDisplayName(locale, true)); + pref.setTitle(localeEntry.mLabel); boolean checked = isLocaleIn(locale, languageList); pref.setChecked(checked); if (hasDictionary) { @@ -118,11 +153,11 @@ public class InputLanguageSelection extends PreferenceActivity { return false; } - private Pair<Boolean, Boolean> hasDictionaryOrLayout(Locale locale) { - if (locale == null) return new Pair<Boolean, Boolean>(false, false); + private Pair<Long, Boolean> hasDictionaryOrLayout(Locale locale) { + if (locale == null) return new Pair<Long, Boolean>(null, false); final Resources res = getResources(); final Locale saveLocale = Utils.setSystemLocale(res, locale); - final boolean hasDictionary = DictionaryFactory.isDictionaryAvailable(this, locale); + final Long dictionaryId = DictionaryFactory.getDictionaryId(this, locale); boolean hasLayout = false; try { @@ -141,7 +176,7 @@ public class InputLanguageSelection extends PreferenceActivity { } catch (IOException e) { } Utils.setSystemLocale(res, saveLocale); - return new Pair<Boolean, Boolean>(hasDictionary, hasLayout); + return new Pair<Long, Boolean>(dictionaryId, hasLayout); } private String get5Code(Locale locale) { @@ -174,13 +209,13 @@ public class InputLanguageSelection extends PreferenceActivity { SharedPreferencesCompat.apply(editor); } - public ArrayList<Loc> getUniqueLocales() { + public ArrayList<LocaleEntry> getUniqueLocales() { String[] locales = getAssets().getLocales(); Arrays.sort(locales); - ArrayList<Loc> uniqueLocales = new ArrayList<Loc>(); + ArrayList<LocaleEntry> uniqueLocales = new ArrayList<LocaleEntry>(); final int origSize = locales.length; - Loc[] preprocess = new Loc[origSize]; + LocaleEntry[] preprocess = new LocaleEntry[origSize]; int finalSize = 0; for (int i = 0 ; i < origSize; i++ ) { String s = locales[i]; @@ -202,26 +237,13 @@ public class InputLanguageSelection extends PreferenceActivity { if (finalSize == 0) { preprocess[finalSize++] = - new Loc(SubtypeSwitcher.getFullDisplayName(l, true), l); + new LocaleEntry(SubtypeSwitcher.getFullDisplayName(l, false), l); } else { - // check previous entry: - // same lang and a country -> upgrade to full name and - // insert ours with full name - // diff lang -> insert ours with lang-only name - if (preprocess[finalSize-1].mLocale.getLanguage().equals( - language)) { - preprocess[finalSize-1].setLabel(SubtypeSwitcher.getFullDisplayName( - preprocess[finalSize-1].mLocale, false)); - preprocess[finalSize++] = - new Loc(SubtypeSwitcher.getFullDisplayName(l, false), l); + if (s.equals("zz_ZZ")) { + // ignore this locale } else { - String displayName; - if (s.equals("zz_ZZ")) { - // ignore this locale - } else { - displayName = SubtypeSwitcher.getFullDisplayName(l, true); - preprocess[finalSize++] = new Loc(displayName, l); - } + final String displayName = SubtypeSwitcher.getFullDisplayName(l, false); + preprocess[finalSize++] = new LocaleEntry(displayName, l); } } } diff --git a/java/src/com/android/inputmethod/latin/Recorrection.java b/java/src/com/android/inputmethod/deprecated/recorrection/Recorrection.java index 3fa6292ba..bf69d5ced 100644 --- a/java/src/com/android/inputmethod/latin/Recorrection.java +++ b/java/src/com/android/inputmethod/deprecated/recorrection/Recorrection.java @@ -14,11 +14,21 @@ * the License. */ -package com.android.inputmethod.latin; +package com.android.inputmethod.deprecated.recorrection; import com.android.inputmethod.compat.InputConnectionCompatUtils; import com.android.inputmethod.deprecated.VoiceProxy; import com.android.inputmethod.keyboard.KeyboardSwitcher; +import com.android.inputmethod.latin.AutoCorrection; +import com.android.inputmethod.latin.CandidateView; +import com.android.inputmethod.latin.EditingUtils; +import com.android.inputmethod.latin.LatinIME; +import com.android.inputmethod.latin.R; +import com.android.inputmethod.latin.Settings; +import com.android.inputmethod.latin.Suggest; +import com.android.inputmethod.latin.SuggestedWords; +import com.android.inputmethod.latin.TextEntryState; +import com.android.inputmethod.latin.WordComposer; import android.content.SharedPreferences; import android.content.res.Resources; @@ -32,12 +42,14 @@ import java.util.ArrayList; /** * Manager of re-correction functionalities */ -public class Recorrection { +public class Recorrection implements SharedPreferences.OnSharedPreferenceChangeListener { + public static final boolean USE_LEGACY_RECORRECTION = true; private static final Recorrection sInstance = new Recorrection(); private LatinIME mService; private boolean mRecorrectionEnabled = false; - private final ArrayList<WordAlternatives> mWordHistory = new ArrayList<WordAlternatives>(); + private final ArrayList<RecorrectionSuggestionEntries> mRecorrectionSuggestionsList = + new ArrayList<RecorrectionSuggestionEntries>(); public static Recorrection getInstance() { return sInstance; @@ -58,20 +70,17 @@ public class Recorrection { } private void initInternal(LatinIME context, SharedPreferences prefs) { - final Resources res = context.getResources(); - // If the option should not be shown, do not read the re-correction preference - // but always use the default setting defined in the resources. - if (res.getBoolean(R.bool.config_enable_show_recorrection_option)) { - mRecorrectionEnabled = prefs.getBoolean(Settings.PREF_RECORRECTION_ENABLED, - res.getBoolean(R.bool.config_default_recorrection_enabled)); - } else { - mRecorrectionEnabled = res.getBoolean(R.bool.config_default_recorrection_enabled); + if (!USE_LEGACY_RECORRECTION) { + mRecorrectionEnabled = false; + return; } + updateRecorrectionEnabled(context.getResources(), prefs); mService = context; + prefs.registerOnSharedPreferenceChangeListener(this); } public void checkRecorrectionOnStart() { - if (!mRecorrectionEnabled) return; + if (!USE_LEGACY_RECORRECTION || !mRecorrectionEnabled) return; final InputConnection ic = mService.getCurrentInputConnection(); if (ic == null) return; @@ -98,42 +107,42 @@ public class Recorrection { } public void updateRecorrectionSelection(KeyboardSwitcher keyboardSwitcher, - CandidateView candidateView, int candidatesStart, int candidatesEnd, int newSelStart, - int newSelEnd, int oldSelStart, int lastSelectionStart, + CandidateView candidateView, int candidatesStart, int candidatesEnd, + int newSelStart, int newSelEnd, int oldSelStart, int lastSelectionStart, int lastSelectionEnd, boolean hasUncommittedTypedChars) { - if (mRecorrectionEnabled && mService.isShowingSuggestionsStrip()) { - // Don't look for corrections if the keyboard is not visible - if (keyboardSwitcher.isInputViewShown()) { - // Check if we should go in or out of correction mode. - if (mService.isSuggestionsRequested() - && (candidatesStart == candidatesEnd || newSelStart != oldSelStart - || TextEntryState.isRecorrecting()) - && (newSelStart < newSelEnd - 1 || !hasUncommittedTypedChars)) { - if (mService.isCursorTouchingWord() || lastSelectionStart < lastSelectionEnd) { - mService.mHandler.cancelUpdateBigramPredictions(); - mService.mHandler.postUpdateOldSuggestions(); - } else { - abortRecorrection(false); - // If showing the "touch again to save" hint, do not replace it. Else, - // show the bigrams if we are at the end of the text, punctuation otherwise. - if (candidateView != null - && !candidateView.isShowingAddToDictionaryHint()) { - InputConnection ic = mService.getCurrentInputConnection(); - if (null == ic || !TextUtils.isEmpty(ic.getTextAfterCursor(1, 0))) { - if (!mService.isShowingPunctuationList()) { - mService.setPunctuationSuggestions(); - } - } else { - mService.mHandler.postUpdateBigramPredictions(); - } + if (!USE_LEGACY_RECORRECTION || !mRecorrectionEnabled) return; + if (!mService.isShowingSuggestionsStrip()) return; + if (!keyboardSwitcher.isInputViewShown()) return; + if (!mService.isSuggestionsRequested()) return; + // Don't look for corrections if the keyboard is not visible + // Check if we should go in or out of correction mode. + if ((candidatesStart == candidatesEnd || newSelStart != oldSelStart || TextEntryState + .isRecorrecting()) + && (newSelStart < newSelEnd - 1 || !hasUncommittedTypedChars)) { + if (mService.isCursorTouchingWord() || lastSelectionStart < lastSelectionEnd) { + mService.mHandler.cancelUpdateBigramPredictions(); + mService.mHandler.postUpdateOldSuggestions(); + } else { + abortRecorrection(false); + // If showing the "touch again to save" hint, do not replace it. Else, + // show the bigrams if we are at the end of the text, punctuation + // otherwise. + if (candidateView != null && !candidateView.isShowingAddToDictionaryHint()) { + InputConnection ic = mService.getCurrentInputConnection(); + if (null == ic || !TextUtils.isEmpty(ic.getTextAfterCursor(1, 0))) { + if (!mService.isShowingPunctuationList()) { + mService.setPunctuationSuggestions(); } + } else { + mService.mHandler.postUpdateBigramPredictions(); } } } } } - public void saveWordInHistory(WordComposer word, CharSequence result) { + public void saveRecorrectionSuggestion(WordComposer word, CharSequence result) { + if (!USE_LEGACY_RECORRECTION || !mRecorrectionEnabled) return; if (word.size() <= 1) { return; } @@ -144,12 +153,13 @@ public class Recorrection { // Make a copy of the CharSequence, since it is/could be a mutable CharSequence final String resultCopy = result.toString(); - WordAlternatives entry = new WordAlternatives(resultCopy, new WordComposer(word)); - mWordHistory.add(entry); + RecorrectionSuggestionEntries entry = new RecorrectionSuggestionEntries( + resultCopy, new WordComposer(word)); + mRecorrectionSuggestionsList.add(entry); } public void clearWordsInHistory() { - mWordHistory.clear(); + mRecorrectionSuggestionsList.clear(); } /** @@ -160,11 +170,12 @@ public class Recorrection { */ public boolean applyTypedAlternatives(WordComposer word, Suggest suggest, KeyboardSwitcher keyboardSwitcher, EditingUtils.SelectedWord touching) { + if (!USE_LEGACY_RECORRECTION || !mRecorrectionEnabled) return false; // If we didn't find a match, search for result in typed word history WordComposer foundWord = null; - WordAlternatives alternatives = null; + RecorrectionSuggestionEntries alternatives = null; // Search old suggestions to suggest re-corrected suggestions. - for (WordAlternatives entry : mWordHistory) { + for (RecorrectionSuggestionEntries entry : mRecorrectionSuggestionsList) { if (TextUtils.equals(entry.getChosenWord(), touching.mWord)) { foundWord = entry.mWordComposer; alternatives = entry; @@ -186,7 +197,7 @@ public class Recorrection { // Found a match, show suggestions if (foundWord != null || alternatives != null) { if (alternatives == null) { - alternatives = new WordAlternatives(touching.mWord, foundWord); + alternatives = new RecorrectionSuggestionEntries(touching.mWord, foundWord); } showRecorrections(suggest, keyboardSwitcher, alternatives); if (foundWord != null) { @@ -201,10 +212,10 @@ public class Recorrection { private void showRecorrections(Suggest suggest, KeyboardSwitcher keyboardSwitcher, - WordAlternatives alternatives) { - SuggestedWords.Builder builder = alternatives.getAlternatives(suggest, keyboardSwitcher); + RecorrectionSuggestionEntries entries) { + SuggestedWords.Builder builder = entries.getAlternatives(suggest, keyboardSwitcher); builder.setTypedWordValid(false).setHasMinimalSuggestion(false); - mService.showSuggestions(builder.build(), alternatives.getOriginalWord()); + mService.showSuggestions(builder.build(), entries.getOriginalWord()); } public void setRecorrectionSuggestions(VoiceProxy voiceProxy, CandidateView candidateView, @@ -212,6 +223,7 @@ public class Recorrection { boolean hasUncommittedTypedChars, int lastSelectionStart, int lastSelectionEnd, String wordSeparators) { if (!InputConnectionCompatUtils.RECORRECTION_SUPPORTED) return; + if (!USE_LEGACY_RECORRECTION || !mRecorrectionEnabled) return; voiceProxy.setShowingVoiceSuggestions(false); if (candidateView != null && candidateView.isShowingAddToDictionaryHint()) { return; @@ -245,6 +257,7 @@ public class Recorrection { } public void abortRecorrection(boolean force) { + if (!USE_LEGACY_RECORRECTION) return; if (force || TextEntryState.isRecorrecting()) { TextEntryState.onAbortRecorrection(); mService.setCandidatesViewShown(mService.isCandidateStripVisible()); @@ -252,4 +265,23 @@ public class Recorrection { mService.clearSuggestions(); } } + + public void updateRecorrectionEnabled(Resources res, SharedPreferences prefs) { + // If the option should not be shown, do not read the re-correction preference + // but always use the default setting defined in the resources. + if (res.getBoolean(R.bool.config_enable_show_recorrection_option)) { + mRecorrectionEnabled = prefs.getBoolean(Settings.PREF_RECORRECTION_ENABLED, + res.getBoolean(R.bool.config_default_recorrection_enabled)); + } else { + mRecorrectionEnabled = res.getBoolean(R.bool.config_default_recorrection_enabled); + } + } + + @Override + public void onSharedPreferenceChanged(SharedPreferences prefs, String key) { + if (!USE_LEGACY_RECORRECTION) return; + if (key.equals(Settings.PREF_RECORRECTION_ENABLED)) { + updateRecorrectionEnabled(mService.getResources(), prefs); + } + } } diff --git a/java/src/com/android/inputmethod/latin/WordAlternatives.java b/java/src/com/android/inputmethod/deprecated/recorrection/RecorrectionSuggestionEntries.java index 0e9914400..914e2cbc1 100644 --- a/java/src/com/android/inputmethod/latin/WordAlternatives.java +++ b/java/src/com/android/inputmethod/deprecated/recorrection/RecorrectionSuggestionEntries.java @@ -14,17 +14,20 @@ * the License. */ -package com.android.inputmethod.latin; +package com.android.inputmethod.deprecated.recorrection; import com.android.inputmethod.keyboard.KeyboardSwitcher; +import com.android.inputmethod.latin.Suggest; +import com.android.inputmethod.latin.SuggestedWords; +import com.android.inputmethod.latin.WordComposer; import android.text.TextUtils; -public class WordAlternatives { +public class RecorrectionSuggestionEntries { public final CharSequence mChosenWord; public final WordComposer mWordComposer; - public WordAlternatives(CharSequence chosenWord, WordComposer wordComposer) { + public RecorrectionSuggestionEntries(CharSequence chosenWord, WordComposer wordComposer) { mChosenWord = chosenWord; mWordComposer = wordComposer; } @@ -56,4 +59,4 @@ public class WordAlternatives { Suggest suggest, KeyboardSwitcher keyboardSwitcher, WordComposer word) { return suggest.getSuggestedWordBuilder(keyboardSwitcher.getInputView(), word, null); } -}
\ No newline at end of file +} diff --git a/java/src/com/android/inputmethod/keyboard/Key.java b/java/src/com/android/inputmethod/keyboard/Key.java index 5c59d4441..33b55b5d3 100644 --- a/java/src/com/android/inputmethod/keyboard/Key.java +++ b/java/src/com/android/inputmethod/keyboard/Key.java @@ -143,9 +143,9 @@ public class Key { * This constructor is being used only for key in mini popup keyboard. */ public Key(Resources res, Keyboard keyboard, CharSequence popupCharacter, int x, int y, - int width, int edgeFlags) { + int width, int height, int edgeFlags) { mKeyboard = keyboard; - mHeight = keyboard.getRowHeight() - keyboard.getVerticalGap(); + mHeight = height - keyboard.getVerticalGap(); mGap = keyboard.getHorizontalGap(); mVisualInsetsLeft = mVisualInsetsRight = 0; mWidth = width - mGap; diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardParser.java b/java/src/com/android/inputmethod/keyboard/KeyboardParser.java index 69ae7886a..31fd0bfa3 100644 --- a/java/src/com/android/inputmethod/keyboard/KeyboardParser.java +++ b/java/src/com/android/inputmethod/keyboard/KeyboardParser.java @@ -196,9 +196,20 @@ public class KeyboardParser { final int keyboardHeight = (int)keyboardAttr.getDimension( R.styleable.Keyboard_keyboardHeight, displayHeight / 2); final int maxKeyboardHeight = getDimensionOrFraction(keyboardAttr, - R.styleable.Keyboard_maxKeyboardHeight, displayHeight, displayHeight / 2); - // Keyboard height will not exceed maxKeyboardHeight. - final int height = Math.min(keyboardHeight, maxKeyboardHeight); + R.styleable.Keyboard_maxKeyboardHeight, displayHeight, displayHeight / 2); + int minKeyboardHeight = getDimensionOrFraction(keyboardAttr, + R.styleable.Keyboard_minKeyboardHeight, displayHeight, displayHeight / 2); + if (minKeyboardHeight < 0) { + // Specified fraction was negative, so it should be calculated against display + // width. + final int displayWidth = keyboard.getDisplayWidth(); + minKeyboardHeight = -getDimensionOrFraction(keyboardAttr, + R.styleable.Keyboard_minKeyboardHeight, displayWidth, displayWidth / 2); + } + // Keyboard height will not exceed maxKeyboardHeight and will not be less than + // minKeyboardHeight. + final int height = Math.max( + Math.min(keyboardHeight, maxKeyboardHeight), minKeyboardHeight); final int width = keyboard.getDisplayWidth(); keyboard.setKeyboardHeight(height); diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java index 4f1ad576d..384139112 100644 --- a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java +++ b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java @@ -153,7 +153,9 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha final KeyboardId id = getKeyboardId(attribute, isSymbols); makeSymbolsKeyboardIds(id.mMode, attribute); mCurrentId = id; - mInputView.setKeyPreviewEnabled(mInputMethodService.getPopupOn()); + final Resources res = mInputMethodService.getResources(); + mInputView.setKeyPreviewPopupEnabled(Settings.Values.isKeyPreviewPopupEnabled(mPrefs, res), + Settings.Values.getKeyPreviewPopupDismissDelay(mPrefs, res)); setKeyboard(getKeyboard(id)); } @@ -340,8 +342,7 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha // state when shift key is pressed to go to normal mode. // On the other hand, on distinct multi touch panel device, turning off the shift locked // state with shift key pressing is handled by onReleaseShift(). - if ((!hasDistinctMultitouch() || isAccessibilityEnabled()) - && !shifted && latinKeyboard.isShiftLocked()) { + if (!hasDistinctMultitouch() && !shifted && latinKeyboard.isShiftLocked()) { latinKeyboard.setShiftLocked(false); } if (latinKeyboard.setShifted(shifted)) { @@ -439,9 +440,6 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha public void onPressShift(boolean withSliding) { if (!isKeyboardAvailable()) return; - // If accessibility is enabled, disable momentary shift lock. - if (isAccessibilityEnabled()) - return; ShiftKeyState shiftKeyState = mShiftKeyState; if (DEBUG_STATE) Log.d(TAG, "onPressShift:" @@ -478,9 +476,6 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha public void onReleaseShift(boolean withSliding) { if (!isKeyboardAvailable()) return; - // If accessibility is enabled, disable momentary shift lock. - if (isAccessibilityEnabled()) - return; ShiftKeyState shiftKeyState = mShiftKeyState; if (DEBUG_STATE) Log.d(TAG, "onReleaseShift:" @@ -518,9 +513,6 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha } public void onPressSymbol() { - // If accessibility is enabled, disable momentary symbol lock. - if (isAccessibilityEnabled()) - return; if (DEBUG_STATE) Log.d(TAG, "onPressSymbol:" + " keyboard=" + getLatinKeyboard().getKeyboardShiftState() @@ -531,9 +523,6 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha } public void onReleaseSymbol() { - // If accessibility is enabled, disable momentary symbol lock. - if (isAccessibilityEnabled()) - return; if (DEBUG_STATE) Log.d(TAG, "onReleaseSymbol:" + " keyboard=" + getLatinKeyboard().getKeyboardShiftState() @@ -547,9 +536,6 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha } public void onOtherKeyPressed() { - // If accessibility is enabled, disable momentary mode locking. - if (isAccessibilityEnabled()) - return; if (DEBUG_STATE) Log.d(TAG, "onOtherKeyPressed:" + " keyboard=" + getLatinKeyboard().getKeyboardShiftState() @@ -612,10 +598,6 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha } } - public boolean isAccessibilityEnabled() { - return mInputView != null && mInputView.isAccessibilityEnabled(); - } - public boolean hasDistinctMultitouch() { return mInputView != null && mInputView.hasDistinctMultitouch(); } diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardView.java b/java/src/com/android/inputmethod/keyboard/KeyboardView.java index 08e739d5a..4f85c0348 100644 --- a/java/src/com/android/inputmethod/keyboard/KeyboardView.java +++ b/java/src/com/android/inputmethod/keyboard/KeyboardView.java @@ -58,14 +58,22 @@ import java.util.WeakHashMap; * A view that renders a virtual {@link Keyboard}. It handles rendering of keys and detecting key * presses and touch movements. * + * @attr ref R.styleable#KeyboardView_backgroundDimAmount + * @attr ref R.styleable#KeyboardView_colorScheme * @attr ref R.styleable#KeyboardView_keyBackground + * @attr ref R.styleable#KeyboardView_keyHysteresisDistance + * @attr ref R.styleable#KeyboardView_keyLetterRatio + * @attr ref R.styleable#KeyboardView_keyLetterStyle * @attr ref R.styleable#KeyboardView_keyPreviewLayout * @attr ref R.styleable#KeyboardView_keyPreviewOffset - * @attr ref R.styleable#KeyboardView_labelTextSize - * @attr ref R.styleable#KeyboardView_keyTextSize + * @attr ref R.styleable#KeyboardView_keyPreviewHeight * @attr ref R.styleable#KeyboardView_keyTextColor + * @attr ref R.styleable#KeyboardView_keyTextColorDisabled + * @attr ref R.styleable#KeyboardView_labelTextRatio * @attr ref R.styleable#KeyboardView_verticalCorrection * @attr ref R.styleable#KeyboardView_popupLayout + * @attr ref R.styleable#KeyboardView_shadowColor + * @attr ref R.styleable#KeyboardView_shadowRadius */ public class KeyboardView extends View implements PointerTracker.UIProxy { private static final String TAG = KeyboardView.class.getSimpleName(); @@ -86,33 +94,36 @@ public class KeyboardView extends View implements PointerTracker.UIProxy { private static final int HINT_ICON_VERTICAL_ADJUSTMENT_PIXEL = -1; // XML attribute - private int mKeyLetterSize; - private int mKeyTextColor; - private int mKeyTextColorDisabled; - private Typeface mKeyLetterStyle = Typeface.DEFAULT; - private int mLabelTextSize; - private int mColorScheme = COLOR_SCHEME_WHITE; - private int mShadowColor; - private float mShadowRadius; - private Drawable mKeyBackground; - private float mBackgroundDimAmount; - private float mKeyHysteresisDistance; - private float mVerticalCorrection; - private int mPreviewOffset; - private int mPreviewHeight; - private int mPopupLayout; + private final float mKeyLetterRatio; + private final int mKeyTextColor; + private final int mKeyTextColorDisabled; + private final Typeface mKeyLetterStyle; + private final float mLabelTextRatio; + private final int mColorScheme; + private final int mShadowColor; + private final float mShadowRadius; + private final Drawable mKeyBackground; + private final float mBackgroundDimAmount; + private final float mKeyHysteresisDistance; + private final float mVerticalCorrection; + private final int mPreviewOffset; + private final int mPreviewHeight; + private final int mPopupLayout; // Main keyboard private Keyboard mKeyboard; + private int mKeyLetterSize; + private int mLabelTextSize; // Key preview private boolean mInForeground; private TextView mPreviewText; - private int mPreviewTextSizeLarge; - private boolean mShowKeyPreview = true; - private int mKeyPreviewDisplayedY; + private float mPreviewTextRatio; + private int mPreviewTextSize; + private boolean mShowKeyPreviewPopup = true; + private int mKeyPreviewPopupDisplayedY; private final int mDelayBeforePreview; - private final int mDelayAfterPreview; + private int mDelayAfterPreview; private ViewGroup mPreviewPlacer; private final int[] mCoordinates = new int[2]; @@ -134,9 +145,6 @@ public class KeyboardView extends View implements PointerTracker.UIProxy { private int mOldPointerCount = 1; private int mOldKeyIndex; - // Accessibility - private boolean mIsAccessibilityEnabled; - protected KeyDetector mKeyDetector = new KeyDetector(); // Swipe gesture detector @@ -303,74 +311,36 @@ public class KeyboardView extends View implements PointerTracker.UIProxy { final TypedArray a = context.obtainStyledAttributes( attrs, R.styleable.KeyboardView, defStyle, R.style.KeyboardView); - int previewLayout = 0; - int keyTextSize = 0; - - int n = a.getIndexCount(); - for (int i = 0; i < n; i++) { - int attr = a.getIndex(i); - - switch (attr) { - case R.styleable.KeyboardView_keyBackground: - mKeyBackground = a.getDrawable(attr); - break; - case R.styleable.KeyboardView_keyHysteresisDistance: - mKeyHysteresisDistance = a.getDimensionPixelOffset(attr, 0); - break; - case R.styleable.KeyboardView_verticalCorrection: - mVerticalCorrection = a.getDimensionPixelOffset(attr, 0); - break; - case R.styleable.KeyboardView_keyPreviewLayout: - previewLayout = a.getResourceId(attr, 0); - break; - case R.styleable.KeyboardView_keyPreviewOffset: - mPreviewOffset = a.getDimensionPixelOffset(attr, 0); - break; - case R.styleable.KeyboardView_keyPreviewHeight: - mPreviewHeight = a.getDimensionPixelSize(attr, 80); - break; - case R.styleable.KeyboardView_keyLetterSize: - mKeyLetterSize = a.getDimensionPixelSize(attr, 18); - break; - case R.styleable.KeyboardView_keyTextColor: - mKeyTextColor = a.getColor(attr, 0xFF000000); - break; - case R.styleable.KeyboardView_keyTextColorDisabled: - mKeyTextColorDisabled = a.getColor(attr, 0xFF000000); - break; - case R.styleable.KeyboardView_labelTextSize: - mLabelTextSize = a.getDimensionPixelSize(attr, 14); - break; - case R.styleable.KeyboardView_popupLayout: - mPopupLayout = a.getResourceId(attr, 0); - break; - case R.styleable.KeyboardView_shadowColor: - mShadowColor = a.getColor(attr, 0); - break; - case R.styleable.KeyboardView_shadowRadius: - mShadowRadius = a.getFloat(attr, 0f); - break; - // TODO: Use Theme (android.R.styleable.Theme_backgroundDimAmount) - case R.styleable.KeyboardView_backgroundDimAmount: - mBackgroundDimAmount = a.getFloat(attr, 0.5f); - break; - case R.styleable.KeyboardView_keyLetterStyle: - mKeyLetterStyle = Typeface.defaultFromStyle(a.getInt(attr, Typeface.NORMAL)); - break; - case R.styleable.KeyboardView_colorScheme: - mColorScheme = a.getInt(attr, COLOR_SCHEME_WHITE); - break; - } - } + mKeyBackground = a.getDrawable(R.styleable.KeyboardView_keyBackground); + mKeyHysteresisDistance = a.getDimensionPixelOffset( + R.styleable.KeyboardView_keyHysteresisDistance, 0); + mVerticalCorrection = a.getDimensionPixelOffset( + R.styleable.KeyboardView_verticalCorrection, 0); + final int previewLayout = a.getResourceId(R.styleable.KeyboardView_keyPreviewLayout, 0); + mPreviewOffset = a.getDimensionPixelOffset(R.styleable.KeyboardView_keyPreviewOffset, 0); + mPreviewHeight = a.getDimensionPixelSize(R.styleable.KeyboardView_keyPreviewHeight, 80); + mKeyLetterRatio = getRatio(a, R.styleable.KeyboardView_keyLetterRatio); + mKeyTextColor = a.getColor(R.styleable.KeyboardView_keyTextColor, 0xFF000000); + mKeyTextColorDisabled = a.getColor( + R.styleable.KeyboardView_keyTextColorDisabled, 0xFF000000); + mLabelTextRatio = getRatio(a, R.styleable.KeyboardView_labelTextRatio); + mPopupLayout = a.getResourceId(R.styleable.KeyboardView_popupLayout, 0); + mShadowColor = a.getColor(R.styleable.KeyboardView_shadowColor, 0); + mShadowRadius = a.getFloat(R.styleable.KeyboardView_shadowRadius, 0f); + // TODO: Use Theme (android.R.styleable.Theme_backgroundDimAmount) + mBackgroundDimAmount = a.getFloat(R.styleable.KeyboardView_backgroundDimAmount, 0.5f); + mKeyLetterStyle = Typeface.defaultFromStyle( + a.getInt(R.styleable.KeyboardView_keyLetterStyle, Typeface.NORMAL)); + mColorScheme = a.getInt(R.styleable.KeyboardView_colorScheme, COLOR_SCHEME_WHITE); final Resources res = getResources(); if (previewLayout != 0) { mPreviewText = (TextView) LayoutInflater.from(context).inflate(previewLayout, null); - mPreviewTextSizeLarge = (int) res.getDimension(R.dimen.key_preview_text_size_large); + mPreviewTextRatio = getRatio(res, R.fraction.key_preview_text_ratio); } else { - mShowKeyPreview = false; + mShowKeyPreviewPopup = false; } mDelayBeforePreview = res.getInteger(R.integer.config_delay_before_preview); mDelayAfterPreview = res.getInteger(R.integer.config_delay_after_preview); @@ -379,7 +349,6 @@ public class KeyboardView extends View implements PointerTracker.UIProxy { mPaint = new Paint(); mPaint.setAntiAlias(true); - mPaint.setTextSize(keyTextSize); mPaint.setTextAlign(Align.CENTER); mPaint.setAlpha(255); @@ -463,6 +432,16 @@ public class KeyboardView extends View implements PointerTracker.UIProxy { mKeyRepeatInterval = res.getInteger(R.integer.config_key_repeat_interval); } + // Read fraction value in TypedArray as float. + private static float getRatio(TypedArray a, int index) { + return a.getFraction(index, 1000, 1000, 1) / 1000.0f; + } + + // Read fraction value in resource as float. + private static float getRatio(Resources res, int id) { + return res.getFraction(id, 1000, 1000) / 1000.0f; + } + public void startIgnoringDoubleTap() { if (ENABLE_CAPSLOCK_BY_DOUBLETAP) mHandler.startIgnoringDoubleTap(); @@ -509,6 +488,10 @@ public class KeyboardView extends View implements PointerTracker.UIProxy { invalidateAllKeys(); mKeyDetector.setProximityThreshold(keyboard.getMostCommonKeyWidth()); mPopupPanelCache.clear(); + final int keyHeight = keyboard.getRowHeight() - keyboard.getVerticalGap(); + mKeyLetterSize = (int)(keyHeight * mKeyLetterRatio); + mLabelTextSize = (int)(keyHeight * mLabelTextRatio); + mPreviewTextSize = (int)(keyHeight * mPreviewTextRatio); } /** @@ -530,44 +513,24 @@ public class KeyboardView extends View implements PointerTracker.UIProxy { } /** - * Enables or disables accessibility. - * @param accessibilityEnabled whether or not to enable accessibility - */ - public void setAccessibilityEnabled(boolean accessibilityEnabled) { - mIsAccessibilityEnabled = accessibilityEnabled; - - // Propagate this change to all existing pointer trackers. - for (PointerTracker tracker : mPointerTrackers) { - tracker.setAccessibilityEnabled(accessibilityEnabled); - } - } - - /** - * Returns whether the device has accessibility enabled. - * @return true if the device has accessibility enabled. - */ - @Override - public boolean isAccessibilityEnabled() { - return mIsAccessibilityEnabled; - } - - /** - * Enables or disables the key feedback preview. This is a preview that shows a magnified + * Enables or disables the key feedback popup. This is a popup that shows a magnified * version of the depressed key. By default the preview is enabled. * @param previewEnabled whether or not to enable the key feedback preview - * @see #isKeyPreviewEnabled() + * @param delay the delay after which the preview is dismissed + * @see #isKeyPreviewPopupEnabled() */ - public void setKeyPreviewEnabled(boolean previewEnabled) { - mShowKeyPreview = previewEnabled; + public void setKeyPreviewPopupEnabled(boolean previewEnabled, int delay) { + mShowKeyPreviewPopup = previewEnabled; + mDelayAfterPreview = delay; } /** * Returns the enabled state of the key feedback preview * @return whether or not the key feedback preview is enabled - * @see #setKeyPreviewEnabled(boolean) + * @see #setKeyPreviewPopupEnabled(boolean, int) */ - public boolean isKeyPreviewEnabled() { - return mShowKeyPreview; + public boolean isKeyPreviewPopupEnabled() { + return mShowKeyPreviewPopup; } public int getColorScheme() { @@ -890,7 +853,7 @@ public class KeyboardView extends View implements PointerTracker.UIProxy { @Override public void showKeyPreview(int keyIndex, PointerTracker tracker) { - if (mShowKeyPreview) { + if (mShowKeyPreviewPopup) { mHandler.showKeyPreview(mDelayBeforePreview, keyIndex, tracker); } else if (mKeyboard.needSpacebarPreview(keyIndex)) { // Show key preview (in this case, slide language switcher) without any delay. @@ -900,7 +863,7 @@ public class KeyboardView extends View implements PointerTracker.UIProxy { @Override public void dismissKeyPreview(PointerTracker tracker) { - if (mShowKeyPreview) { + if (mShowKeyPreviewPopup) { mHandler.cancelShowKeyPreview(tracker); mHandler.dismissKeyPreview(mDelayAfterPreview, tracker); } else if (mKeyboard.needSpacebarPreview(KeyDetector.NOT_A_KEY)) { @@ -963,7 +926,7 @@ public class KeyboardView extends View implements PointerTracker.UIProxy { previewText.setTextSize(TypedValue.COMPLEX_UNIT_PX, mKeyLetterSize); previewText.setTypeface(Typeface.DEFAULT_BOLD); } else { - previewText.setTextSize(TypedValue.COMPLEX_UNIT_PX, mPreviewTextSizeLarge); + previewText.setTextSize(TypedValue.COMPLEX_UNIT_PX, mPreviewTextSize); previewText.setTypeface(mKeyLetterStyle); } } else { @@ -985,7 +948,7 @@ public class KeyboardView extends View implements PointerTracker.UIProxy { final int previewX = keyDrawX - (previewWidth - keyDrawWidth) / 2 + mCoordinates[0]; final int previewY = key.mY - previewHeight + mCoordinates[1] + mPreviewOffset; // Record key preview position to display mini-keyboard later at the same position - mKeyPreviewDisplayedY = previewY; + mKeyPreviewPopupDisplayedY = previewY; // Place the key preview. // TODO: Adjust position of key previews which touch screen edges @@ -1103,7 +1066,7 @@ public class KeyboardView extends View implements PointerTracker.UIProxy { }); final Keyboard keyboard = new MiniKeyboardBuilder(this, mKeyboard.getPopupKeyboardResId(), - parentKey).build(); + parentKey, mKeyboard).build(); miniKeyboardView.setKeyboard(keyboard); container.measure(MeasureSpec.makeMeasureSpec(getWidth(), MeasureSpec.AT_MOST), @@ -1136,7 +1099,7 @@ public class KeyboardView extends View implements PointerTracker.UIProxy { mPopupWindow.setClippingEnabled(false); } mPopupMiniKeyboardPanel = popupPanel; - popupPanel.showPanel(this, parentKey, tracker, mKeyPreviewDisplayedY, mPopupWindow); + popupPanel.showPanel(this, parentKey, tracker, mKeyPreviewPopupDisplayedY, mPopupWindow); invalidateAllKeys(); return true; @@ -1182,19 +1145,16 @@ public class KeyboardView extends View implements PointerTracker.UIProxy { // TODO: cleanup this code into a multi-touch to single-touch event converter class? // If the device does not have distinct multi-touch support panel, ignore all multi-touch // events except a transition from/to single-touch. - if ((!mHasDistinctMultitouch || mIsAccessibilityEnabled) - && pointerCount > 1 && oldPointerCount > 1) { + if (!mHasDistinctMultitouch && pointerCount > 1 && oldPointerCount > 1) { return true; } // Track the last few movements to look for spurious swipes. mSwipeTracker.addMovement(me); - // Gesture detector must be enabled only when mini-keyboard is not on the screen and - // accessibility is not enabled. - // TODO: Reconcile gesture detection and accessibility features. - if (mPopupMiniKeyboardPanel == null && !mIsAccessibilityEnabled - && mGestureDetector != null && mGestureDetector.onTouchEvent(me)) { + // Gesture detector must be enabled only when mini-keyboard is not on the screen. + if (mPopupMiniKeyboardPanel == null && mGestureDetector != null + && mGestureDetector.onTouchEvent(me)) { dismissAllKeyPreviews(); mHandler.cancelKeyTimers(); return true; @@ -1225,7 +1185,7 @@ public class KeyboardView extends View implements PointerTracker.UIProxy { // TODO: cleanup this code into a multi-touch to single-touch event converter class? // Translate mutli-touch event to single-touch events on the device that has no distinct // multi-touch panel. - if (!mHasDistinctMultitouch || mIsAccessibilityEnabled) { + if (!mHasDistinctMultitouch) { // Use only main (id=0) pointer tracker. PointerTracker tracker = getPointerTracker(0); if (pointerCount == 1 && oldPointerCount == 2) { diff --git a/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java b/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java index efc446a0d..583b997ee 100644 --- a/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java +++ b/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java @@ -55,14 +55,14 @@ public class LatinKeyboardView extends KeyboardView { } @Override - public void setKeyPreviewEnabled(boolean previewEnabled) { + public void setKeyPreviewPopupEnabled(boolean previewEnabled, int delay) { LatinKeyboard latinKeyboard = getLatinKeyboard(); if (latinKeyboard != null && (latinKeyboard.isPhoneKeyboard() || latinKeyboard.isNumberKeyboard())) { // Phone and number keyboard never shows popup preview (except language switch). - super.setKeyPreviewEnabled(false); + super.setKeyPreviewPopupEnabled(false, delay); } else { - super.setKeyPreviewEnabled(previewEnabled); + super.setKeyPreviewPopupEnabled(previewEnabled, delay); } } @@ -140,10 +140,6 @@ public class LatinKeyboardView extends KeyboardView { // If device has distinct multi touch panel, there is no need to check sudden jump. if (hasDistinctMultitouch()) return false; - // If accessibiliy is enabled, stop looking for sudden jumps because it interferes - // with touch exploration of the keyboard. - if (isAccessibilityEnabled()) - return false; final int action = me.getAction(); final int x = (int) me.getX(); final int y = (int) me.getY(); @@ -177,7 +173,8 @@ public class LatinKeyboardView extends KeyboardView { if (!mDroppingEvents) { mDroppingEvents = true; // Send an up event - MotionEvent translated = MotionEvent.obtain(me.getEventTime(), me.getEventTime(), + MotionEvent translated = MotionEvent.obtain( + me.getEventTime(), me.getEventTime(), MotionEvent.ACTION_UP, mLastX, mLastY, me.getMetaState()); super.onTouchEvent(translated); diff --git a/java/src/com/android/inputmethod/keyboard/MiniKeyboardBuilder.java b/java/src/com/android/inputmethod/keyboard/MiniKeyboardBuilder.java index e540fa106..2b83c3ff5 100644 --- a/java/src/com/android/inputmethod/keyboard/MiniKeyboardBuilder.java +++ b/java/src/com/android/inputmethod/keyboard/MiniKeyboardBuilder.java @@ -181,7 +181,8 @@ public class MiniKeyboardBuilder { } } - public MiniKeyboardBuilder(KeyboardView view, int layoutTemplateResId, Key parentKey) { + public MiniKeyboardBuilder(KeyboardView view, int layoutTemplateResId, Key parentKey, + Keyboard parentKeyboard) { final Context context = view.getContext(); mRes = context.getResources(); final MiniKeyboard keyboard = new MiniKeyboard(context, layoutTemplateResId, null); @@ -191,12 +192,13 @@ public class MiniKeyboardBuilder { final int keyWidth = getMaxKeyWidth(view, mPopupCharacters, keyboard.getKeyWidth()); final MiniKeyboardLayoutParams params = new MiniKeyboardLayoutParams( mPopupCharacters.length, parentKey.mMaxPopupColumn, - keyWidth, keyboard.getRowHeight(), + keyWidth, parentKeyboard.getRowHeight(), parentKey.mX + (parentKey.mWidth + parentKey.mGap) / 2 - keyWidth / 2, view.getMeasuredWidth()); mParams = params; - keyboard.setHeight(params.mNumRows * params.mRowHeight - keyboard.getVerticalGap()); + keyboard.setRowHeight(params.mRowHeight); + keyboard.setHeight(params.mNumRows * params.mRowHeight); keyboard.setMinWidth(params.mNumColumns * params.mKeyWidth); keyboard.setDefaultCoordX(params.getDefaultKeyCoordX() + params.mKeyWidth / 2); } @@ -235,7 +237,7 @@ public class MiniKeyboardBuilder { final CharSequence label = mPopupCharacters[n]; final int row = n / params.mNumColumns; final Key key = new Key(mRes, keyboard, label, params.getX(n, row), params.getY(row), - params.mKeyWidth, params.getRowFlags(row)); + params.mKeyWidth, params.mRowHeight, params.getRowFlags(row)); keys.add(key); } return keyboard; diff --git a/java/src/com/android/inputmethod/keyboard/PointerTracker.java b/java/src/com/android/inputmethod/keyboard/PointerTracker.java index abd1ef286..953d487dc 100644 --- a/java/src/com/android/inputmethod/keyboard/PointerTracker.java +++ b/java/src/com/android/inputmethod/keyboard/PointerTracker.java @@ -41,7 +41,6 @@ public class PointerTracker { public void showKeyPreview(int keyIndex, PointerTracker tracker); public void dismissKeyPreview(PointerTracker tracker); public boolean hasDistinctMultitouch(); - public boolean isAccessibilityEnabled(); } public final int mPointerId; @@ -70,9 +69,6 @@ public class PointerTracker { private final PointerTrackerKeyState mKeyState; - // true if accessibility is enabled in the parent keyboard - private boolean mIsAccessibilityEnabled; - // true if keyboard layout has been changed. private boolean mKeyboardLayoutHasBeenChanged; @@ -124,7 +120,6 @@ public class PointerTracker { mKeyDetector = keyDetector; mKeyboardSwitcher = KeyboardSwitcher.getInstance(); mKeyState = new PointerTrackerKeyState(keyDetector); - mIsAccessibilityEnabled = proxy.isAccessibilityEnabled(); mHasDistinctMultitouch = proxy.hasDistinctMultitouch(); final Resources res = mKeyboardView.getResources(); mConfigSlidingKeyInputEnabled = res.getBoolean(R.bool.config_sliding_key_input_enabled); @@ -143,10 +138,6 @@ public class PointerTracker { mListener = listener; } - public void setAccessibilityEnabled(boolean accessibilityEnabled) { - mIsAccessibilityEnabled = accessibilityEnabled; - } - // Returns true if keyboard has been changed by this callback. private boolean callListenerOnPressAndCheckKeyboardLayoutChange(Key key, boolean withSliding) { final boolean ignoreModifierKey = mIgnoreModifierKey && isModifierCode(key.mCode); @@ -342,10 +333,9 @@ public class PointerTracker { private void onDownEventInternal(int x, int y, long eventTime) { int keyIndex = mKeyState.onDownKey(x, y, eventTime); // Sliding key is allowed when 1) enabled by configuration, 2) this pointer starts sliding - // from modifier key, 3) this pointer is on mini-keyboard, or 4) accessibility is enabled. + // from modifier key, or 3) this pointer is on mini-keyboard. mIsAllowedSlidingKeyInput = mConfigSlidingKeyInputEnabled || isModifierInternal(keyIndex) - || mKeyDetector instanceof MiniKeyboardKeyDetector - || mIsAccessibilityEnabled; + || mKeyDetector instanceof MiniKeyboardKeyDetector; mKeyboardLayoutHasBeenChanged = false; mKeyAlreadyProcessed = false; mIsRepeatableKey = false; @@ -575,10 +565,8 @@ public class PointerTracker { } private void startRepeatKey(int keyIndex) { - // Accessibility disables key repeat because users may need to pause on a key to hear - // its spoken description. final Key key = getKey(keyIndex); - if (key != null && key.mRepeatable && !mIsAccessibilityEnabled) { + if (key != null && key.mRepeatable) { dismissKeyPreview(); onRepeatKey(keyIndex); mHandler.startKeyRepeatTimer(mDelayBeforeKeyRepeatStart, keyIndex, this); @@ -620,14 +608,11 @@ public class PointerTracker { } } - // The modifier key, such as shift key, should not show its key preview. If accessibility is - // turned on, the modifier key should show its key preview. + // The modifier key, such as shift key, should not show its key preview. private boolean isKeyPreviewNotRequired(int keyIndex) { final Key key = getKey(keyIndex); if (!key.mEnabled) return true; - if (mIsAccessibilityEnabled) - return false; // Such as spacebar sliding language switch. if (mKeyboard.needSpacebarPreview(keyIndex)) return false; @@ -647,11 +632,6 @@ public class PointerTracker { } private void startLongPressTimer(int keyIndex) { - // Accessibility disables long press because users are likely to need to pause on a key - // for an unspecified duration in order to hear the key's spoken description. - if (mIsAccessibilityEnabled) { - return; - } Key key = getKey(keyIndex); if (!key.mEnabled) return; diff --git a/java/src/com/android/inputmethod/keyboard/PopupMiniKeyboardView.java b/java/src/com/android/inputmethod/keyboard/PopupMiniKeyboardView.java index 12031f1ea..561dcbcef 100644 --- a/java/src/com/android/inputmethod/keyboard/PopupMiniKeyboardView.java +++ b/java/src/com/android/inputmethod/keyboard/PopupMiniKeyboardView.java @@ -55,13 +55,14 @@ public class PopupMiniKeyboardView extends KeyboardView implements PopupPanel { R.dimen.mini_keyboard_slide_allowance)); // Remove gesture detector on mini-keyboard mGestureDetector = null; - setKeyPreviewEnabled(false); + setKeyPreviewPopupEnabled(false, 0); } @Override - public void setKeyPreviewEnabled(boolean previewEnabled) { - // Mini keyboard needs no pop-up key preview displayed. - super.setKeyPreviewEnabled(false); + public void setKeyPreviewPopupEnabled(boolean previewEnabled, int delay) { + // Mini keyboard needs no pop-up key preview displayed, so we pass always false with a + // delay of 0. The delay does not matter actually since the popup is not shown anyway. + super.setKeyPreviewPopupEnabled(false, 0); } @Override @@ -82,8 +83,8 @@ public class PopupMiniKeyboardView extends KeyboardView implements PopupPanel { - (container.getMeasuredHeight() - container.getPaddingBottom()) + parentKeyboardView.getPaddingTop() + mCoordinates[1]; final int x = miniKeyboardX; - final int y = parentKeyboardView.isKeyPreviewEnabled() && miniKeyboard.isOneRowKeyboard() - ? keyPreviewY : miniKeyboardY; + final int y = parentKeyboardView.isKeyPreviewPopupEnabled() && + miniKeyboard.isOneRowKeyboard() ? keyPreviewY : miniKeyboardY; if (miniKeyboard.setShifted(parentKeyboard.isShiftedOrShiftLocked())) { invalidateAllKeys(); diff --git a/java/src/com/android/inputmethod/latin/AccessibilityUtils.java b/java/src/com/android/inputmethod/latin/AccessibilityUtils.java deleted file mode 100644 index cd3f9e0ad..000000000 --- a/java/src/com/android/inputmethod/latin/AccessibilityUtils.java +++ /dev/null @@ -1,211 +0,0 @@ -/* - * Copyright (C) 2011 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; - -import android.content.Context; -import android.content.SharedPreferences; -import android.content.res.TypedArray; -import android.view.accessibility.AccessibilityEvent; -import android.view.accessibility.AccessibilityManager; - -import com.android.inputmethod.keyboard.Keyboard; -import com.android.inputmethod.keyboard.KeyboardSwitcher; - -import java.util.HashMap; -import java.util.Map; - -/** - * Utility functions for accessibility support. - */ -public class AccessibilityUtils { - /** Shared singleton instance. */ - private static final AccessibilityUtils sInstance = new AccessibilityUtils(); - private /* final */ LatinIME mService; - private /* final */ AccessibilityManager mAccessibilityManager; - private /* final */ Map<Integer, CharSequence> mDescriptions; - - /** - * Returns a shared instance of AccessibilityUtils. - * - * @return A shared instance of AccessibilityUtils. - */ - public static AccessibilityUtils getInstance() { - return sInstance; - } - - /** - * Initializes (or re-initializes) the shared instance of AccessibilityUtils - * with the specified parent service and preferences. - * - * @param service The parent input method service. - * @param prefs The parent preferences. - */ - public static void init(LatinIME service, SharedPreferences prefs) { - sInstance.initialize(service, prefs); - } - - private AccessibilityUtils() { - // This class is not publicly instantiable. - } - - /** - * Initializes (or re-initializes) with the specified parent service and - * preferences. - * - * @param service The parent input method service. - * @param prefs The parent preferences. - */ - private void initialize(LatinIME service, SharedPreferences prefs) { - mService = service; - mAccessibilityManager = (AccessibilityManager) service.getSystemService( - Context.ACCESSIBILITY_SERVICE); - mDescriptions = null; - } - - /** - * Returns true if accessibility is enabled. - * - * @return {@code true} if accessibility is enabled. - */ - public boolean isAccessibilityEnabled() { - return mAccessibilityManager.isEnabled(); - } - - /** - * Speaks a key's action after it has been released. Does not speak letter - * keys since typed keys are already spoken aloud by TalkBack. - * <p> - * No-op if accessibility is not enabled. - * </p> - * - * @param primaryCode The primary code of the released key. - * @param switcher The input method's {@link KeyboardSwitcher}. - */ - public void onRelease(int primaryCode, KeyboardSwitcher switcher) { - if (!isAccessibilityEnabled()) { - return; - } - - int resId = -1; - - switch (primaryCode) { - case Keyboard.CODE_SHIFT: { - if (switcher.isShiftedOrShiftLocked()) { - resId = R.string.description_shift_on; - } else { - resId = R.string.description_shift_off; - } - break; - } - - case Keyboard.CODE_SWITCH_ALPHA_SYMBOL: { - if (switcher.isAlphabetMode()) { - resId = R.string.description_symbols_off; - } else { - resId = R.string.description_symbols_on; - } - break; - } - } - - if (resId >= 0) { - speakDescription(mService.getResources().getText(resId)); - } - } - - /** - * Speaks a key's description for accessibility. If a key has an explicit - * description defined in keycodes.xml, that will be used. Otherwise, if the - * key is a Unicode character, then its character will be used. - * <p> - * No-op if accessibility is not enabled. - * </p> - * - * @param primaryCode The primary code of the pressed key. - * @param switcher The input method's {@link KeyboardSwitcher}. - */ - public void onPress(int primaryCode, KeyboardSwitcher switcher) { - if (!isAccessibilityEnabled()) { - return; - } - - // TODO Use the current keyboard state to read "Switch to symbols" - // instead of just "Symbols" (and similar for shift key). - CharSequence description = describeKey(primaryCode); - if (description == null && Character.isDefined((char) primaryCode)) { - description = Character.toString((char) primaryCode); - } - - if (description != null) { - speakDescription(description); - } - } - - /** - * Returns a text description for a given key code. If the key does not have - * an explicit description, returns <code>null</code>. - * - * @param keyCode An integer key code. - * @return A {@link CharSequence} describing the key or <code>null</code> if - * no description is available. - */ - private CharSequence describeKey(int keyCode) { - // If not loaded yet, load key descriptions from XML file. - if (mDescriptions == null) { - mDescriptions = loadDescriptions(); - } - - return mDescriptions.get(keyCode); - } - - /** - * Loads key descriptions from resources. - */ - private Map<Integer, CharSequence> loadDescriptions() { - final Map<Integer, CharSequence> descriptions = new HashMap<Integer, CharSequence>(); - final TypedArray array = mService.getResources().obtainTypedArray(R.array.key_descriptions); - - // Key descriptions are stored as a key code followed by a string. - for (int i = 0; i < array.length() - 1; i += 2) { - int code = array.getInteger(i, 0); - CharSequence desc = array.getText(i + 1); - - descriptions.put(code, desc); - } - - array.recycle(); - - return descriptions; - } - - /** - * Sends a character sequence to be read aloud. - * - * @param description The {@link CharSequence} to be read aloud. - */ - private void speakDescription(CharSequence description) { - // TODO We need to add an AccessibilityEvent type for IMEs. - final AccessibilityEvent event = AccessibilityEvent.obtain( - AccessibilityEvent.TYPE_VIEW_TEXT_CHANGED); - event.setPackageName(mService.getPackageName()); - event.setClassName(getClass().getName()); - event.setAddedCount(description.length()); - event.getText().add(description); - - mAccessibilityManager.sendAccessibilityEvent(event); - } -} diff --git a/java/src/com/android/inputmethod/latin/DictionaryFactory.java b/java/src/com/android/inputmethod/latin/DictionaryFactory.java index 605676d70..bba331868 100644 --- a/java/src/com/android/inputmethod/latin/DictionaryFactory.java +++ b/java/src/com/android/inputmethod/latin/DictionaryFactory.java @@ -142,6 +142,25 @@ public class DictionaryFactory { return hasDictionary; } + // TODO: Do not use the size of the dictionary as an unique dictionary ID. + public static Long getDictionaryId(Context context, Locale locale) { + final Resources res = context.getResources(); + final Locale saveLocale = Utils.setSystemLocale(res, locale); + + final int resourceId = Utils.getMainDictionaryResourceId(res); + final AssetFileDescriptor afd = res.openRawResourceFd(resourceId); + final Long size = (afd != null && afd.getLength() > PLACEHOLDER_LENGTH) + ? afd.getLength() + : null; + try { + if (null != afd) afd.close(); + } catch (java.io.IOException e) { + } + + Utils.setSystemLocale(res, saveLocale); + return size; + } + // TODO: Find the Right Way to find out whether the resource is a placeholder or not. // Suggestion : strip the locale, open the placeholder file and store its offset. // Upon opening the file, if it's the same offset, then it's the placeholder. diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 375529f25..964dd99ca 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -22,9 +22,9 @@ import com.android.inputmethod.compat.InputConnectionCompatUtils; import com.android.inputmethod.compat.InputMethodManagerCompatWrapper; import com.android.inputmethod.compat.InputMethodServiceCompatWrapper; import com.android.inputmethod.compat.InputTypeCompatUtils; -import com.android.inputmethod.compat.VibratorCompatWrapper; import com.android.inputmethod.deprecated.LanguageSwitcherProxy; import com.android.inputmethod.deprecated.VoiceProxy; +import com.android.inputmethod.deprecated.recorrection.Recorrection; import com.android.inputmethod.keyboard.Keyboard; import com.android.inputmethod.keyboard.KeyboardActionListener; import com.android.inputmethod.keyboard.KeyboardSwitcher; @@ -73,7 +73,6 @@ import android.widget.LinearLayout; import java.io.FileDescriptor; import java.io.PrintWriter; -import java.util.Arrays; import java.util.Locale; /** @@ -135,6 +134,8 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar SUGGESTION_VISIBILILTY_HIDE_VALUE }; + private Settings.Values mSettingsValues; + private View mCandidateViewContainer; private int mCandidateStripHeight; private CandidateView mCandidateView; @@ -164,8 +165,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar private boolean mIsSettingsSuggestionStripOn; private boolean mApplicationSpecifiedCompletionOn; - private AccessibilityUtils mAccessibilityUtils; - private final StringBuilder mComposing = new StringBuilder(); private WordComposer mWord = new WordComposer(); private CharSequence mBestWord; @@ -174,26 +173,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar // Magic space: a space that should disappear on space/apostrophe insertion, move after the // punctuation on punctuation insertion, and become a real space on alpha char insertion. private boolean mJustAddedMagicSpace; // This indicates whether the last char is a magic space. - private boolean mAutoCorrectEnabled; - // Suggestion: use bigrams to adjust scores of suggestions obtained from unigram dictionary - private boolean mBigramSuggestionEnabled; - // Prediction: use bigrams to predict the next word when there is no input for it yet - private boolean mBigramPredictionEnabled; - private boolean mAutoCorrectOn; - private boolean mVibrateOn; - private boolean mSoundOn; - private boolean mPopupOn; - private boolean mAutoCap; - private boolean mQuickFixes; - private boolean mConfigEnableShowSubtypeSettings; - private boolean mConfigSwipeDownDismissKeyboardEnabled; - private int mConfigDelayBeforeFadeoutLanguageOnSpacebar; - private int mConfigDelayUpdateSuggestions; - private int mConfigDelayUpdateOldSuggestions; - private int mConfigDelayUpdateShiftState; - private int mConfigDurationOfFadeoutLanguageOnSpacebar; - private float mConfigFinalFadeoutFactorOfLanguageOnSpacebar; - private long mConfigDoubleSpacesTurnIntoPeriodTimeout; private int mCorrectionMode; private int mCommittedLength; @@ -201,7 +180,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar // Keep track of the last selection range to decide if we need to show word alternatives private int mLastSelectionStart; private int mLastSelectionEnd; - private SuggestedWords mSuggestPuncList; // Indicates whether the suggestion strip is to be on in landscape private boolean mJustAccepted; @@ -211,12 +189,8 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar private AudioManager mAudioManager; // Align sound effect volume on music volume private static final float FX_VOLUME = -1.0f; - private boolean mSilentMode; + private boolean mSilentModeOn; // System-wide current configuration - /* package */ String mWordSeparators; - private String mMagicSpaceStrippers; - private String mMagicSpaceSwappers; - private String mSuggestPuncs; // TODO: Move this flag to VoiceProxy private boolean mConfigurationChanging; @@ -251,7 +225,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar case MSG_UPDATE_OLD_SUGGESTIONS: mRecorrection.setRecorrectionSuggestions(mVoiceProxy, mCandidateView, mSuggest, mKeyboardSwitcher, mWord, mHasUncommittedTypedChars, mLastSelectionStart, - mLastSelectionEnd, mWordSeparators); + mLastSelectionEnd, mSettingsValues.mWordSeparators); break; case MSG_UPDATE_SHIFT_STATE: switcher.updateShiftState(); @@ -264,17 +238,20 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar || (switcher.isAlphabetMode() && switcher.isShiftedOrShiftLocked())); break; case MSG_FADEOUT_LANGUAGE_ON_SPACEBAR: - if (inputView != null) + if (inputView != null) { inputView.setSpacebarTextFadeFactor( - (1.0f + mConfigFinalFadeoutFactorOfLanguageOnSpacebar) / 2, + (1.0f + mSettingsValues.mFinalFadeoutFactorOfLanguageOnSpacebar) / 2, (LatinKeyboard)msg.obj); + } sendMessageDelayed(obtainMessage(MSG_DISMISS_LANGUAGE_ON_SPACEBAR, msg.obj), - mConfigDurationOfFadeoutLanguageOnSpacebar); + mSettingsValues.mDurationOfFadeoutLanguageOnSpacebar); break; case MSG_DISMISS_LANGUAGE_ON_SPACEBAR: - if (inputView != null) + if (inputView != null) { inputView.setSpacebarTextFadeFactor( - mConfigFinalFadeoutFactorOfLanguageOnSpacebar, (LatinKeyboard)msg.obj); + mSettingsValues.mFinalFadeoutFactorOfLanguageOnSpacebar, + (LatinKeyboard)msg.obj); + } break; } } @@ -282,7 +259,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar public void postUpdateSuggestions() { removeMessages(MSG_UPDATE_SUGGESTIONS); sendMessageDelayed(obtainMessage(MSG_UPDATE_SUGGESTIONS), - mConfigDelayUpdateSuggestions); + mSettingsValues.mDelayUpdateSuggestions); } public void cancelUpdateSuggestions() { @@ -296,7 +273,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar public void postUpdateOldSuggestions() { removeMessages(MSG_UPDATE_OLD_SUGGESTIONS); sendMessageDelayed(obtainMessage(MSG_UPDATE_OLD_SUGGESTIONS), - mConfigDelayUpdateOldSuggestions); + mSettingsValues.mDelayUpdateOldSuggestions); } public void cancelUpdateOldSuggestions() { @@ -305,7 +282,8 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar public void postUpdateShiftKeyState() { removeMessages(MSG_UPDATE_SHIFT_STATE); - sendMessageDelayed(obtainMessage(MSG_UPDATE_SHIFT_STATE), mConfigDelayUpdateShiftState); + sendMessageDelayed(obtainMessage(MSG_UPDATE_SHIFT_STATE), + mSettingsValues.mDelayUpdateShiftState); } public void cancelUpdateShiftState() { @@ -315,7 +293,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar public void postUpdateBigramPredictions() { removeMessages(MSG_SET_BIGRAM_PREDICTIONS); sendMessageDelayed(obtainMessage(MSG_SET_BIGRAM_PREDICTIONS), - mConfigDelayUpdateSuggestions); + mSettingsValues.mDelayUpdateSuggestions); } public void cancelUpdateBigramPredictions() { @@ -334,15 +312,16 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar final LatinKeyboard keyboard = mKeyboardSwitcher.getLatinKeyboard(); // The language is always displayed when the delay is negative. final boolean needsToDisplayLanguage = localeChanged - || mConfigDelayBeforeFadeoutLanguageOnSpacebar < 0; + || mSettingsValues.mDelayBeforeFadeoutLanguageOnSpacebar < 0; // The language is never displayed when the delay is zero. - if (mConfigDelayBeforeFadeoutLanguageOnSpacebar != 0) + if (mSettingsValues.mDelayBeforeFadeoutLanguageOnSpacebar != 0) { inputView.setSpacebarTextFadeFactor(needsToDisplayLanguage ? 1.0f - : mConfigFinalFadeoutFactorOfLanguageOnSpacebar, keyboard); + : mSettingsValues.mFinalFadeoutFactorOfLanguageOnSpacebar, keyboard); + } // The fadeout animation will start when the delay is positive. - if (localeChanged && mConfigDelayBeforeFadeoutLanguageOnSpacebar > 0) { + if (localeChanged && mSettingsValues.mDelayBeforeFadeoutLanguageOnSpacebar > 0) { sendMessageDelayed(obtainMessage(MSG_FADEOUT_LANGUAGE_ON_SPACEBAR, keyboard), - mConfigDelayBeforeFadeoutLanguageOnSpacebar); + mSettingsValues.mDelayBeforeFadeoutLanguageOnSpacebar); } } } @@ -350,7 +329,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar public void startDoubleSpacesTimer() { removeMessages(MSG_SPACE_TYPED); sendMessageDelayed(obtainMessage(MSG_SPACE_TYPED), - mConfigDoubleSpacesTurnIntoPeriodTimeout); + mSettingsValues.mDoubleSpacesTurnIntoPeriodTimeout); } public void cancelDoubleSpacesTimer() { @@ -370,7 +349,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar LanguageSwitcherProxy.init(this, prefs); SubtypeSwitcher.init(this, prefs); KeyboardSwitcher.init(this, prefs); - AccessibilityUtils.init(this, prefs); Recorrection.init(this, prefs); super.onCreate(); @@ -379,29 +357,13 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar mInputMethodId = Utils.getInputMethodId(mImm, getPackageName()); mSubtypeSwitcher = SubtypeSwitcher.getInstance(); mKeyboardSwitcher = KeyboardSwitcher.getInstance(); - mAccessibilityUtils = AccessibilityUtils.getInstance(); mRecorrection = Recorrection.getInstance(); + loadSettings(); + final Resources res = getResources(); mResources = res; - mConfigEnableShowSubtypeSettings = res.getBoolean( - R.bool.config_enable_show_subtype_settings); - mConfigSwipeDownDismissKeyboardEnabled = res.getBoolean( - R.bool.config_swipe_down_dismiss_keyboard_enabled); - mConfigDelayBeforeFadeoutLanguageOnSpacebar = res.getInteger( - R.integer.config_delay_before_fadeout_language_on_spacebar); - mConfigDelayUpdateSuggestions = res.getInteger(R.integer.config_delay_update_suggestions); - mConfigDelayUpdateOldSuggestions = res.getInteger( - R.integer.config_delay_update_old_suggestions); - mConfigDelayUpdateShiftState = res.getInteger(R.integer.config_delay_update_shift_state); - mConfigDurationOfFadeoutLanguageOnSpacebar = res.getInteger( - R.integer.config_duration_of_fadeout_language_on_spacebar); - mConfigFinalFadeoutFactorOfLanguageOnSpacebar = res.getInteger( - R.integer.config_final_fadeout_percentage_of_language_on_spacebar) / 100.0f; - mConfigDoubleSpacesTurnIntoPeriodTimeout = res.getInteger( - R.integer.config_double_spaces_turn_into_period_timeout); - Utils.GCUtils.getInstance().reset(); boolean tryGC = true; for (int i = 0; i < Utils.GCUtils.GC_TRY_LOOP_MAX && tryGC; ++i) { @@ -414,7 +376,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar } mOrientation = res.getConfiguration().orientation; - initSuggestPuncList(); // Register to receive ringer mode change and network state change. // Also receive installation and removal of a dictionary pack. @@ -436,6 +397,13 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar registerReceiver(mDictionaryPackInstallReceiver, newDictFilter); } + // Has to be package-visible for unit tests + /* package */ void loadSettings() { + if (null == mPrefs) mPrefs = PreferenceManager.getDefaultSharedPreferences(this); + if (null == mSubtypeSwitcher) mSubtypeSwitcher = SubtypeSwitcher.getInstance(); + mSettingsValues = new Settings.Values(mPrefs, this, mSubtypeSwitcher.getInputLocaleStr()); + } + private void initSuggest() { final String localeStr = mSubtypeSwitcher.getInputLocaleStr(); final Locale keyboardLocale = new Locale(localeStr); @@ -445,12 +413,12 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar if (mSuggest != null) { mSuggest.close(); } - final SharedPreferences prefs = mPrefs; - mQuickFixes = isQuickFixesEnabled(prefs); int mainDicResId = Utils.getMainDictionaryResourceId(res); mSuggest = new Suggest(this, mainDicResId, keyboardLocale); - loadAndSetAutoCorrectionThreshold(prefs); + if (mSettingsValues.mAutoCorrectEnabled) { + mSuggest.setAutoCorrectionThreshold(mSettingsValues.mAutoCorrectionThreshold); + } updateAutoTextEnabled(); mUserDictionary = new UserDictionary(this, localeStr); @@ -466,14 +434,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar mSuggest.setUserBigramDictionary(mUserBigramDictionary); updateCorrectionMode(); - mMagicSpaceStrippers = res.getString(R.string.magic_space_stripping_symbols); - mMagicSpaceSwappers = res.getString(R.string.magic_space_swapping_symbols); - String wordSeparators = mMagicSpaceStrippers + mMagicSpaceSwappers - + res.getString(R.string.magic_space_promoting_symbols); - final String notWordSeparators = res.getString(R.string.non_word_separator_symbols); - for (int i = notWordSeparators.length() - 1; i >= 0; --i) - wordSeparators = wordSeparators.replace(notWordSeparators.substring(i, i + 1), ""); - mWordSeparators = wordSeparators; Utils.setSystemLocale(res, savedLocale); } @@ -571,7 +531,18 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar mDeleteCount = 0; mJustAddedMagicSpace = false; - loadSettings(attribute); + loadSettings(); + updateCorrectionMode(); + updateAutoTextEnabled(); + updateSuggestionVisibility(mPrefs, mResources); + + if (mSuggest != null && mSettingsValues.mAutoCorrectEnabled) { + mSuggest.setAutoCorrectionThreshold(mSettingsValues.mAutoCorrectionThreshold); + } + mVoiceProxy.loadSettings(attribute, mPrefs); + // This will work only when the subtype is not supported. + LanguageSwitcherProxy.loadSettings(); + if (mSubtypeSwitcher.isKeyboardMode()) { switcher.loadKeyboard(attribute, mSubtypeSwitcher.isShortcutImeEnabled() && voiceIme.isVoiceButtonEnabled(), @@ -585,11 +556,9 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar updateCorrectionMode(); - final boolean accessibilityEnabled = mAccessibilityUtils.isAccessibilityEnabled(); - - inputView.setKeyPreviewEnabled(mPopupOn); + inputView.setKeyPreviewPopupEnabled(mSettingsValues.mKeyPreviewPopupOn, + mSettingsValues.mKeyPreviewPopupDismissDelay); inputView.setProximityCorrectionEnabled(true); - inputView.setAccessibilityEnabled(accessibilityEnabled); // If we just entered a text field, maybe it has some old text that requires correction mRecorrection.checkRecorrectionOnStart(); inputView.setForeground(true); @@ -717,7 +686,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar // If the composing span has been cleared, save the typed word in the history for // recorrection before we reset the candidate strip. Then, we'll be able to show // suggestions for recorrection right away. - mRecorrection.saveWordInHistory(mWord, mComposing); + mRecorrection.saveRecorrectionSuggestion(mWord, mComposing); } mComposing.setLength(0); mHasUncommittedTypedChars = false; @@ -953,7 +922,8 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar public boolean getCurrentAutoCapsState() { InputConnection ic = getCurrentInputConnection(); EditorInfo ei = getCurrentInputEditorInfo(); - if (mAutoCap && ic != null && ei != null && ei.inputType != InputType.TYPE_NULL) { + if (mSettingsValues.mAutoCap && ic != null && ei != null + && ei.inputType != InputType.TYPE_NULL) { return ic.getCursorCapsMode(ei.inputType) != 0; } return false; @@ -1038,7 +1008,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar private void onSettingsKeyPressed() { if (!isShowingOptionDialog()) { - if (!mConfigEnableShowSubtypeSettings) { + if (!mSettingsValues.mEnableShowSubtypeSettings) { showSubtypeSelectorAndSettings(); } else if (Utils.hasMultipleEnabledIMEsOrSubtypes(mImm)) { showOptionsMenu(); @@ -1071,7 +1041,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar } mLastKeyTime = when; KeyboardSwitcher switcher = mKeyboardSwitcher; - final boolean accessibilityEnabled = switcher.isAccessibilityEnabled(); final boolean distinctMultiTouch = switcher.hasDistinctMultitouch(); switch (primaryCode) { case Keyboard.CODE_DELETE: @@ -1081,12 +1050,12 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar break; case Keyboard.CODE_SHIFT: // Shift key is handled in onPress() when device has distinct multi-touch panel. - if (!distinctMultiTouch || accessibilityEnabled) + if (!distinctMultiTouch) switcher.toggleShift(); break; case Keyboard.CODE_SWITCH_ALPHA_SYMBOL: // Symbol key is handled in onPress() when device has distinct multi-touch panel. - if (!distinctMultiTouch || accessibilityEnabled) + if (!distinctMultiTouch) switcher.changeKeyboardMode(); break; case Keyboard.CODE_CANCEL: @@ -1116,7 +1085,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar handleTab(); break; default: - if (isWordSeparator(primaryCode)) { + if (mSettingsValues.isWordSeparator(primaryCode)) { handleSeparator(primaryCode, x, y); } else { handleCharacter(primaryCode, keyCodes, x, y); @@ -1241,7 +1210,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar private void handleCharacter(int primaryCode, int[] keyCodes, int x, int y) { mVoiceProxy.handleCharacter(); - if (mJustAddedMagicSpace && isMagicSpaceStripper(primaryCode)) { + if (mJustAddedMagicSpace && mSettingsValues.isMagicSpaceStripper(primaryCode)) { removeTrailingSpace(); } @@ -1254,7 +1223,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar if (!mHasUncommittedTypedChars) { mHasUncommittedTypedChars = true; mComposing.setLength(0); - mRecorrection.saveWordInHistory(mWord, mBestWord); + mRecorrection.saveRecorrectionSuggestion(mWord, mBestWord); mWord.reset(); clearSuggestions(); } @@ -1297,7 +1266,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar } else { sendKeyChar((char)code); } - if (mJustAddedMagicSpace && isMagicSpaceSwapper(primaryCode)) { + if (mJustAddedMagicSpace && mSettingsValues.isMagicSpaceSwapper(primaryCode)) { swapSwapperAndSpace(); } else { mJustAddedMagicSpace = false; @@ -1305,7 +1274,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar switcher.updateShiftState(); if (LatinIME.PERF_DEBUG) measureCps(); - TextEntryState.typedCharacter((char) code, isWordSeparator(code), x, y); + TextEntryState.typedCharacter((char) code, mSettingsValues.isWordSeparator(code), x, y); } private void handleSeparator(int primaryCode, int x, int y) { @@ -1329,7 +1298,10 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar // not to auto correct, but accept the typed word. For instance, // in Italian dov' should not be expanded to dove' because the elision // requires the last vowel to be removed. - if (mAutoCorrectOn && primaryCode != Keyboard.CODE_SINGLE_QUOTE) { + final boolean shouldAutoCorrect = + (mSettingsValues.mAutoCorrectEnabled || mSettingsValues.mQuickFixes) + && !mInputTypeNoAutoCorrect && mHasDictionary; + if (shouldAutoCorrect && primaryCode != Keyboard.CODE_SINGLE_QUOTE) { pickedDefault = pickDefaultSuggestion(primaryCode); } else { commitTyped(ic); @@ -1337,11 +1309,11 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar } if (mJustAddedMagicSpace) { - if (isMagicSpaceSwapper(primaryCode)) { + if (mSettingsValues.isMagicSpaceSwapper(primaryCode)) { sendKeyChar((char)primaryCode); swapSwapperAndSpace(); } else { - if (isMagicSpaceStripper(primaryCode)) removeTrailingSpace(); + if (mSettingsValues.isMagicSpaceStripper(primaryCode)) removeTrailingSpace(); sendKeyChar((char)primaryCode); mJustAddedMagicSpace = false; } @@ -1397,7 +1369,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar } public boolean isShowingPunctuationList() { - return mSuggestPuncList == mCandidateView.getSuggestions(); + return mSettingsValues.mSuggestPuncList == mCandidateView.getSuggestions(); } public boolean isShowingSuggestionsStrip() { @@ -1471,7 +1443,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar private void showSuggestions(WordComposer word) { // TODO: May need a better way of retrieving previous word CharSequence prevWord = EditingUtils.getPreviousWord(getCurrentInputConnection(), - mWordSeparators); + mSettingsValues.mWordSeparators); SuggestedWords.Builder builder = mSuggest.getSuggestedWordBuilder( mKeyboardSwitcher.getInputView(), word, prevWord); @@ -1494,14 +1466,17 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar // in most cases, suggestion count is 1 when typed word's length is 1, but we do always // need to clear the previous state when the user starts typing a word (i.e. typed word's // length == 1). - if (builder.size() > 1 || typedWord.length() == 1 || typedWordValid - || mCandidateView.isShowingAddToDictionaryHint()) { - builder.setTypedWordValid(typedWordValid).setHasMinimalSuggestion(correctionAvailable); - } else { - final SuggestedWords previousSuggestions = mCandidateView.getSuggestions(); - if (previousSuggestions == mSuggestPuncList) - return; - builder.addTypedWordAndPreviousSuggestions(typedWord, previousSuggestions); + if (typedWord != null) { + if (builder.size() > 1 || typedWord.length() == 1 || typedWordValid + || mCandidateView.isShowingAddToDictionaryHint()) { + builder.setTypedWordValid(typedWordValid).setHasMinimalSuggestion( + correctionAvailable); + } else { + final SuggestedWords previousSuggestions = mCandidateView.getSuggestions(); + if (previousSuggestions == mSettingsValues.mSuggestPuncList) + return; + builder.addTypedWordAndPreviousSuggestions(typedWord, previousSuggestions); + } } showSuggestions(builder.build(), typedWord); } @@ -1535,14 +1510,14 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar // Add the word to the auto dictionary if it's not a known word addToAutoAndUserBigramDictionaries(mBestWord, AutoDictionary.FREQUENCY_FOR_TYPED); return true; - } return false; } public void pickSuggestionManually(int index, CharSequence suggestion) { SuggestedWords suggestions = mCandidateView.getSuggestions(); - mVoiceProxy.flushAndLogAllTextModificationCounters(index, suggestion, mWordSeparators); + mVoiceProxy.flushAndLogAllTextModificationCounters(index, suggestion, + mSettingsValues.mWordSeparators); final boolean recorrecting = TextEntryState.isRecorrecting(); InputConnection ic = getCurrentInputConnection(); @@ -1567,8 +1542,8 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar } // If this is a punctuation, apply it through the normal key press - if (suggestion.length() == 1 && (isWordSeparator(suggestion.charAt(0)) - || isSuggestedPunctuation(suggestion.charAt(0)))) { + if (suggestion.length() == 1 && (mSettingsValues.isWordSeparator(suggestion.charAt(0)) + || mSettingsValues.isSuggestedPunctuation(suggestion.charAt(0)))) { // Word separators are suggested before the user inputs something. // So, LatinImeLogger logs "" as a user's input. LatinImeLogger.logOnManualSuggestion( @@ -1579,11 +1554,12 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar // pressed space on purpose of displaying the suggestion strip punctuation. final char primaryCode = suggestion.charAt(0); final int toLeft = (ic == null) ? 0 : ic.getTextBeforeCursor(1, 0).charAt(0); + final boolean oldMagicSpace = mJustAddedMagicSpace; if (Keyboard.CODE_SPACE == toLeft) mJustAddedMagicSpace = true; onCodeInput(primaryCode, new int[] { primaryCode }, KeyboardActionListener.NOT_A_TOUCH_COORDINATE, KeyboardActionListener.NOT_A_TOUCH_COORDINATE); - mJustAddedMagicSpace = false; + mJustAddedMagicSpace = oldMagicSpace; if (ic != null) { ic.endBatchEdit(); } @@ -1631,8 +1607,8 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar // TextEntryState.State.PICKED_SUGGESTION state. TextEntryState.typedCharacter((char) Keyboard.CODE_SPACE, true, WordComposer.NOT_A_COORDINATE, WordComposer.NOT_A_COORDINATE); - // From there on onUpdateSelection() will fire so suggestions will be updated - } else if (!showingAddToDictionaryHint) { + } + if (!showingAddToDictionaryHint) { // If we're not showing the "Touch again to save", then show corrections again. // In case the cursor position doesn't change, make sure we show the suggestions again. clearSuggestions(); @@ -1658,10 +1634,10 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar return; InputConnection ic = getCurrentInputConnection(); if (ic != null) { - mVoiceProxy.rememberReplacedWord(suggestion, mWordSeparators); + mVoiceProxy.rememberReplacedWord(suggestion, mSettingsValues.mWordSeparators); ic.commitText(suggestion, 1); } - mRecorrection.saveWordInHistory(mWord, suggestion); + mRecorrection.saveRecorrectionSuggestion(mWord, suggestion); mHasUncommittedTypedChars = false; mCommittedLength = suggestion.length(); } @@ -1671,13 +1647,13 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar if (mSuggest == null || !isSuggestionsRequested()) return; - if (!mBigramPredictionEnabled) { + if (!mSettingsValues.mBigramPredictionEnabled) { setPunctuationSuggestions(); return; } final CharSequence prevWord = EditingUtils.getThisWord(getCurrentInputConnection(), - mWordSeparators); + mSettingsValues.mWordSeparators); SuggestedWords.Builder builder = mSuggest.getSuggestedWordBuilder( mKeyboardSwitcher.getInputView(), sEmptyWordComposer, prevWord); @@ -1691,7 +1667,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar } public void setPunctuationSuggestions() { - setSuggestions(mSuggestPuncList); + setSuggestions(mSettingsValues.mSuggestPuncList); setCandidatesViewShown(isCandidateStripVisible()); } @@ -1734,7 +1710,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar // For example "I will, and you too" : we don't want the pair ("will" "and") to be // a bigram. CharSequence prevWord = EditingUtils.getPreviousWord(getCurrentInputConnection(), - mWordSeparators); + mSettingsValues.mWordSeparators); if (!TextUtils.isEmpty(prevWord)) { mUserBigramDictionary.addBigrams(prevWord.toString(), suggestion.toString()); } @@ -1747,13 +1723,13 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar CharSequence toLeft = ic.getTextBeforeCursor(1, 0); CharSequence toRight = ic.getTextAfterCursor(1, 0); if (!TextUtils.isEmpty(toLeft) - && !isWordSeparator(toLeft.charAt(0)) - && !isSuggestedPunctuation(toLeft.charAt(0))) { + && !mSettingsValues.isWordSeparator(toLeft.charAt(0)) + && !mSettingsValues.isSuggestedPunctuation(toLeft.charAt(0))) { return true; } if (!TextUtils.isEmpty(toRight) - && !isWordSeparator(toRight.charAt(0)) - && !isSuggestedPunctuation(toRight.charAt(0))) { + && !mSettingsValues.isWordSeparator(toRight.charAt(0)) + && !mSettingsValues.isSuggestedPunctuation(toRight.charAt(0))) { return true; } return false; @@ -1772,14 +1748,16 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar if (deleteChar) ic.deleteSurroundingText(1, 0); int toDelete = mCommittedLength; final CharSequence toTheLeft = ic.getTextBeforeCursor(mCommittedLength, 0); - if (!TextUtils.isEmpty(toTheLeft) && isWordSeparator(toTheLeft.charAt(0))) { + if (!TextUtils.isEmpty(toTheLeft) + && mSettingsValues.isWordSeparator(toTheLeft.charAt(0))) { toDelete--; } ic.deleteSurroundingText(toDelete, 0); // Re-insert punctuation only when the deleted character was word separator and the // composing text wasn't equal to the auto-corrected text. if (deleteChar - && !TextUtils.isEmpty(punctuation) && isWordSeparator(punctuation.charAt(0)) + && !TextUtils.isEmpty(punctuation) + && mSettingsValues.isWordSeparator(punctuation.charAt(0)) && !TextUtils.equals(mComposing, toTheLeft)) { ic.commitText(mComposing, 1); TextEntryState.acceptedTyped(mComposing); @@ -1800,21 +1778,8 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar } } - protected String getWordSeparators() { - return mWordSeparators; - } - public boolean isWordSeparator(int code) { - String separators = getWordSeparators(); - return separators.contains(String.valueOf((char)code)); - } - - private boolean isMagicSpaceStripper(int code) { - return mMagicSpaceStrippers.contains(String.valueOf((char)code)); - } - - private boolean isMagicSpaceSwapper(int code) { - return mMagicSpaceSwappers.contains(String.valueOf((char)code)); + return mSettingsValues.isWordSeparator(code); } private void sendMagicSpace() { @@ -1835,6 +1800,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar mSubtypeSwitcher.isShortcutImeEnabled() && mVoiceProxy.isVoiceButtonEnabled(), mVoiceProxy.isVoiceButtonOnPrimary()); initSuggest(); + loadSettings(); mKeyboardSwitcher.updateShiftState(); } @@ -1843,12 +1809,14 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar if (mSubtypeSwitcher.useSpacebarLanguageSwitcher()) { mSubtypeSwitcher.toggleLanguage(next); } - onRefreshKeyboard();// no need?? - } + // The following is necessary because on API levels < 10, we don't get notified when + // subtype changes. + onRefreshKeyboard(); + } @Override public void onSwipeDown() { - if (mConfigSwipeDownDismissKeyboardEnabled) + if (mSettingsValues.mSwipeDownDismissKeyboardEnabled) handleClose(); } @@ -1867,7 +1835,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar } else { switcher.onOtherKeyPressed(); } - mAccessibilityUtils.onPress(primaryCode, switcher); } @Override @@ -1880,7 +1847,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar } else if (distinctMultiTouch && primaryCode == Keyboard.CODE_SWITCH_ALPHA_SYMBOL) { switcher.onReleaseSymbol(); } - mAccessibilityUtils.onRelease(primaryCode, switcher); } @@ -1903,7 +1869,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar mAudioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE); } if (mAudioManager != null) { - mSilentMode = (mAudioManager.getRingerMode() != AudioManager.RINGER_MODE_NORMAL); + mSilentModeOn = (mAudioManager.getRingerMode() != AudioManager.RINGER_MODE_NORMAL); } } @@ -1915,7 +1881,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar updateRingerMode(); } } - if (mSoundOn && !mSilentMode) { + if (isSoundOn()) { // FIXME: Volume and enable should come from UI settings // FIXME: These should be triggered after auto-repeat logic int sound = AudioManager.FX_KEYPRESS_STANDARD; @@ -1935,7 +1901,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar } public void vibrate() { - if (!mVibrateOn) { + if (!mSettingsValues.mVibrateOn) { return; } LatinKeyboardView inputView = mKeyboardSwitcher.getInputView(); @@ -1955,19 +1921,20 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar return mWord; } - public boolean getPopupOn() { - return mPopupOn; + boolean isSoundOn() { + return mSettingsValues.mSoundOn && !mSilentModeOn; } private void updateCorrectionMode() { // TODO: cleanup messy flags mHasDictionary = mSuggest != null ? mSuggest.hasMainDictionary() : false; - mAutoCorrectOn = (mAutoCorrectEnabled || mQuickFixes) - && !mInputTypeNoAutoCorrect && mHasDictionary; - mCorrectionMode = (mAutoCorrectOn && mAutoCorrectEnabled) + final boolean shouldAutoCorrect = (mSettingsValues.mAutoCorrectEnabled + || mSettingsValues.mQuickFixes) && !mInputTypeNoAutoCorrect && mHasDictionary; + mCorrectionMode = (shouldAutoCorrect && mSettingsValues.mAutoCorrectEnabled) ? Suggest.CORRECTION_FULL - : (mAutoCorrectOn ? Suggest.CORRECTION_BASIC : Suggest.CORRECTION_NONE); - mCorrectionMode = (mBigramSuggestionEnabled && mAutoCorrectOn && mAutoCorrectEnabled) + : (shouldAutoCorrect ? Suggest.CORRECTION_BASIC : Suggest.CORRECTION_NONE); + mCorrectionMode = (mSettingsValues.mBigramSuggestionEnabled && shouldAutoCorrect + && mSettingsValues.mAutoCorrectEnabled) ? Suggest.CORRECTION_FULL_BIGRAM : mCorrectionMode; if (mSuggest != null) { mSuggest.setCorrectionMode(mCorrectionMode); @@ -1976,12 +1943,11 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar private void updateAutoTextEnabled() { if (mSuggest == null) return; - mSuggest.setQuickFixesEnabled(mQuickFixes + mSuggest.setQuickFixesEnabled(mSettingsValues.mQuickFixes && SubtypeSwitcher.getInstance().isSystemLanguageSameAsInputLanguage()); } - private void updateSuggestionVisibility(SharedPreferences prefs) { - final Resources res = mResources; + private void updateSuggestionVisibility(final SharedPreferences prefs, final Resources res) { final String suggestionVisiblityStr = prefs.getString( Settings.PREF_SHOW_SUGGESTIONS_SETTING, res.getString(R.string.prefs_suggestion_visibility_default_value)); @@ -2009,128 +1975,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar startActivity(intent); } - private void loadSettings(EditorInfo attribute) { - // Get the settings preferences - final SharedPreferences prefs = mPrefs; - final boolean hasVibrator = VibratorCompatWrapper.getInstance(this).hasVibrator(); - mVibrateOn = hasVibrator && prefs.getBoolean(Settings.PREF_VIBRATE_ON, false); - mSoundOn = prefs.getBoolean(Settings.PREF_SOUND_ON, - mResources.getBoolean(R.bool.config_default_sound_enabled)); - - mPopupOn = isPopupEnabled(prefs); - mAutoCap = prefs.getBoolean(Settings.PREF_AUTO_CAP, true); - mQuickFixes = isQuickFixesEnabled(prefs); - - mAutoCorrectEnabled = isAutoCorrectEnabled(prefs); - mBigramSuggestionEnabled = mAutoCorrectEnabled && isBigramSuggestionEnabled(prefs); - mBigramPredictionEnabled = mBigramSuggestionEnabled && isBigramPredictionEnabled(prefs); - loadAndSetAutoCorrectionThreshold(prefs); - - mVoiceProxy.loadSettings(attribute, prefs); - - updateCorrectionMode(); - updateAutoTextEnabled(); - updateSuggestionVisibility(prefs); - - // This will work only when the subtype is not supported. - LanguageSwitcherProxy.loadSettings(); - } - - /** - * Load Auto correction threshold from SharedPreferences, and modify mSuggest's threshold. - */ - private void loadAndSetAutoCorrectionThreshold(SharedPreferences sp) { - // When mSuggest is not initialized, cannnot modify mSuggest's threshold. - if (mSuggest == null) return; - // When auto correction setting is turned off, the threshold is ignored. - if (!isAutoCorrectEnabled(sp)) return; - - final String currentAutoCorrectionSetting = sp.getString( - Settings.PREF_AUTO_CORRECTION_THRESHOLD, - mResources.getString(R.string.auto_correction_threshold_mode_index_modest)); - final String[] autoCorrectionThresholdValues = mResources.getStringArray( - R.array.auto_correction_threshold_values); - // When autoCrrectionThreshold is greater than 1.0, auto correction is virtually turned off. - double autoCorrectionThreshold = Double.MAX_VALUE; - try { - final int arrayIndex = Integer.valueOf(currentAutoCorrectionSetting); - if (arrayIndex >= 0 && arrayIndex < autoCorrectionThresholdValues.length) { - autoCorrectionThreshold = Double.parseDouble( - autoCorrectionThresholdValues[arrayIndex]); - } - } catch (NumberFormatException e) { - // Whenever the threshold settings are correct, never come here. - autoCorrectionThreshold = Double.MAX_VALUE; - Log.w(TAG, "Cannot load auto correction threshold setting." - + " currentAutoCorrectionSetting: " + currentAutoCorrectionSetting - + ", autoCorrectionThresholdValues: " - + Arrays.toString(autoCorrectionThresholdValues)); - } - // TODO: This should be refactored : - // setAutoCorrectionThreshold should be called outside of this method. - mSuggest.setAutoCorrectionThreshold(autoCorrectionThreshold); - } - - private boolean isPopupEnabled(SharedPreferences sp) { - final boolean showPopupOption = getResources().getBoolean( - R.bool.config_enable_show_popup_on_keypress_option); - if (!showPopupOption) return mResources.getBoolean(R.bool.config_default_popup_preview); - return sp.getBoolean(Settings.PREF_POPUP_ON, - mResources.getBoolean(R.bool.config_default_popup_preview)); - } - - private boolean isQuickFixesEnabled(SharedPreferences sp) { - final boolean showQuickFixesOption = mResources.getBoolean( - R.bool.config_enable_quick_fixes_option); - if (!showQuickFixesOption) { - return isAutoCorrectEnabled(sp); - } - return sp.getBoolean(Settings.PREF_QUICK_FIXES, mResources.getBoolean( - R.bool.config_default_quick_fixes)); - } - - private boolean isAutoCorrectEnabled(SharedPreferences sp) { - final String currentAutoCorrectionSetting = sp.getString( - Settings.PREF_AUTO_CORRECTION_THRESHOLD, - mResources.getString(R.string.auto_correction_threshold_mode_index_modest)); - final String autoCorrectionOff = mResources.getString( - R.string.auto_correction_threshold_mode_index_off); - return !currentAutoCorrectionSetting.equals(autoCorrectionOff); - } - - private boolean isBigramSuggestionEnabled(SharedPreferences sp) { - final boolean showBigramSuggestionsOption = mResources.getBoolean( - R.bool.config_enable_bigram_suggestions_option); - if (!showBigramSuggestionsOption) { - return isAutoCorrectEnabled(sp); - } - return sp.getBoolean(Settings.PREF_BIGRAM_SUGGESTIONS, mResources.getBoolean( - R.bool.config_default_bigram_suggestions)); - } - - private boolean isBigramPredictionEnabled(SharedPreferences sp) { - return sp.getBoolean(Settings.PREF_BIGRAM_PREDICTIONS, mResources.getBoolean( - R.bool.config_default_bigram_prediction)); - } - - private void initSuggestPuncList() { - if (mSuggestPuncs != null || mSuggestPuncList != null) - return; - SuggestedWords.Builder builder = new SuggestedWords.Builder(); - String puncs = mResources.getString(R.string.suggested_punctuations); - if (puncs != null) { - for (int i = 0; i < puncs.length(); i++) { - builder.addWord(puncs.subSequence(i, i + 1)); - } - } - mSuggestPuncList = builder.build(); - mSuggestPuncs = puncs; - } - - private boolean isSuggestedPunctuation(int code) { - return mSuggestPuncs.contains(String.valueOf((char)code)); - } - private void showSubtypeSelectorAndSettings() { final CharSequence title = getString(R.string.english_ime_input_options); final CharSequence[] items = new CharSequence[] { @@ -2214,13 +2058,13 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar p.println(" mIsSuggestionsRequested=" + mIsSettingsSuggestionStripOn); p.println(" mCorrectionMode=" + mCorrectionMode); p.println(" mHasUncommittedTypedChars=" + mHasUncommittedTypedChars); - p.println(" mAutoCorrectOn=" + mAutoCorrectOn); + p.println(" mAutoCorrectEnabled=" + mSettingsValues.mAutoCorrectEnabled); p.println(" mShouldInsertMagicSpace=" + mShouldInsertMagicSpace); p.println(" mApplicationSpecifiedCompletionOn=" + mApplicationSpecifiedCompletionOn); p.println(" TextEntryState.state=" + TextEntryState.getState()); - p.println(" mSoundOn=" + mSoundOn); - p.println(" mVibrateOn=" + mVibrateOn); - p.println(" mPopupOn=" + mPopupOn); + p.println(" mSoundOn=" + mSettingsValues.mSoundOn); + p.println(" mVibrateOn=" + mSettingsValues.mVibrateOn); + p.println(" mKeyPreviewPopupOn=" + mSettingsValues.mKeyPreviewPopupOn); } // Characters per second measurement diff --git a/java/src/com/android/inputmethod/latin/Settings.java b/java/src/com/android/inputmethod/latin/Settings.java index 42b0fadc2..7c323c155 100644 --- a/java/src/com/android/inputmethod/latin/Settings.java +++ b/java/src/com/android/inputmethod/latin/Settings.java @@ -25,9 +25,11 @@ import com.android.inputmethod.compat.VibratorCompatWrapper; import android.app.AlertDialog; import android.app.Dialog; import android.app.backup.BackupManager; +import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.SharedPreferences; +import android.content.res.Resources; import android.os.Bundle; import android.preference.CheckBoxPreference; import android.preference.ListPreference; @@ -43,6 +45,7 @@ import android.text.method.LinkMovementMethod; import android.util.Log; import android.widget.TextView; +import java.util.Arrays; import java.util.Locale; public class Settings extends PreferenceActivity @@ -53,7 +56,7 @@ public class Settings extends PreferenceActivity public static final String PREF_GENERAL_SETTINGS_KEY = "general_settings"; public static final String PREF_VIBRATE_ON = "vibrate_on"; public static final String PREF_SOUND_ON = "sound_on"; - public static final String PREF_POPUP_ON = "popup_on"; + public static final String PREF_KEY_PREVIEW_POPUP_ON = "popup_on"; public static final String PREF_RECORRECTION_ENABLED = "recorrection_enabled"; public static final String PREF_AUTO_CAP = "auto_cap"; public static final String PREF_SETTINGS_KEY = "settings_key"; @@ -74,17 +77,224 @@ public class Settings extends PreferenceActivity public static final String PREF_MISC_SETTINGS_KEY = "misc_settings"; + public static final String PREF_KEY_PREVIEW_POPUP_DISMISS_DELAY = + "pref_key_preview_popup_dismiss_delay"; + public static final String PREF_USABILITY_STUDY_MODE = "usability_study_mode"; // Dialog ids private static final int VOICE_INPUT_CONFIRM_DIALOG = 0; + public static class Values { + // From resources: + public final boolean mEnableShowSubtypeSettings; + public final boolean mSwipeDownDismissKeyboardEnabled; + public final int mDelayBeforeFadeoutLanguageOnSpacebar; + public final int mDelayUpdateSuggestions; + public final int mDelayUpdateOldSuggestions; + public final int mDelayUpdateShiftState; + public final int mDurationOfFadeoutLanguageOnSpacebar; + public final float mFinalFadeoutFactorOfLanguageOnSpacebar; + public final long mDoubleSpacesTurnIntoPeriodTimeout; + public final String mWordSeparators; + public final String mMagicSpaceStrippers; + public final String mMagicSpaceSwappers; + public final String mSuggestPuncs; + public final SuggestedWords mSuggestPuncList; + + // From preferences: + public final boolean mSoundOn; // Sound setting private to Latin IME (see mSilentModeOn) + public final boolean mVibrateOn; + public final boolean mKeyPreviewPopupOn; + public final int mKeyPreviewPopupDismissDelay; + public final boolean mAutoCap; + public final boolean mQuickFixes; + public final boolean mAutoCorrectEnabled; + public final double mAutoCorrectionThreshold; + // Suggestion: use bigrams to adjust scores of suggestions obtained from unigram dictionary + public final boolean mBigramSuggestionEnabled; + // Prediction: use bigrams to predict the next word when there is no input for it yet + public final boolean mBigramPredictionEnabled; + + public Values(final SharedPreferences prefs, final Context context, + final String localeStr) { + final Resources res = context.getResources(); + final Locale savedLocale; + if (null != localeStr) { + final Locale keyboardLocale = new Locale(localeStr); + savedLocale = Utils.setSystemLocale(res, keyboardLocale); + } else { + savedLocale = null; + } + + // Get the resources + mEnableShowSubtypeSettings = res.getBoolean( + R.bool.config_enable_show_subtype_settings); + mSwipeDownDismissKeyboardEnabled = res.getBoolean( + R.bool.config_swipe_down_dismiss_keyboard_enabled); + mDelayBeforeFadeoutLanguageOnSpacebar = res.getInteger( + R.integer.config_delay_before_fadeout_language_on_spacebar); + mDelayUpdateSuggestions = + res.getInteger(R.integer.config_delay_update_suggestions); + mDelayUpdateOldSuggestions = res.getInteger( + R.integer.config_delay_update_old_suggestions); + mDelayUpdateShiftState = + res.getInteger(R.integer.config_delay_update_shift_state); + mDurationOfFadeoutLanguageOnSpacebar = res.getInteger( + R.integer.config_duration_of_fadeout_language_on_spacebar); + mFinalFadeoutFactorOfLanguageOnSpacebar = res.getInteger( + R.integer.config_final_fadeout_percentage_of_language_on_spacebar) / 100.0f; + mDoubleSpacesTurnIntoPeriodTimeout = res.getInteger( + R.integer.config_double_spaces_turn_into_period_timeout); + mMagicSpaceStrippers = res.getString(R.string.magic_space_stripping_symbols); + mMagicSpaceSwappers = res.getString(R.string.magic_space_swapping_symbols); + String wordSeparators = mMagicSpaceStrippers + mMagicSpaceSwappers + + res.getString(R.string.magic_space_promoting_symbols); + final String notWordSeparators = res.getString(R.string.non_word_separator_symbols); + for (int i = notWordSeparators.length() - 1; i >= 0; --i) { + wordSeparators = wordSeparators.replace(notWordSeparators.substring(i, i + 1), ""); + } + mWordSeparators = wordSeparators; + mSuggestPuncs = res.getString(R.string.suggested_punctuations); + // TODO: it would be nice not to recreate this each time we change the configuration + mSuggestPuncList = createSuggestPuncList(mSuggestPuncs); + + // Get the settings preferences + final boolean hasVibrator = VibratorCompatWrapper.getInstance(context).hasVibrator(); + mVibrateOn = hasVibrator && prefs.getBoolean(Settings.PREF_VIBRATE_ON, false); + mSoundOn = prefs.getBoolean(Settings.PREF_SOUND_ON, + res.getBoolean(R.bool.config_default_sound_enabled)); + + mKeyPreviewPopupOn = isKeyPreviewPopupEnabled(prefs, res); + mKeyPreviewPopupDismissDelay = getKeyPreviewPopupDismissDelay(prefs, res); + mAutoCap = prefs.getBoolean(Settings.PREF_AUTO_CAP, true); + mQuickFixes = isQuickFixesEnabled(prefs, res); + + mAutoCorrectEnabled = isAutoCorrectEnabled(prefs, res); + mBigramSuggestionEnabled = mAutoCorrectEnabled + && isBigramSuggestionEnabled(prefs, res, mAutoCorrectEnabled); + mBigramPredictionEnabled = mBigramSuggestionEnabled + && isBigramPredictionEnabled(prefs, res); + + mAutoCorrectionThreshold = getAutoCorrectionThreshold(prefs, res); + + Utils.setSystemLocale(res, savedLocale); + } + + public boolean isSuggestedPunctuation(int code) { + return mSuggestPuncs.contains(String.valueOf((char)code)); + } + + public boolean isWordSeparator(int code) { + return mWordSeparators.contains(String.valueOf((char)code)); + } + + public boolean isMagicSpaceStripper(int code) { + return mMagicSpaceStrippers.contains(String.valueOf((char)code)); + } + + public boolean isMagicSpaceSwapper(int code) { + return mMagicSpaceSwappers.contains(String.valueOf((char)code)); + } + + // Helper methods + private static boolean isQuickFixesEnabled(SharedPreferences sp, Resources resources) { + final boolean showQuickFixesOption = resources.getBoolean( + R.bool.config_enable_quick_fixes_option); + if (!showQuickFixesOption) { + return isAutoCorrectEnabled(sp, resources); + } + return sp.getBoolean(Settings.PREF_QUICK_FIXES, resources.getBoolean( + R.bool.config_default_quick_fixes)); + } + + private static boolean isAutoCorrectEnabled(SharedPreferences sp, Resources resources) { + final String currentAutoCorrectionSetting = sp.getString( + Settings.PREF_AUTO_CORRECTION_THRESHOLD, + resources.getString(R.string.auto_correction_threshold_mode_index_modest)); + final String autoCorrectionOff = resources.getString( + R.string.auto_correction_threshold_mode_index_off); + return !currentAutoCorrectionSetting.equals(autoCorrectionOff); + } + + // Public to access from KeyboardSwitcher. Should it have access to some + // process-global instance instead? + public static boolean isKeyPreviewPopupEnabled(SharedPreferences sp, Resources resources) { + final boolean showPopupOption = resources.getBoolean( + R.bool.config_enable_show_popup_on_keypress_option); + if (!showPopupOption) return resources.getBoolean(R.bool.config_default_popup_preview); + return sp.getBoolean(Settings.PREF_KEY_PREVIEW_POPUP_ON, + resources.getBoolean(R.bool.config_default_popup_preview)); + } + + // Likewise + public static int getKeyPreviewPopupDismissDelay(SharedPreferences sp, + Resources resources) { + return Integer.parseInt(sp.getString(Settings.PREF_KEY_PREVIEW_POPUP_DISMISS_DELAY, + Integer.toString(resources.getInteger(R.integer.config_delay_after_preview)))); + } + + private static boolean isBigramSuggestionEnabled(SharedPreferences sp, Resources resources, + boolean autoCorrectEnabled) { + final boolean showBigramSuggestionsOption = resources.getBoolean( + R.bool.config_enable_bigram_suggestions_option); + if (!showBigramSuggestionsOption) { + return autoCorrectEnabled; + } + return sp.getBoolean(Settings.PREF_BIGRAM_SUGGESTIONS, resources.getBoolean( + R.bool.config_default_bigram_suggestions)); + } + + private static boolean isBigramPredictionEnabled(SharedPreferences sp, + Resources resources) { + return sp.getBoolean(Settings.PREF_BIGRAM_PREDICTIONS, resources.getBoolean( + R.bool.config_default_bigram_prediction)); + } + + private static double getAutoCorrectionThreshold(SharedPreferences sp, + Resources resources) { + final String currentAutoCorrectionSetting = sp.getString( + Settings.PREF_AUTO_CORRECTION_THRESHOLD, + resources.getString(R.string.auto_correction_threshold_mode_index_modest)); + final String[] autoCorrectionThresholdValues = resources.getStringArray( + R.array.auto_correction_threshold_values); + // When autoCorrectionThreshold is greater than 1.0, it's like auto correction is off. + double autoCorrectionThreshold = Double.MAX_VALUE; + try { + final int arrayIndex = Integer.valueOf(currentAutoCorrectionSetting); + if (arrayIndex >= 0 && arrayIndex < autoCorrectionThresholdValues.length) { + autoCorrectionThreshold = Double.parseDouble( + autoCorrectionThresholdValues[arrayIndex]); + } + } catch (NumberFormatException e) { + // Whenever the threshold settings are correct, never come here. + autoCorrectionThreshold = Double.MAX_VALUE; + Log.w(TAG, "Cannot load auto correction threshold setting." + + " currentAutoCorrectionSetting: " + currentAutoCorrectionSetting + + ", autoCorrectionThresholdValues: " + + Arrays.toString(autoCorrectionThresholdValues)); + } + return autoCorrectionThreshold; + } + + private static SuggestedWords createSuggestPuncList(final String puncs) { + SuggestedWords.Builder builder = new SuggestedWords.Builder(); + if (puncs != null) { + for (int i = 0; i < puncs.length(); i++) { + builder.addWord(puncs.subSequence(i, i + 1)); + } + } + return builder.build(); + } + } + private PreferenceScreen mInputLanguageSelection; private CheckBoxPreference mQuickFixes; private ListPreference mVoicePreference; private ListPreference mSettingsKeyPreference; private ListPreference mShowCorrectionSuggestionsPreference; private ListPreference mAutoCorrectionThreshold; + private ListPreference mKeyPreviewPopupDismissDelay; // Suggestion: use bigrams to adjust scores of suggestions obtained from unigram dictionary private CheckBoxPreference mBigramSuggestion; // Prediction: use bigrams to predict the next word when there is no input for it yet @@ -110,6 +320,8 @@ public class Settings extends PreferenceActivity @Override protected void onCreate(Bundle icicle) { super.onCreate(icicle); + final Resources res = getResources(); + addPreferencesFromResource(R.xml.prefs); mInputLanguageSelection = (PreferenceScreen) findPreference(PREF_SUBTYPES); mInputLanguageSelection.setOnPreferenceClickListener(this); @@ -145,13 +357,13 @@ public class Settings extends PreferenceActivity final PreferenceGroup bigramGroup = (PreferenceGroup) findPreference(PREF_NGRAM_SETTINGS_KEY); - final boolean showSettingsKeyOption = getResources().getBoolean( + final boolean showSettingsKeyOption = res.getBoolean( R.bool.config_enable_show_settings_key_option); if (!showSettingsKeyOption) { generalSettings.removePreference(mSettingsKeyPreference); } - final boolean showVoiceKeyOption = getResources().getBoolean( + final boolean showVoiceKeyOption = res.getBoolean( R.bool.config_enable_show_voice_key_option); if (!showVoiceKeyOption) { generalSettings.removePreference(mVoicePreference); @@ -161,43 +373,60 @@ public class Settings extends PreferenceActivity generalSettings.removePreference(findPreference(PREF_VIBRATE_ON)); } - final boolean showSubtypeSettings = getResources().getBoolean( + final boolean showSubtypeSettings = res.getBoolean( R.bool.config_enable_show_subtype_settings); if (InputMethodServiceCompatWrapper.CAN_HANDLE_ON_CURRENT_INPUT_METHOD_SUBTYPE_CHANGED && !showSubtypeSettings) { generalSettings.removePreference(findPreference(PREF_SUBTYPES)); } - final boolean showPopupOption = getResources().getBoolean( + final boolean showPopupOption = res.getBoolean( R.bool.config_enable_show_popup_on_keypress_option); if (!showPopupOption) { - generalSettings.removePreference(findPreference(PREF_POPUP_ON)); + generalSettings.removePreference(findPreference(PREF_KEY_PREVIEW_POPUP_ON)); } - final boolean showRecorrectionOption = getResources().getBoolean( + final boolean showRecorrectionOption = res.getBoolean( R.bool.config_enable_show_recorrection_option); if (!showRecorrectionOption) { generalSettings.removePreference(findPreference(PREF_RECORRECTION_ENABLED)); } - final boolean showQuickFixesOption = getResources().getBoolean( + final boolean showQuickFixesOption = res.getBoolean( R.bool.config_enable_quick_fixes_option); if (!showQuickFixesOption) { textCorrectionGroup.removePreference(findPreference(PREF_QUICK_FIXES)); } - final boolean showBigramSuggestionsOption = getResources().getBoolean( + final boolean showBigramSuggestionsOption = res.getBoolean( R.bool.config_enable_bigram_suggestions_option); if (!showBigramSuggestionsOption) { textCorrectionGroup.removePreference(findPreference(PREF_BIGRAM_SUGGESTIONS)); textCorrectionGroup.removePreference(findPreference(PREF_BIGRAM_PREDICTIONS)); } - final boolean showUsabilityModeStudyOption = getResources().getBoolean( + final boolean showUsabilityModeStudyOption = res.getBoolean( R.bool.config_enable_usability_study_mode_option); if (!showUsabilityModeStudyOption) { getPreferenceScreen().removePreference(findPreference(PREF_USABILITY_STUDY_MODE)); } + + mKeyPreviewPopupDismissDelay = + (ListPreference)findPreference(PREF_KEY_PREVIEW_POPUP_DISMISS_DELAY); + final String[] entries = new String[] { + res.getString(R.string.key_preview_popup_dismiss_no_delay), + res.getString(R.string.key_preview_popup_dismiss_default_delay), + }; + final String popupDismissDelayDefaultValue = Integer.toString(res.getInteger( + R.integer.config_delay_after_preview)); + mKeyPreviewPopupDismissDelay.setEntries(entries); + mKeyPreviewPopupDismissDelay.setEntryValues( + new String[] { "0", popupDismissDelayDefaultValue }); + if (null == mKeyPreviewPopupDismissDelay.getValue()) { + mKeyPreviewPopupDismissDelay.setValue(popupDismissDelayDefaultValue); + } + mKeyPreviewPopupDismissDelay.setEnabled( + Settings.Values.isKeyPreviewPopupEnabled(prefs, res)); } @Override @@ -216,6 +445,7 @@ public class Settings extends PreferenceActivity } updateSettingsKeySummary(); updateShowCorrectionSuggestionsSummary(); + updateKeyPreviewPopupDelaySummary(); } @Override @@ -234,6 +464,12 @@ public class Settings extends PreferenceActivity .equals(mVoiceModeOff)) { showVoiceConfirmation(); } + } else if (key.equals(PREF_KEY_PREVIEW_POPUP_ON)) { + final ListPreference popupDismissDelay = + (ListPreference)findPreference(PREF_KEY_PREVIEW_POPUP_DISMISS_DELAY); + if (null != popupDismissDelay) { + popupDismissDelay.setEnabled(prefs.getBoolean(PREF_KEY_PREVIEW_POPUP_ON, true)); + } } ensureConsistencyOfAutoCorrectionSettings(); mVoiceOn = !(prefs.getString(PREF_VOICE_SETTINGS_KEY, mVoiceModeOff) @@ -241,6 +477,7 @@ public class Settings extends PreferenceActivity updateVoiceModeSummary(); updateSettingsKeySummary(); updateShowCorrectionSuggestionsSummary(); + updateKeyPreviewPopupDelaySummary(); } @Override @@ -262,11 +499,17 @@ public class Settings extends PreferenceActivity } private void updateSettingsKeySummary() { + final ListPreference lp = mSettingsKeyPreference; mSettingsKeyPreference.setSummary( getResources().getStringArray(R.array.settings_key_modes) [mSettingsKeyPreference.findIndexOfValue(mSettingsKeyPreference.getValue())]); } + private void updateKeyPreviewPopupDelaySummary() { + final ListPreference lp = mKeyPreviewPopupDismissDelay; + lp.setSummary(lp.getEntries()[lp.findIndexOfValue(lp.getValue())]); + } + private void showVoiceConfirmation() { mOkClicked = false; showDialog(VOICE_INPUT_CONFIRM_DIALOG); diff --git a/java/src/com/android/inputmethod/latin/WordComposer.java b/java/src/com/android/inputmethod/latin/WordComposer.java index cf0592920..af5e4b179 100644 --- a/java/src/com/android/inputmethod/latin/WordComposer.java +++ b/java/src/com/android/inputmethod/latin/WordComposer.java @@ -62,7 +62,7 @@ public class WordComposer { mYCoordinates = new int[N]; } - WordComposer(WordComposer source) { + public WordComposer(WordComposer source) { init(source); } |