diff --git a/java/res/drawable-hdpi/sym_keyboard_feedback_space.png b/java/res/drawable-hdpi/sym_keyboard_feedback_space.png deleted file mode 100644 index 67311fc8f..000000000 Binary files a/java/res/drawable-hdpi/sym_keyboard_feedback_space.png and /dev/null differ diff --git a/java/res/drawable-mdpi/sym_keyboard_feedback_space.png b/java/res/drawable-mdpi/sym_keyboard_feedback_space.png deleted file mode 100644 index 36eb60c13..000000000 Binary files a/java/res/drawable-mdpi/sym_keyboard_feedback_space.png and /dev/null differ diff --git a/java/res/drawable-xhdpi/sym_keyboard_feedback_space.png b/java/res/drawable-xhdpi/sym_keyboard_feedback_space.png deleted file mode 100644 index cee10568d..000000000 Binary files a/java/res/drawable-xhdpi/sym_keyboard_feedback_space.png and /dev/null differ diff --git a/java/res/values-af/strings.xml b/java/res/values-af/strings.xml index 3a9567ffd..57f29cadb 100644 --- a/java/res/values-af/strings.xml +++ b/java/res/values-af/strings.xml @@ -59,8 +59,6 @@ "Wys altyd" "Wys in portretmodus" "Versteek altyd" - - "Wys instellingsleutel" "Outomaties" "Wys altyd" diff --git a/java/res/values-am/strings.xml b/java/res/values-am/strings.xml index 307fdc9de..8d76021db 100644 --- a/java/res/values-am/strings.xml +++ b/java/res/values-am/strings.xml @@ -59,8 +59,6 @@ "ሁልጊዜ አሳይ" "በቁመት ሁነታ አሳይ" "ሁልጊዜ ደብቅ" - - "የቅንብሮች ቁልፍ አሳይ" "ራስ ሰር" "ሁልጊዜ አሳይ" diff --git a/java/res/values-ar/strings.xml b/java/res/values-ar/strings.xml index f99654317..e0806f2c1 100644 --- a/java/res/values-ar/strings.xml +++ b/java/res/values-ar/strings.xml @@ -46,7 +46,6 @@ "عرض دومًا" "عرض في وضع رأسي" "إخفاء دومًا" - "استخدام مفتاح المسافة لتبديل اللغة" "عرض مفتاح الإعدادات" "تلقائي" "إظهار بشكل دائم" diff --git a/java/res/values-bg/strings.xml b/java/res/values-bg/strings.xml index e925563cb..57d5553bd 100644 --- a/java/res/values-bg/strings.xml +++ b/java/res/values-bg/strings.xml @@ -46,7 +46,6 @@ "Винаги да се показва" "Показване с вертикална ориентация" "Винаги да се скрива" - "Смяна на езика с клавиша за интервал" "Показване на клавиша за настройки" "Автоматично" "Да се показва винаги" diff --git a/java/res/values-ca/strings.xml b/java/res/values-ca/strings.xml index c038f1971..435cdbbf1 100644 --- a/java/res/values-ca/strings.xml +++ b/java/res/values-ca/strings.xml @@ -46,7 +46,6 @@ "Mostra sempre" "Mostra en mode vertical" "Amaga sempre" - "Canvi d\'idioma amb la barra espaiadora" "Mostra la tecla de configuració" "Automàtic" "Mostra sempre" diff --git a/java/res/values-cs/strings.xml b/java/res/values-cs/strings.xml index 5807773e3..dc7ad529e 100644 --- a/java/res/values-cs/strings.xml +++ b/java/res/values-cs/strings.xml @@ -46,7 +46,6 @@ "Vždy zobrazovat" "Zobrazit v režimu na výšku" "Vždy skrývat" - "Přepínání jazyků mezerníkem" "Zobrazit klávesu Nastavení" "Automaticky" "Vždy zobrazovat" diff --git a/java/res/values-da/strings.xml b/java/res/values-da/strings.xml index c0dc9b7a8..e922de662 100644 --- a/java/res/values-da/strings.xml +++ b/java/res/values-da/strings.xml @@ -46,7 +46,6 @@ "Vis altid" "Vis i portrættilstand" "Skjul altid" - "Brug mellemrumst. som sprogskifter" "Vis indstillingsnøgle" "Automatisk" "Vis altid" diff --git a/java/res/values-de/strings.xml b/java/res/values-de/strings.xml index 10761328c..3fd19a283 100644 --- a/java/res/values-de/strings.xml +++ b/java/res/values-de/strings.xml @@ -46,7 +46,6 @@ "Immer anzeigen" "Im Hochformat anzeigen" "Immer ausblenden" - "Sprache mit Leertaste ändern" "Einstellungstaste anz." "Automatisch" "Immer anzeigen" diff --git a/java/res/values-el/strings.xml b/java/res/values-el/strings.xml index 544a834cd..21b17a84d 100644 --- a/java/res/values-el/strings.xml +++ b/java/res/values-el/strings.xml @@ -46,7 +46,6 @@ "Να εμφανίζεται πάντα" "Εμφάνιση σε λειτουργία κατακόρυφης προβολής" "Πάντα απόκρυψη" - "Χρησιμοποιήστε τη δυνατότητα εναλλαγής γλώσσας του πλήκτρου διαστήματος" "Εμφάνιση πλήκτρου ρυθμίσεων" "Αυτόματο" "Να εμφανίζεται πάντα" diff --git a/java/res/values-en-rGB/strings.xml b/java/res/values-en-rGB/strings.xml index bb3588ba7..e4e356890 100644 --- a/java/res/values-en-rGB/strings.xml +++ b/java/res/values-en-rGB/strings.xml @@ -46,7 +46,6 @@ "Always show" "Show on portrait mode" "Always hide" - "Use the spacebar language switcher" "Show settings key" "Automatic" "Always show" diff --git a/java/res/values-es-rUS/strings.xml b/java/res/values-es-rUS/strings.xml index f5311b8f4..e92a641af 100644 --- a/java/res/values-es-rUS/strings.xml +++ b/java/res/values-es-rUS/strings.xml @@ -46,7 +46,6 @@ "Mostrar siempre" "Mostrar en modo retrato" "Ocultar siempre" - "Usa select. de id. de barra espac." "Mostrar tecla de configuración" "Automático" "Mostrar siempre" diff --git a/java/res/values-es/strings.xml b/java/res/values-es/strings.xml index 2298e5599..5efd1444c 100644 --- a/java/res/values-es/strings.xml +++ b/java/res/values-es/strings.xml @@ -46,7 +46,6 @@ "Mostrar siempre" "Mostrar en modo vertical" "Ocultar siempre" - "Utilizar espacio para cambiar idioma" "Mostrar tecla de ajustes" "Automáticamente" "Mostrar siempre" diff --git a/java/res/values-fa/strings.xml b/java/res/values-fa/strings.xml index 3dccfb420..9567aca8d 100644 --- a/java/res/values-fa/strings.xml +++ b/java/res/values-fa/strings.xml @@ -46,7 +46,6 @@ "همیشه نمایش داده شود" "نمایش در حالت عمودی" "همیشه پنهان شود" - "از ویژگی تعویض زبان کلید فاصله استفاده شود" "نمایش کلید تنظیمات" "خودکار" "همیشه نمایش" diff --git a/java/res/values-fi/strings.xml b/java/res/values-fi/strings.xml index bd9fc1cde..69ef265cd 100644 --- a/java/res/values-fi/strings.xml +++ b/java/res/values-fi/strings.xml @@ -46,7 +46,6 @@ "Näytä aina" "Näytä pystysuunnassa" "Piilota aina" - "Vaihda kieli välil." "Näytä asetukset-näppäin" "Automaattinen" "Näytä aina" diff --git a/java/res/values-fr/strings.xml b/java/res/values-fr/strings.xml index f54b27f69..0db0354fa 100644 --- a/java/res/values-fr/strings.xml +++ b/java/res/values-fr/strings.xml @@ -46,7 +46,6 @@ "Toujours afficher" "Afficher en mode Portrait" "Toujours masquer" - "Barre d\'espace pour changer langue" "Afficher touche param." "Automatique" "Toujours afficher" diff --git a/java/res/values-hr/strings.xml b/java/res/values-hr/strings.xml index d22432a97..13657cee6 100644 --- a/java/res/values-hr/strings.xml +++ b/java/res/values-hr/strings.xml @@ -46,7 +46,6 @@ "Uvijek prikaži" "Prikaži u portretnom načinu" "Uvijek sakrij" - "Upotrijebite razmaknicu za prebacivanje jezika" "Prikaži tipku postavki" "Automatski" "Uvijek prikaži" diff --git a/java/res/values-hu/strings.xml b/java/res/values-hu/strings.xml index 7411923dd..6364cd96b 100644 --- a/java/res/values-hu/strings.xml +++ b/java/res/values-hu/strings.xml @@ -46,7 +46,6 @@ "Mindig látszik" "Megjelenítés álló tájolásban" "Mindig rejtve" - "Nyelvváltó: szóköz" "Beállítások billentyű megjelenítése" "Automatikus" "Mindig látszik" diff --git a/java/res/values-in/strings.xml b/java/res/values-in/strings.xml index 6cdf8578a..31bb784a0 100644 --- a/java/res/values-in/strings.xml +++ b/java/res/values-in/strings.xml @@ -46,7 +46,6 @@ "Selalu tampilkan" "Tampilkan pada mode potret" "Selalu sembunyikan" - "Gunakan pengalih bahasa bilah spasi" "Lihat tombol setelan" "Otomatis" "Selalu tampilkan" diff --git a/java/res/values-it/strings.xml b/java/res/values-it/strings.xml index 360b92f38..99b04b4ba 100644 --- a/java/res/values-it/strings.xml +++ b/java/res/values-it/strings.xml @@ -46,7 +46,6 @@ "Mostra sempre" "Mostra in modalità verticale" "Nascondi sempre" - "Selettore lingua da barra spaziatrice" "Mostra tasto impostaz." "Automatico" "Mostra sempre" diff --git a/java/res/values-iw/strings.xml b/java/res/values-iw/strings.xml index 93da0281d..02b510322 100644 --- a/java/res/values-iw/strings.xml +++ b/java/res/values-iw/strings.xml @@ -46,7 +46,6 @@ "הצג תמיד" "הצג בפריסה לאורך" "הסתר תמיד" - "השתמש במחליף השפה שבמקש הרווח" "הצג מקש הגדרות" "אוטומטי" "הצג תמיד" diff --git a/java/res/values-ja/strings.xml b/java/res/values-ja/strings.xml index 3f819cee2..382948206 100644 --- a/java/res/values-ja/strings.xml +++ b/java/res/values-ja/strings.xml @@ -46,7 +46,6 @@ "常に表示" "縦向きで表示" "常に非表示" - "スペースバーで切替" "設定キーを表示" "自動" "常に表示" diff --git a/java/res/values-ko/strings.xml b/java/res/values-ko/strings.xml index e9c2e4cf2..a663ee5b1 100644 --- a/java/res/values-ko/strings.xml +++ b/java/res/values-ko/strings.xml @@ -46,7 +46,6 @@ "항상 표시" "세로 모드로 표시" "항상 숨기기" - "스페이스 바 언어 교환기 사용" "설정 키 표시" "자동" "항상 표시" diff --git a/java/res/values-lt/strings.xml b/java/res/values-lt/strings.xml index 191b0185f..73285ef6f 100644 --- a/java/res/values-lt/strings.xml +++ b/java/res/values-lt/strings.xml @@ -46,7 +46,6 @@ "Visada rodyti" "Rodyti stačiuoju režimu" "Visada slėpti" - "Naud. tarpo kl. k. jung." "Rodyti nustatymų raktą" "Automatinis" "Visada rodyti" diff --git a/java/res/values-lv/strings.xml b/java/res/values-lv/strings.xml index 8a77d0035..1e3f57773 100644 --- a/java/res/values-lv/strings.xml +++ b/java/res/values-lv/strings.xml @@ -46,7 +46,6 @@ "Vienmēr rādīt" "Rādīt portreta režīmā" "Vienmēr slēpt" - "Izmantot valodu pārslēgšanai atstarpēšanas taustiņu" "Rādīt iestatījumu taustiņu" "Automātiski" "Vienmēr rādīt" diff --git a/java/res/values-ms/strings.xml b/java/res/values-ms/strings.xml index a0f0c2027..012823bab 100644 --- a/java/res/values-ms/strings.xml +++ b/java/res/values-ms/strings.xml @@ -53,7 +53,6 @@ "Sentiasa tunjukkan" "Tunjukkan pada mod potret" "Sentiasa sembunyikan" - "Bar ruang tukar bhs" "Tunjukkan kekunci tetapan" "Automatik" "Sentiasa tunjukkan" diff --git a/java/res/values-nb/strings.xml b/java/res/values-nb/strings.xml index 468950738..8a5a54f34 100644 --- a/java/res/values-nb/strings.xml +++ b/java/res/values-nb/strings.xml @@ -46,7 +46,6 @@ "Vis alltid" "Vis i stående modus" "Skjul alltid" - "Skift språk med mellomromstasten" "Vis innstillingsnøkkel" "Automatisk" "Vis alltid" diff --git a/java/res/values-nl/strings.xml b/java/res/values-nl/strings.xml index 8dac48c5e..62dc7b264 100644 --- a/java/res/values-nl/strings.xml +++ b/java/res/values-nl/strings.xml @@ -46,7 +46,6 @@ "Altijd weergeven" "Weergeven in staande modus" "Altijd verbergen" - "Taal schakelen via spatiebalk" "Instellingscode weergeven" "Automatisch" "Altijd weergeven" diff --git a/java/res/values-pl/strings.xml b/java/res/values-pl/strings.xml index 3ff6bfcec..83e785802 100644 --- a/java/res/values-pl/strings.xml +++ b/java/res/values-pl/strings.xml @@ -46,7 +46,6 @@ "Zawsze pokazuj" "Pokaż w trybie pionowym" "Zawsze ukrywaj" - "Spacja przełącza język" "Pokaż klawisz ustawień" "Automatycznie" "Zawsze pokazuj" diff --git a/java/res/values-pt-rPT/strings.xml b/java/res/values-pt-rPT/strings.xml index 3add66c4c..6e4d1f4b9 100644 --- a/java/res/values-pt-rPT/strings.xml +++ b/java/res/values-pt-rPT/strings.xml @@ -46,7 +46,6 @@ "Mostrar sempre" "Mostrar no modo de retrato" "Ocultar sempre" - "Utilizar barra esp. alt. idioma" "Mostrar tecla das definições" "Automático" "Mostrar sempre" diff --git a/java/res/values-pt/strings.xml b/java/res/values-pt/strings.xml index 38373e323..a82e40ae7 100644 --- a/java/res/values-pt/strings.xml +++ b/java/res/values-pt/strings.xml @@ -46,7 +46,6 @@ "Mostrar sempre" "Mostrar em modo retrato" "Sempre ocultar" - "Alt. idiomas c/ a barra" "Mostrar tecla de config." "Automático" "Mostrar sempre" diff --git a/java/res/values-rm/strings.xml b/java/res/values-rm/strings.xml index d6d38ad5d..ed4e30552 100644 --- a/java/res/values-rm/strings.xml +++ b/java/res/values-rm/strings.xml @@ -64,8 +64,6 @@ - - diff --git a/java/res/values-ro/strings.xml b/java/res/values-ro/strings.xml index e9cbd50ec..8f02fe37a 100644 --- a/java/res/values-ro/strings.xml +++ b/java/res/values-ro/strings.xml @@ -46,7 +46,6 @@ "Afişaţi întotdeauna" "Afişaţi în modul Portret" "Ascundeţi întotdeauna" - "Spacebar – selector limbă" "Afişaţi tasta setări" "Automat" "Afişaţi întotdeauna" diff --git a/java/res/values-ru/strings.xml b/java/res/values-ru/strings.xml index eac2026c4..14cd5e4fe 100644 --- a/java/res/values-ru/strings.xml +++ b/java/res/values-ru/strings.xml @@ -46,7 +46,6 @@ "Всегда показывать" "Показать вертикально" "Всегда скрывать" - "Пробел меняет язык" "Кнопка настроек" "Автоматически" "Всегда показывать" diff --git a/java/res/values-sk/strings.xml b/java/res/values-sk/strings.xml index 8cdc737eb..f286a2437 100644 --- a/java/res/values-sk/strings.xml +++ b/java/res/values-sk/strings.xml @@ -46,7 +46,6 @@ "Vždy zobrazovať" "Zobraziť v režime na výšku" "Vždy skrývať" - "Použite medzerník na prepínanie medzi jazykmi" "Zobraziť kláves Nastavenia" "Automaticky" "Vždy zobrazovať" diff --git a/java/res/values-sl/strings.xml b/java/res/values-sl/strings.xml index a599ab58b..8ea2e3c8c 100644 --- a/java/res/values-sl/strings.xml +++ b/java/res/values-sl/strings.xml @@ -46,7 +46,6 @@ "Vedno pokaži" "Pokaži v pokončnem načinu" "Vedno skrij" - "Preklopite med jeziki s preslednico" "Pokaži tipko za nastavitve" "Samodejno" "Vedno pokaži" diff --git a/java/res/values-sr/strings.xml b/java/res/values-sr/strings.xml index bfbcd1a4b..73dfbf45d 100644 --- a/java/res/values-sr/strings.xml +++ b/java/res/values-sr/strings.xml @@ -46,7 +46,6 @@ "Увек прикажи" "Прикажи у усправном режиму" "Увек сакриј" - "Користи размак за избор језика" "Прикажи тастер за подешавања" "Аутоматски" "Увек прикажи" diff --git a/java/res/values-sv/strings.xml b/java/res/values-sv/strings.xml index 7387cfa3d..e8b1fe250 100644 --- a/java/res/values-sv/strings.xml +++ b/java/res/values-sv/strings.xml @@ -46,7 +46,6 @@ "Visa alltid" "Visa stående" "Dölj alltid" - "Byt språk m. mellanslag" "Visa inställningsknapp" "Automatiskt" "Visa alltid" diff --git a/java/res/values-sw/strings.xml b/java/res/values-sw/strings.xml index e9f077b9a..a8b53d5ee 100644 --- a/java/res/values-sw/strings.xml +++ b/java/res/values-sw/strings.xml @@ -59,8 +59,6 @@ "Onyesha kila wakati" "Onyesha kwenye hali wima" "Ficha kila wakati" - - "Onyesha kitufe cha mipangilio" "Kiotomatiki" "Onyesha kila wakati" diff --git a/java/res/values-sw600dp/config.xml b/java/res/values-sw600dp/config.xml index 260f360c3..169802f7f 100644 --- a/java/res/values-sw600dp/config.xml +++ b/java/res/values-sw600dp/config.xml @@ -31,7 +31,6 @@ false true false - false true diff --git a/java/res/values-sw768dp/config.xml b/java/res/values-sw768dp/config.xml index 82605686a..5fbd61d5e 100644 --- a/java/res/values-sw768dp/config.xml +++ b/java/res/values-sw768dp/config.xml @@ -31,7 +31,6 @@ false true false - false true 180 diff --git a/java/res/values-th/strings.xml b/java/res/values-th/strings.xml index 75befea47..e28240796 100644 --- a/java/res/values-th/strings.xml +++ b/java/res/values-th/strings.xml @@ -46,7 +46,6 @@ "แสดงทุกครั้ง" "แสดงในโหมดแนวตั้ง" "ซ่อนทุกครั้ง" - "ใช้แป้น Spacebar เพื่อสลับภาษา" "แสดงแป้นการตั้งค่า" "อัตโนมัติ" "แสดงตลอดเวลา" diff --git a/java/res/values-tl/strings.xml b/java/res/values-tl/strings.xml index d8652ea8e..1a23997fe 100644 --- a/java/res/values-tl/strings.xml +++ b/java/res/values-tl/strings.xml @@ -46,7 +46,6 @@ "Palaging ipakita" "Ipakita sa portrait mode" "Palaging itago" - "Gamitin ang panglipat ng wika sa spacebar" "Ipakita ang key ng mga setting" "Awtomatiko" "Palaging ipakita" diff --git a/java/res/values-tr/strings.xml b/java/res/values-tr/strings.xml index 00dcaac12..c7f741151 100644 --- a/java/res/values-tr/strings.xml +++ b/java/res/values-tr/strings.xml @@ -46,7 +46,6 @@ "Her zaman göster" "Dikey modda göster" "Her zaman gizle" - "Dil geçişi > boşluk çubuğuyla" "Ayarları göster tuşu" "Otomatik" "Her zaman göster" diff --git a/java/res/values-uk/strings.xml b/java/res/values-uk/strings.xml index 9ba53ca48..d531e6ade 100644 --- a/java/res/values-uk/strings.xml +++ b/java/res/values-uk/strings.xml @@ -46,7 +46,6 @@ "Завжди показувати" "Показувати в книжковому режимі" "Завжди ховати" - "Використ. зміну мови пробілом" "Показ. клав. налашт." "Автоматично" "Завжди показ." diff --git a/java/res/values-vi/strings.xml b/java/res/values-vi/strings.xml index d35bdb297..228f621c4 100644 --- a/java/res/values-vi/strings.xml +++ b/java/res/values-vi/strings.xml @@ -46,7 +46,6 @@ "Luôn hiển thị" "Hiển thị trên chế độ khổ đứng" "Luôn ẩn" - "Sử dụng trình chuyển đổi ngôn ngữ thanh cách" "Hiển thị phím cài đặt" "Tự động" "Luôn hiển thị" diff --git a/java/res/values-zh-rCN/strings.xml b/java/res/values-zh-rCN/strings.xml index 750e29c26..ba60cac3b 100644 --- a/java/res/values-zh-rCN/strings.xml +++ b/java/res/values-zh-rCN/strings.xml @@ -46,7 +46,6 @@ "始终显示" "以纵向模式显示" "始终隐藏" - "使用空格键切换语言" "显示设置键" "自动" "始终显示" diff --git a/java/res/values-zh-rTW/strings.xml b/java/res/values-zh-rTW/strings.xml index 6dca7ed8f..e2b4dafe5 100644 --- a/java/res/values-zh-rTW/strings.xml +++ b/java/res/values-zh-rTW/strings.xml @@ -46,7 +46,6 @@ "一律顯示" "以垂直模式顯示" "永遠隱藏" - "使用空白鍵切換語言" "顯示設定金鑰" "自動" "一律顯示" diff --git a/java/res/values-zu/strings.xml b/java/res/values-zu/strings.xml index 76f87b0eb..e7973f02f 100644 --- a/java/res/values-zu/strings.xml +++ b/java/res/values-zu/strings.xml @@ -59,8 +59,6 @@ "Bonisa njalo" "Bonisa kwimodi emile" "Fihla njalo" - - "Bonisa ukhiye wezilungiselelo" "Okuzenzakalelayo" "Bonisa njalo" diff --git a/java/res/values/attrs.xml b/java/res/values/attrs.xml index fa5c08ba7..16ff5077b 100644 --- a/java/res/values/attrs.xml +++ b/java/res/values/attrs.xml @@ -78,8 +78,6 @@ - - @@ -165,7 +163,6 @@ - @@ -235,10 +232,9 @@ - - - - + + + diff --git a/java/res/values/config.xml b/java/res/values/config.xml index bc64eb2e6..a14ba53fe 100644 --- a/java/res/values/config.xml +++ b/java/res/values/config.xml @@ -41,7 +41,6 @@ true false true - true false diff --git a/java/res/values/keyboard-icons-black.xml b/java/res/values/keyboard-icons-black.xml index 313bf02e1..d527c15eb 100644 --- a/java/res/values/keyboard-icons-black.xml +++ b/java/res/values/keyboard-icons-black.xml @@ -33,7 +33,6 @@ @drawable/sym_bkeyboard_search @drawable/sym_bkeyboard_tab @drawable/sym_bkeyboard_shift_locked - @drawable/sym_keyboard_feedback_space @drawable/sym_keyboard_feedback_tab @drawable/sym_keyboard_feedback_settings @drawable/sym_keyboard_feedback_mic diff --git a/java/res/values/keyboard-icons-ics.xml b/java/res/values/keyboard-icons-ics.xml index a2bfd7a2f..3d63a9ee0 100644 --- a/java/res/values/keyboard-icons-ics.xml +++ b/java/res/values/keyboard-icons-ics.xml @@ -32,7 +32,6 @@ @drawable/sym_keyboard_search @drawable/sym_keyboard_tab_holo @drawable/sym_keyboard_shift_locked_holo - @drawable/transparent @drawable/sym_keyboard_feedback_tab @drawable/sym_keyboard_settings_holo @drawable/sym_keyboard_feedback_mic diff --git a/java/res/values/keyboard-icons-white.xml b/java/res/values/keyboard-icons-white.xml index b6fa89026..c3889c39e 100644 --- a/java/res/values/keyboard-icons-white.xml +++ b/java/res/values/keyboard-icons-white.xml @@ -29,7 +29,6 @@ @drawable/sym_keyboard_search @drawable/sym_keyboard_tab @drawable/sym_keyboard_shift_locked - @drawable/sym_keyboard_feedback_space @drawable/sym_keyboard_feedback_tab @drawable/sym_keyboard_feedback_settings @drawable/sym_keyboard_feedback_mic diff --git a/java/res/values/strings.xml b/java/res/values/strings.xml index 63663028f..b1cb6a7cc 100644 --- a/java/res/values/strings.xml +++ b/java/res/values/strings.xml @@ -81,8 +81,6 @@ Always show Show on portrait mode Always hide - - Use the spacebar language switcher Show settings key diff --git a/java/res/values/styles.xml b/java/res/values/styles.xml index 8ed334376..9f91ef57c 100644 --- a/java/res/values/styles.xml +++ b/java/res/values/styles.xml @@ -56,7 +56,6 @@ @drawable/keyboard_key_feedback @null @null - @drawable/keyboard_key_feedback #FFFFFFFF @dimen/key_preview_offset @dimen/key_preview_height @@ -163,7 +162,6 @@ @drawable/keyboard_key_feedback_ics @drawable/keyboard_key_feedback_left_ics @drawable/keyboard_key_feedback_right_ics - @drawable/transparent #FFFFFFFF @dimen/key_preview_height_ics @dimen/key_preview_offset_ics diff --git a/java/res/xml-sw600dp/kbd_key_styles.xml b/java/res/xml-sw600dp/kbd_key_styles.xml index 388e293e6..b813e6b59 100644 --- a/java/res/xml-sw600dp/kbd_key_styles.xml +++ b/java/res/xml-sw600dp/kbd_key_styles.xml @@ -75,12 +75,10 @@ latin:parentStyle="functionalKeyStyle" /> + latin:code="@integer/key_space" /> + latin:code="@integer/key_space" /> + latin:code="@integer/key_space" /> + latin:code="@integer/key_space" /> + latin:keyIcon="iconSpaceKey" /> diff --git a/java/res/xml/prefs_for_debug.xml b/java/res/xml/prefs_for_debug.xml index 477461df4..2dad17148 100644 --- a/java/res/xml/prefs_for_debug.xml +++ b/java/res/xml/prefs_for_debug.xml @@ -35,13 +35,6 @@ android:defaultValue="@string/config_default_keyboard_theme_id" /> - - > mSpaceDrawableCache = new HashMap>(); @@ -73,16 +64,6 @@ public class LatinKeyboard extends Keyboard { private final Drawable mEnabledShortcutIcon; private final Drawable mDisabledShortcutIcon; - // BLACK LEFT-POINTING TRIANGLE and two spaces. - public static final String ARROW_LEFT = "\u25C0 "; - // Two spaces and BLACK RIGHT-POINTING TRIANGLE. - public static final String ARROW_RIGHT = " \u25B6"; - - // Minimum width of spacebar dragging to trigger the language switch (represented by the number - // of the most common key width of this keyboard). - private static final int SPACEBAR_DRAG_WIDTH = 3; - // Minimum width of space key preview (proportional to keyboard width). - private static final float SPACEBAR_POPUP_MIN_RATIO = 0.5f; // Height in space key the language name will be drawn. (proportional to space key height) public static final float SPACEBAR_LANGUAGE_BASELINE = 0.6f; // If the full language name needs to be smaller than this value to be drawn on space key, @@ -116,8 +97,6 @@ public class LatinKeyboard extends Keyboard { // The index of space key is available only after Keyboard constructor has finished. mSpaceKey = (spaceKeyIndex >= 0) ? keys.get(spaceKeyIndex) : null; mSpaceIcon = (mSpaceKey != null) ? mSpaceKey.getIcon() : null; - mSpacePreviewIcon = (mSpaceKey != null) ? mSpaceKey.getPreviewIcon() : null; - mSpaceKeyIndex = spaceKeyIndex; mShortcutKey = (shortcutKeyIndex >= 0) ? keys.get(shortcutKeyIndex) : null; mEnabledShortcutIcon = (mShortcutKey != null) ? mShortcutKey.getIcon() : null; @@ -133,20 +112,6 @@ public class LatinKeyboard extends Keyboard { mSpacebarTextShadowColor = a.getColor( R.styleable.LatinKeyboard_spacebarTextShadowColor, 0); a.recycle(); - - // The threshold is "key width" x 1.25 - mSpacebarLanguageSwitchThreshold = (getMostCommonKeyWidth() * 5) / 4; - - if (mSpaceKey != null && mSpacePreviewIcon != null) { - final int slidingIconWidth = Math.max(mSpaceKey.mWidth, - (int)(getMinWidth() * SPACEBAR_POPUP_MIN_RATIO)); - final int spaceKeyheight = mSpacePreviewIcon.getIntrinsicHeight(); - mSlidingLocaleIcon = new SlidingLocaleDrawable( - context, mSpacePreviewIcon, slidingIconWidth, spaceKeyheight); - mSlidingLocaleIcon.setBounds(0, 0, slidingIconWidth, spaceKeyheight); - } else { - mSlidingLocaleIcon = null; - } } public void setSpacebarTextFadeFactor(float fadeFactor, LatinKeyboardView view) { @@ -219,8 +184,7 @@ public class LatinKeyboard extends Keyboard { final Rect bounds = new Rect(); // Estimate appropriate language name text size to fit in maxTextWidth. - String language = ARROW_LEFT + SubtypeSwitcher.getFullDisplayName(locale, true) - + ARROW_RIGHT; + String language = SubtypeSwitcher.getFullDisplayName(locale, true); int textWidth = getTextWidth(paint, language, origTextSize, bounds); // Assuming text width and text size are proportional to each other. float textSize = origTextSize * Math.min(width / textWidth, 1.0f); @@ -232,7 +196,7 @@ public class LatinKeyboard extends Keyboard { final boolean useShortName; if (useMiddleName) { - language = ARROW_LEFT + SubtypeSwitcher.getMiddleDisplayLanguage(locale) + ARROW_RIGHT; + language = SubtypeSwitcher.getMiddleDisplayLanguage(locale); textWidth = getTextWidth(paint, language, origTextSize, bounds); textSize = origTextSize * Math.min(width / textWidth, 1.0f); useShortName = (textSize / origTextSize < MINIMUM_SCALE_OF_LANGUAGE_NAME) @@ -242,7 +206,7 @@ public class LatinKeyboard extends Keyboard { } if (useShortName) { - language = ARROW_LEFT + SubtypeSwitcher.getShortDisplayLanguage(locale) + ARROW_RIGHT; + language = SubtypeSwitcher.getShortDisplayLanguage(locale); textWidth = getTextWidth(paint, language, origTextSize, bounds); textSize = origTextSize * Math.min(width / textWidth, 1.0f); } @@ -327,63 +291,6 @@ public class LatinKeyboard extends Keyboard { return buffer; } - public void setSpacebarSlidingLanguageSwitchDiff(int diff) { - mSpacebarSlidingLanguageSwitchDiff = diff; - } - - public void updateSpacebarPreviewIcon(int diff) { - if (mSpacebarSlidingLanguageSwitchDiff == diff) - return; - mSpacebarSlidingLanguageSwitchDiff = diff; - if (mSlidingLocaleIcon == null) - return; - mSlidingLocaleIcon.setDiff(diff); - if (Math.abs(diff) == Integer.MAX_VALUE) { - mSpaceKey.setPreviewIcon(mSpacePreviewIcon); - } else { - mSpaceKey.setPreviewIcon(mSlidingLocaleIcon); - } - mSpaceKey.getPreviewIcon().invalidateSelf(); - } - - public boolean shouldTriggerSpacebarSlidingLanguageSwitch(int diff) { - // On phone and number layouts, sliding language switch is disabled. - // TODO: Sort out how to enable language switch on these layouts. - if (isPhoneKeyboard() || isNumberKeyboard()) - return false; - return Math.abs(diff) > mSpacebarLanguageSwitchThreshold; - } - - /** - * Return true if spacebar needs showing preview even when "popup on keypress" is off. - * @param keyIndex index of the pressing key - * @return true if spacebar needs showing preview - */ - @Override - public boolean needSpacebarPreview(int keyIndex) { - // This method is called when "popup on keypress" is off. - if (!mSubtypeSwitcher.useSpacebarLanguageSwitcher()) - return false; - // Dismiss key preview. - if (keyIndex == KeyDetector.NOT_A_KEY) - return true; - // Key is not a spacebar. - if (keyIndex != mSpaceKeyIndex) - return false; - // The language switcher will be displayed only when the dragging distance is greater - // than the threshold. - return shouldTriggerSpacebarSlidingLanguageSwitch(mSpacebarSlidingLanguageSwitchDiff); - } - - public int getLanguageChangeDirection() { - if (mSpaceKey == null || mSubtypeSwitcher.getEnabledKeyboardLocaleCount() <= 1 - || Math.abs(mSpacebarSlidingLanguageSwitchDiff) - < getMostCommonKeyWidth() * SPACEBAR_DRAG_WIDTH) { - return 0; // No change - } - return mSpacebarSlidingLanguageSwitchDiff > 0 ? 1 : -1; - } - @Override public int[] getNearestKeys(int x, int y) { // Avoid dead pixels at edges of the keyboard diff --git a/java/src/com/android/inputmethod/keyboard/LatinKeyboardBaseView.java b/java/src/com/android/inputmethod/keyboard/LatinKeyboardBaseView.java index 078d89f49..fb57a2dba 100644 --- a/java/src/com/android/inputmethod/keyboard/LatinKeyboardBaseView.java +++ b/java/src/com/android/inputmethod/keyboard/LatinKeyboardBaseView.java @@ -348,7 +348,6 @@ public class LatinKeyboardBaseView extends KeyboardView implements PointerTracke } // This default implementation returns a popup mini keyboard panel. - // A derived class may return a language switcher popup panel, for instance. protected PopupPanel onCreatePopupPanel(Key parentKey) { if (parentKey.mPopupCharacters == null) return null; diff --git a/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java b/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java index 617961b59..c404a5dfb 100644 --- a/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java +++ b/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java @@ -40,8 +40,6 @@ public class LatinKeyboardView extends LatinKeyboardBaseView { private boolean mDisableDisambiguation; /** The distance threshold at which we start treating the touch session as a multi-touch */ private int mJumpThresholdSquare = Integer.MAX_VALUE; - /** The y coordinate of the last row */ - private int mLastRowY; private int mLastX; private int mLastY; @@ -71,8 +69,6 @@ public class LatinKeyboardView extends LatinKeyboardBaseView { // One-seventh of the keyboard width seems like a reasonable threshold mJumpThresholdSquare = newKeyboard.getMinWidth() / 7; mJumpThresholdSquare *= mJumpThresholdSquare; - // Assuming there are 4 rows, this is the coordinate of the last row - mLastRowY = (newKeyboard.getHeight() * 3) / 4; } private LatinKeyboard getLatinKeyboard() { @@ -127,7 +123,7 @@ public class LatinKeyboardView extends LatinKeyboardBaseView { * the sudden moves subside, a DOWN event is simulated for the second key. * @param me the motion event * @return true if the event was consumed, so that it doesn't continue to be handled by - * KeyboardView. + * {@link LatinKeyboardBaseView}. */ private boolean handleSuddenJump(MotionEvent me) { // If device has distinct multi touch panel, there is no need to check sudden jump. @@ -157,11 +153,8 @@ public class LatinKeyboardView extends LatinKeyboardBaseView { case MotionEvent.ACTION_MOVE: // Is this a big jump? final int distanceSquare = (mLastX - x) * (mLastX - x) + (mLastY - y) * (mLastY - y); - // Check the distance and also if the move is not entirely within the bottom row - // If it's only in the bottom row, it might be an intentional slide gesture - // for language switching - if (distanceSquare > mJumpThresholdSquare - && (mLastY < mLastRowY || y < mLastRowY)) { + // Check the distance. + if (distanceSquare > mJumpThresholdSquare) { // If we're not yet dropping events, start dropping and send an UP event if (!mDroppingEvents) { mDroppingEvents = true; diff --git a/java/src/com/android/inputmethod/keyboard/PointerTracker.java b/java/src/com/android/inputmethod/keyboard/PointerTracker.java index 8d7496c54..5b03ef4a1 100644 --- a/java/src/com/android/inputmethod/keyboard/PointerTracker.java +++ b/java/src/com/android/inputmethod/keyboard/PointerTracker.java @@ -23,7 +23,6 @@ import android.util.Log; import com.android.inputmethod.keyboard.internal.PointerTrackerQueue; import com.android.inputmethod.latin.LatinImeLogger; import com.android.inputmethod.latin.R; -import com.android.inputmethod.latin.SubtypeSwitcher; import java.util.ArrayList; import java.util.Arrays; @@ -133,12 +132,6 @@ public class PointerTracker { // ignore modifier key if true private boolean mIgnoreModifierKey; - // TODO: Remove these hacking variables - // true if this pointer is in sliding language switch - private boolean mIsInSlidingLanguageSwitch; - private int mSpaceKeyIndex; - private static SubtypeSwitcher sSubtypeSwitcher; - // Empty {@link KeyboardActionListener} private static final KeyboardActionListener EMPTY_LISTENER = new KeyboardActionListener() { @Override @@ -172,7 +165,6 @@ public class PointerTracker { sTouchNoiseThresholdDistanceSquared = (int)( touchNoiseThresholdDistance * touchNoiseThresholdDistance); sKeyboardSwitcher = KeyboardSwitcher.getInstance(); - sSubtypeSwitcher = SubtypeSwitcher.getInstance(); } public static PointerTracker getPointerTracker(final int id, KeyEventHandler handler) { @@ -436,7 +428,6 @@ public class PointerTracker { mKeyAlreadyProcessed = false; mIsRepeatableKey = false; mIsInSlidingKeyInput = false; - mIsInSlidingLanguageSwitch = false; mIgnoreModifierKey = false; if (isValidKeyIndex(keyIndex)) { // This onPress call may have changed keyboard layout. Those cases are detected at @@ -464,12 +455,6 @@ public class PointerTracker { if (mKeyAlreadyProcessed) return; - // TODO: Remove this hacking code - if (mIsInSlidingLanguageSwitch) { - ((LatinKeyboard)mKeyboard).updateSpacebarPreviewIcon(x - mKeyX); - showKeyPreview(mSpaceKeyIndex); - return; - } final int lastX = mLastX; final int lastY = mLastY; final int oldKeyIndex = mKeyIndex; @@ -527,26 +512,6 @@ public class PointerTracker { } } } - // TODO: Remove this hack code - else if (isSpaceKey(keyIndex) && !mIsInSlidingLanguageSwitch - && mKeyboard instanceof LatinKeyboard) { - final LatinKeyboard keyboard = ((LatinKeyboard)mKeyboard); - if (sSubtypeSwitcher.useSpacebarLanguageSwitcher() - && sSubtypeSwitcher.getEnabledKeyboardLocaleCount() > 1) { - final int diff = x - mKeyX; - if (keyboard.shouldTriggerSpacebarSlidingLanguageSwitch(diff)) { - // Detect start sliding language switch. - mIsInSlidingLanguageSwitch = true; - mSpaceKeyIndex = keyIndex; - keyboard.updateSpacebarPreviewIcon(diff); - // Display spacebar slide language switcher. - showKeyPreview(keyIndex); - final PointerTrackerQueue queue = sPointerTrackerQueue; - if (queue != null) - queue.releaseAllPointersExcept(this, eventTime, true); - } - } - } } else { if (oldKey != null && isMajorEnoughMoveToBeOnNewKey(x, y, keyIndex)) { // The pointer has been slid out from the previous key, we must call onRelease() to @@ -613,20 +578,6 @@ public class PointerTracker { setReleasedKeyGraphics(keyIndex); if (mKeyAlreadyProcessed) return; - // TODO: Remove this hacking code - if (mIsInSlidingLanguageSwitch) { - setReleasedKeyGraphics(mSpaceKeyIndex); - final int languageDir = ((LatinKeyboard)mKeyboard).getLanguageChangeDirection(); - if (languageDir != 0) { - final int code = (languageDir == 1) - ? LatinKeyboard.CODE_NEXT_LANGUAGE : LatinKeyboard.CODE_PREV_LANGUAGE; - // This will change keyboard layout. - mListener.onCodeInput(code, new int[] {code}, keyX, keyY); - } - mIsInSlidingLanguageSwitch = false; - ((LatinKeyboard)mKeyboard).setSpacebarSlidingLanguageSwitchDiff(0); - return; - } if (!mIsRepeatableKey) { detectAndSendKey(keyIndex, keyX, keyY); } @@ -700,9 +651,6 @@ public class PointerTracker { final Key key = getKey(keyIndex); if (key == null || !key.isEnabled()) return true; - // Such as spacebar sliding language switch. - if (mKeyboard.needSpacebarPreview(keyIndex)) - return false; final int code = key.mCode; return isModifierCode(code) || code == Keyboard.CODE_DELETE || code == Keyboard.CODE_ENTER || code == Keyboard.CODE_SPACE; diff --git a/java/src/com/android/inputmethod/keyboard/internal/KeyboardIconsSet.java b/java/src/com/android/inputmethod/keyboard/internal/KeyboardIconsSet.java index 535a6954c..6256e7fbd 100644 --- a/java/src/com/android/inputmethod/keyboard/internal/KeyboardIconsSet.java +++ b/java/src/com/android/inputmethod/keyboard/internal/KeyboardIconsSet.java @@ -35,7 +35,7 @@ public class KeyboardIconsSet { private static final int ICON_TO_SYMBOL_KEY_WITH_SHORTCUT = 3; private static final int ICON_DELETE_KEY = 4; private static final int ICON_DELETE_RTL_KEY = 5; - private static final int ICON_SETTINGS_KEY = 6; + private static final int ICON_SETTINGS_KEY = 6; // This is also represented as "@icon/6" in xml. private static final int ICON_SHORTCUT_KEY = 7; private static final int ICON_SPACE_KEY = 8; private static final int ICON_RETURN_KEY = 9; @@ -44,12 +44,11 @@ public class KeyboardIconsSet { // This should be aligned with Keyboard.keyIconShifted enum. private static final int ICON_SHIFTED_SHIFT_KEY = 12; // This should be aligned with Keyboard.keyIconPreview enum. - private static final int ICON_PREVIEW_SPACE_KEY = 13; - private static final int ICON_PREVIEW_TAB_KEY = 14; - private static final int ICON_PREVIEW_SETTINGS_KEY = 15; - private static final int ICON_PREVIEW_SHORTCUT_KEY = 16; + private static final int ICON_PREVIEW_TAB_KEY = 13; + private static final int ICON_PREVIEW_SETTINGS_KEY = 14; + private static final int ICON_PREVIEW_SHORTCUT_KEY = 15; - private static final int ICON_LAST = 16; + private static final int ICON_LAST = 15; private final Drawable mIcons[] = new Drawable[ICON_LAST + 1]; @@ -79,8 +78,6 @@ public class KeyboardIconsSet { return ICON_TAB_KEY; case R.styleable.Keyboard_iconShiftedShiftKey: return ICON_SHIFTED_SHIFT_KEY; - case R.styleable.Keyboard_iconPreviewSpaceKey: - return ICON_PREVIEW_SPACE_KEY; case R.styleable.Keyboard_iconPreviewTabKey: return ICON_PREVIEW_TAB_KEY; case R.styleable.Keyboard_iconPreviewSettingsKey: diff --git a/java/src/com/android/inputmethod/keyboard/internal/SlidingLocaleDrawable.java b/java/src/com/android/inputmethod/keyboard/internal/SlidingLocaleDrawable.java deleted file mode 100644 index ef3ea4c12..000000000 --- a/java/src/com/android/inputmethod/keyboard/internal/SlidingLocaleDrawable.java +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Copyright (C) 2010 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not - * use this file except in compliance with the License. You may obtain a copy of - * the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations under - * the License. - */ - -package com.android.inputmethod.keyboard.internal; - -import android.content.Context; -import android.content.res.TypedArray; -import android.graphics.Canvas; -import android.graphics.Color; -import android.graphics.ColorFilter; -import android.graphics.Paint; -import android.graphics.Paint.Align; -import android.graphics.PixelFormat; -import android.graphics.drawable.Drawable; -import android.text.TextPaint; -import android.view.ViewConfiguration; - -import com.android.inputmethod.keyboard.Keyboard; -import com.android.inputmethod.keyboard.LatinKeyboard; -import com.android.inputmethod.latin.R; -import com.android.inputmethod.latin.SubtypeSwitcher; - -/** - * Animation to be displayed on the spacebar preview popup when switching languages by swiping the - * spacebar. It draws the current, previous and next languages and moves them by the delta of touch - * movement on the spacebar. - */ -public class SlidingLocaleDrawable extends Drawable { - private static final int SLIDE_SPEED_MULTIPLIER_RATIO = 150; - private final int mWidth; - private final int mHeight; - private final Drawable mBackground; - private final int mSpacebarTextColor; - private final TextPaint mTextPaint; - private final int mMiddleX; - private final boolean mDrawArrows; - private final int mThreshold; - - private int mDiff; - private boolean mHitThreshold; - private String mCurrentLanguage; - private String mNextLanguage; - private String mPrevLanguage; - - public SlidingLocaleDrawable(Context context, Drawable background, int width, int height) { - mBackground = background; - Keyboard.setDefaultBounds(background); - mWidth = width; - mHeight = height; - final TextPaint textPaint = new TextPaint(); - textPaint.setTextSize(LatinKeyboard.getTextSizeFromTheme( - context.getTheme(), android.R.style.TextAppearance_Medium, 18)); - textPaint.setColor(Color.TRANSPARENT); - textPaint.setAntiAlias(true); - mTextPaint = textPaint; - mMiddleX = (background != null) ? (mWidth - mBackground.getIntrinsicWidth()) / 2 : 0; - - final TypedArray a = context.obtainStyledAttributes( - null, R.styleable.KeyboardView, R.attr.keyboardViewStyle, R.style.KeyboardView); - mSpacebarTextColor = a.getColor(R.styleable.KeyboardView_keyPreviewTextColor, 0); - final int spacebarPreviewBackrgound = a.getResourceId( - R.styleable.KeyboardView_keyPreviewSpacebarBackground, 0); - // If spacebar preview background is transparent, we need not draw arrows. - mDrawArrows = (spacebarPreviewBackrgound != R.drawable.transparent); - a.recycle(); - - mThreshold = ViewConfiguration.get(context).getScaledTouchSlop(); - } - - public void setDiff(int diff) { - if (diff == Integer.MAX_VALUE) { - mHitThreshold = false; - mCurrentLanguage = null; - return; - } - mDiff = Math.max(diff, diff * SLIDE_SPEED_MULTIPLIER_RATIO / 100); - if (mDiff > mWidth) mDiff = mWidth; - if (mDiff < -mWidth) mDiff = -mWidth; - if (Math.abs(mDiff) > mThreshold) mHitThreshold = true; - invalidateSelf(); - } - - - @Override - public void draw(Canvas canvas) { - canvas.save(); - if (mHitThreshold) { - Paint paint = mTextPaint; - final int width = mWidth; - final int height = mHeight; - final int diff = mDiff; - canvas.clipRect(0, 0, width, height); - if (mCurrentLanguage == null) { - SubtypeSwitcher subtypeSwitcher = SubtypeSwitcher.getInstance(); - mCurrentLanguage = subtypeSwitcher.getInputLanguageName(); - mNextLanguage = subtypeSwitcher.getNextInputLanguageName(); - mPrevLanguage = subtypeSwitcher.getPreviousInputLanguageName(); - } - // Draw language text. - final float baseline = mHeight * LatinKeyboard.SPACEBAR_LANGUAGE_BASELINE - - paint.descent(); - paint.setColor(mSpacebarTextColor); - paint.setTextAlign(Align.CENTER); - canvas.drawText(mCurrentLanguage, width / 2 + diff, baseline, paint); - canvas.drawText(mNextLanguage, diff - width / 2, baseline, paint); - canvas.drawText(mPrevLanguage, diff + width + width / 2, baseline, paint); - if (mDrawArrows) { - paint.setTextAlign(Align.LEFT); - canvas.drawText(LatinKeyboard.ARROW_LEFT, 0, baseline, paint); - paint.setTextAlign(Align.RIGHT); - canvas.drawText(LatinKeyboard.ARROW_RIGHT, width, baseline, paint); - } - } - if (mBackground != null) { - canvas.translate(mMiddleX, 0); - mBackground.draw(canvas); - } - canvas.restore(); - } - - @Override - public int getOpacity() { - return PixelFormat.TRANSLUCENT; - } - - @Override - public void setAlpha(int alpha) { - // Ignore - } - - @Override - public void setColorFilter(ColorFilter cf) { - // Ignore - } - - @Override - public int getIntrinsicWidth() { - return mWidth; - } - - @Override - public int getIntrinsicHeight() { - return mHeight; - } -} diff --git a/java/src/com/android/inputmethod/latin/DebugSettings.java b/java/src/com/android/inputmethod/latin/DebugSettings.java index fd62d61c3..2f1e7c2b8 100644 --- a/java/src/com/android/inputmethod/latin/DebugSettings.java +++ b/java/src/com/android/inputmethod/latin/DebugSettings.java @@ -33,7 +33,6 @@ public class DebugSettings extends PreferenceActivity private boolean mServiceNeedsRestart = false; private CheckBoxPreference mDebugMode; - private CheckBoxPreference mUseSpacebarLanguageSwitch; @Override protected void onCreate(Bundle icicle) { @@ -61,13 +60,6 @@ public class DebugSettings extends PreferenceActivity updateDebugMode(); mServiceNeedsRestart = true; } - } else if (key.equals(SubtypeSwitcher.USE_SPACEBAR_LANGUAGE_SWITCH_KEY)) { - if (mUseSpacebarLanguageSwitch != null) { - mUseSpacebarLanguageSwitch.setChecked( - prefs.getBoolean(SubtypeSwitcher.USE_SPACEBAR_LANGUAGE_SWITCH_KEY, - getResources().getBoolean( - R.bool.config_use_spacebar_language_switcher))); - } } } diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 29cf63de4..5d8fd3411 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -357,7 +357,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar LatinImeLogger.init(this, prefs); LanguageSwitcherProxy.init(this, prefs); InputMethodManagerCompatWrapper.init(this); - SubtypeSwitcher.init(this, prefs); + SubtypeSwitcher.init(this); KeyboardSwitcher.init(this, prefs); Recorrection.init(this, prefs); AccessibilityUtils.init(this, prefs); @@ -1130,12 +1130,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar case Keyboard.CODE_SETTINGS_LONGPRESS: onSettingsKeyLongPressed(); break; - case LatinKeyboard.CODE_NEXT_LANGUAGE: - toggleLanguage(true); - break; - case LatinKeyboard.CODE_PREV_LANGUAGE: - toggleLanguage(false); - break; case Keyboard.CODE_CAPSLOCK: switcher.toggleCapsLock(); break; @@ -1907,17 +1901,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar mKeyboardSwitcher.updateShiftState(); } - // "reset" and "next" are used only for USE_SPACEBAR_LANGUAGE_SWITCHER. - private void toggleLanguage(boolean next) { - if (mSubtypeSwitcher.useSpacebarLanguageSwitcher()) { - mSubtypeSwitcher.toggleLanguage(next); - } - // The following is necessary because on API levels < 10, we don't get notified when - // subtype changes. - if (!CAN_HANDLE_ON_CURRENT_INPUT_METHOD_SUBTYPE_CHANGED) - onRefreshKeyboard(); - } - @Override public void onPress(int primaryCode, boolean withSliding) { if (mKeyboardSwitcher.isVibrateAndSoundFeedbackRequired()) { diff --git a/java/src/com/android/inputmethod/latin/SubtypeSwitcher.java b/java/src/com/android/inputmethod/latin/SubtypeSwitcher.java index 7f13643ae..6580cbc08 100644 --- a/java/src/com/android/inputmethod/latin/SubtypeSwitcher.java +++ b/java/src/com/android/inputmethod/latin/SubtypeSwitcher.java @@ -16,16 +16,8 @@ package com.android.inputmethod.latin; -import com.android.inputmethod.compat.InputMethodInfoCompatWrapper; -import com.android.inputmethod.compat.InputMethodManagerCompatWrapper; -import com.android.inputmethod.compat.InputMethodSubtypeCompatWrapper; -import com.android.inputmethod.deprecated.VoiceProxy; -import com.android.inputmethod.keyboard.KeyboardSwitcher; -import com.android.inputmethod.keyboard.LatinKeyboard; - import android.content.Context; import android.content.Intent; -import android.content.SharedPreferences; import android.content.pm.PackageManager; import android.content.res.Configuration; import android.content.res.Resources; @@ -37,6 +29,13 @@ import android.os.IBinder; import android.text.TextUtils; import android.util.Log; +import com.android.inputmethod.compat.InputMethodInfoCompatWrapper; +import com.android.inputmethod.compat.InputMethodManagerCompatWrapper; +import com.android.inputmethod.compat.InputMethodSubtypeCompatWrapper; +import com.android.inputmethod.deprecated.VoiceProxy; +import com.android.inputmethod.keyboard.KeyboardSwitcher; +import com.android.inputmethod.keyboard.LatinKeyboard; + import java.util.ArrayList; import java.util.Arrays; import java.util.List; @@ -52,7 +51,6 @@ public class SubtypeSwitcher { private static final String VOICE_MODE = "voice"; private static final String SUBTYPE_EXTRAVALUE_REQUIRE_NETWORK_CONNECTIVITY = "requireNetworkConnectivity"; - public static final String USE_SPACEBAR_LANGUAGE_SWITCH_KEY = "use_spacebar_language_switch"; private final TextUtils.SimpleStringSplitter mLocaleSplitter = new TextUtils.SimpleStringSplitter(LOCALE_SEPARATER); @@ -62,13 +60,10 @@ public class SubtypeSwitcher { private /* final */ InputMethodManagerCompatWrapper mImm; private /* final */ Resources mResources; private /* final */ ConnectivityManager mConnectivityManager; - private /* final */ boolean mConfigUseSpacebarLanguageSwitcher; - private /* final */ SharedPreferences mPrefs; private final ArrayList mEnabledKeyboardSubtypesOfCurrentInputMethod = new ArrayList(); private final ArrayList mEnabledLanguagesOfCurrentInputMethod = new ArrayList(); - private final LanguageBarInfo mLanguageBarInfo = new LanguageBarInfo(); /*-----------------------------------------------------------*/ // Variants which should be changed only by reload functions. @@ -81,7 +76,6 @@ public class SubtypeSwitcher { private Locale mSystemLocale; private Locale mInputLocale; private String mInputLocaleStr; - private String mInputMethodId; private VoiceProxy.VoiceInputWrapper mVoiceInputWrapper; /*-----------------------------------------------------------*/ @@ -91,9 +85,9 @@ public class SubtypeSwitcher { return sInstance; } - public static void init(LatinIME service, SharedPreferences prefs) { + public static void init(LatinIME service) { SubtypeLocale.init(service); - sInstance.initialize(service, prefs); + sInstance.initialize(service); sInstance.updateAllParameters(); } @@ -101,7 +95,7 @@ public class SubtypeSwitcher { // Intentional empty constructor for singleton. } - private void initialize(LatinIME service, SharedPreferences prefs) { + private void initialize(LatinIME service) { mService = service; mResources = service.getResources(); mImm = InputMethodManagerCompatWrapper.getInstance(); @@ -115,11 +109,9 @@ public class SubtypeSwitcher { mCurrentSubtype = null; mAllEnabledSubtypesOfCurrentInputMethod = null; mVoiceInputWrapper = null; - mPrefs = prefs; final NetworkInfo info = mConnectivityManager.getActiveNetworkInfo(); mIsNetworkConnected = (info != null && info.isConnected()); - mInputMethodId = Utils.getInputMethodId(mImm, service.getPackageName()); } // Update all parameters stored in SubtypeSwitcher. @@ -133,9 +125,6 @@ public class SubtypeSwitcher { // Update parameters which are changed outside LatinIME. This parameters affect UI so they // should be updated every time onStartInputview. public void updateParametersOnStartInputView() { - mConfigUseSpacebarLanguageSwitcher = mPrefs.getBoolean(USE_SPACEBAR_LANGUAGE_SWITCH_KEY, - mService.getResources().getBoolean( - R.bool.config_use_spacebar_language_switcher)); updateEnabledSubtypes(); updateShortcutIME(); } @@ -170,10 +159,6 @@ public class SubtypeSwitcher { Log.w(TAG, "Last subtype was disabled. Update to the current one."); } updateSubtype(mImm.getCurrentInputMethodSubtype()); - } else { - // mLanguageBarInfo.update() will be called in updateSubtype so there is no need - // to call this in the if-clause above. - mLanguageBarInfo.update(); } } @@ -273,7 +258,6 @@ public class SubtypeSwitcher { mVoiceInputWrapper.reset(); } } - mLanguageBarInfo.update(); } // Update the current input locale from Locale string. @@ -427,10 +411,6 @@ public class SubtypeSwitcher { return mEnabledKeyboardSubtypesOfCurrentInputMethod.size(); } - public boolean useSpacebarLanguageSwitcher() { - return mConfigUseSpacebarLanguageSwitcher; - } - public boolean needsToDisplayLanguage() { return mNeedsToDisplayLanguage; } @@ -508,75 +488,6 @@ public class SubtypeSwitcher { KeyboardSwitcher.getInstance().getKeyboardView().getWindowToken()); } - ////////////////////////////////////// - // Spacebar Language Switch support // - ////////////////////////////////////// - - private class LanguageBarInfo { - private int mCurrentKeyboardSubtypeIndex; - private InputMethodSubtypeCompatWrapper mNextKeyboardSubtype; - private InputMethodSubtypeCompatWrapper mPreviousKeyboardSubtype; - private String mNextLanguage; - private String mPreviousLanguage; - public LanguageBarInfo() { - update(); - } - - private String getNextLanguage() { - return mNextLanguage; - } - - private String getPreviousLanguage() { - return mPreviousLanguage; - } - - public InputMethodSubtypeCompatWrapper getNextKeyboardSubtype() { - return mNextKeyboardSubtype; - } - - public InputMethodSubtypeCompatWrapper getPreviousKeyboardSubtype() { - return mPreviousKeyboardSubtype; - } - - public void update() { - if (!mConfigUseSpacebarLanguageSwitcher - || mEnabledKeyboardSubtypesOfCurrentInputMethod == null - || mEnabledKeyboardSubtypesOfCurrentInputMethod.size() == 0) return; - mCurrentKeyboardSubtypeIndex = getCurrentIndex(); - mNextKeyboardSubtype = getNextKeyboardSubtypeInternal(mCurrentKeyboardSubtypeIndex); - Locale locale = Utils.constructLocaleFromString(mNextKeyboardSubtype.getLocale()); - mNextLanguage = getFullDisplayName(locale, true); - mPreviousKeyboardSubtype = getPreviousKeyboardSubtypeInternal( - mCurrentKeyboardSubtypeIndex); - locale = Utils.constructLocaleFromString(mPreviousKeyboardSubtype.getLocale()); - mPreviousLanguage = getFullDisplayName(locale, true); - } - - private int normalize(int index) { - final int N = mEnabledKeyboardSubtypesOfCurrentInputMethod.size(); - final int ret = index % N; - return ret < 0 ? ret + N : ret; - } - - private int getCurrentIndex() { - final int N = mEnabledKeyboardSubtypesOfCurrentInputMethod.size(); - for (int i = 0; i < N; ++i) { - if (mEnabledKeyboardSubtypesOfCurrentInputMethod.get(i).equals(mCurrentSubtype)) { - return i; - } - } - return 0; - } - - private InputMethodSubtypeCompatWrapper getNextKeyboardSubtypeInternal(int index) { - return mEnabledKeyboardSubtypesOfCurrentInputMethod.get(normalize(index + 1)); - } - - private InputMethodSubtypeCompatWrapper getPreviousKeyboardSubtypeInternal(int index) { - return mEnabledKeyboardSubtypesOfCurrentInputMethod.get(normalize(index - 1)); - } - } - public static String getFullDisplayName(Locale locale, boolean returnsNameInThisLocale) { if (returnsNameInThisLocale) { return toTitleCase(SubtypeLocale.getFullDisplayName(locale), locale); @@ -609,14 +520,6 @@ public class SubtypeSwitcher { return getDisplayLanguage(getInputLocale()); } - public String getNextInputLanguageName() { - return mLanguageBarInfo.getNextLanguage(); - } - - public String getPreviousInputLanguageName() { - return mLanguageBarInfo.getPreviousLanguage(); - } - ///////////////////////////// // Other utility functions // ///////////////////////////// @@ -653,24 +556,4 @@ public class SubtypeSwitcher { supportedLocalesString.split("\\s+")); return voiceInputSupportedLocales.contains(locale); } - - private void changeToNextSubtype() { - final InputMethodSubtypeCompatWrapper subtype = - mLanguageBarInfo.getNextKeyboardSubtype(); - switchToTargetIME(mInputMethodId, subtype); - } - - private void changeToPreviousSubtype() { - final InputMethodSubtypeCompatWrapper subtype = - mLanguageBarInfo.getPreviousKeyboardSubtype(); - switchToTargetIME(mInputMethodId, subtype); - } - - public void toggleLanguage(boolean next) { - if (next) { - changeToNextSubtype(); - } else { - changeToPreviousSubtype(); - } - } }