diff options
| -rw-r--r-- | res/values-cs/strings.xml | 9 | ||||
| -rw-r--r-- | res/values-de/strings.xml | 9 | ||||
| -rw-r--r-- | res/values-es/strings.xml | 9 | ||||
| -rw-r--r-- | res/values-fa/strings.xml | 9 | ||||
| -rw-r--r-- | res/values-fr/strings.xml | 9 | ||||
| -rw-r--r-- | res/values-it/strings.xml | 9 | ||||
| -rw-r--r-- | res/values-ko/strings.xml | 9 | ||||
| -rw-r--r-- | res/values-lv/strings.xml | 9 | ||||
| -rw-r--r-- | res/values-pl/strings.xml | 9 | ||||
| -rw-r--r-- | res/values-pt/strings.xml | 9 | ||||
| -rw-r--r-- | res/values-ro/strings.xml | 9 | ||||
| -rw-r--r-- | res/values-ru/strings.xml | 9 | ||||
| -rw-r--r-- | res/values-tr/strings.xml | 9 | ||||
| -rw-r--r-- | res/values-vi/strings.xml | 9 | ||||
| -rw-r--r-- | res/values-zh-rCN/strings.xml | 9 | ||||
| -rw-r--r-- | res/values/arrays.xml | 14 | ||||
| -rw-r--r-- | res/values/strings.xml | 9 | ||||
| -rw-r--r-- | res/xml/settings.xml | 3 | ||||
| -rw-r--r-- | srcs/juloo.keyboard2/Config.java | 9 | ||||
| -rw-r--r-- | srcs/juloo.keyboard2/Keyboard2View.java | 2 | ||||
| -rw-r--r-- | srcs/juloo.keyboard2/VibratorCompat.java | 55 |
21 files changed, 52 insertions, 175 deletions
diff --git a/res/values-cs/strings.xml b/res/values-cs/strings.xml index 6e0ec1d..351bfbc 100644 --- a/res/values-cs/strings.xml +++ b/res/values-cs/strings.xml @@ -42,8 +42,8 @@ <string name="pref_autocapitalisation_summary">Stiskne Shift na začátku věty</string> <string name="pref_switch_input_immediate_title">Přepnout na posledně užívanou klávesnici</string> <string name="pref_switch_input_immediate_summary">Jak bude klávesa pro přepnutí klávesnice reagovat</string> - <string name="pref_vibrate_title">Vibrace</string> - <string name="pref_vibrate_summary">Preference intenzity vibrací při stisku klávesy</string> + <!-- <string name="pref_vibrate_custom">Custom vibration</string> --> + <!-- <string name="pref_vibrate_duration_title">Vibration intensity</string> --> <string name="pref_pin_entry_enabled_title">Rozvržení zadávání PIN kódu</string> <string name="pref_pin_entry_enabled_summary">Automaticky při psaní čísel, datumů a telefonních čísel</string> <string name="pref_category_style">Styl</string> @@ -69,11 +69,6 @@ <string name="pref_swipe_dist_e_very_far">Velmi dlouhá</string> <string name="pref_key_horizontal_space">Horizontální mezery mezi klávesami</string> <string name="pref_key_vertical_space">Vertikální mezery mezi klávesami</string> - <string name="pref_vibration_e_disabled">Deaktivovány</string> - <string name="pref_vibration_e_system">Dle systému</string> - <string name="pref_vibration_e_strong">Silné</string> - <string name="pref_vibration_e_medium">Střední</string> - <string name="pref_vibration_e_light">Slabé</string> <string name="key_action_next">Další</string> <string name="key_action_done">Dokončit</string> <string name="key_action_go">Spustit</string> diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml index b454cc6..0d988ab 100644 --- a/res/values-de/strings.xml +++ b/res/values-de/strings.xml @@ -42,8 +42,8 @@ <string name="pref_autocapitalisation_summary">Umschalttaste am Satzanfang aktivieren</string> <string name="pref_switch_input_immediate_title">Sofort zur nächsten Tastatur wechseln</string> <string name="pref_switch_input_immediate_summary">Verhalten der Tastaturumschalttaste</string> - <string name="pref_vibrate_title">Vibration</string> - <string name="pref_vibrate_summary">Vibration bei Tastendruck ein-/ausschalten</string> + <!-- <string name="pref_vibrate_custom">Custom vibration</string> --> + <!-- <string name="pref_vibrate_duration_title">Vibration intensity</string> --> <string name="pref_pin_entry_enabled_title">PIN-Eingabe-Layout</string> <string name="pref_pin_entry_enabled_summary">Für die Nummern-, Datums- und Telefonnummern-Eingabe</string> <string name="pref_category_style">Design</string> @@ -69,11 +69,6 @@ <string name="pref_swipe_dist_e_very_far">Sehr weit</string> <string name="pref_key_horizontal_space">Horizontaler Abstand zwischen den Tasten</string> <string name="pref_key_vertical_space">Vertikaler Abstand zwischen den Tasten</string> - <string name="pref_vibration_e_disabled">Deaktiviert</string> - <string name="pref_vibration_e_system">System</string> - <string name="pref_vibration_e_strong">Stark</string> - <string name="pref_vibration_e_medium">Mittel</string> - <string name="pref_vibration_e_light">Schwach</string> <string name="key_action_next">Nächstes</string> <string name="key_action_done">Fertig</string> <string name="key_action_go">Los</string> diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml index d8b7ea9..077111c 100644 --- a/res/values-es/strings.xml +++ b/res/values-es/strings.xml @@ -42,8 +42,8 @@ <string name="pref_autocapitalisation_summary">Presionar Mayús al principio de una oración</string> <string name="pref_switch_input_immediate_title">Cambiar al último teclado usado</string> <string name="pref_switch_input_immediate_summary">Comportamiento de la tecla para cambiar diseño</string> - <string name="pref_vibrate_title">Vibración</string> - <string name="pref_vibrate_summary">Habilitar/deshabilitar vibración al presionar una tecla</string> + <!-- <string name="pref_vibrate_custom">Custom vibration</string> --> + <!-- <string name="pref_vibrate_duration_title">Vibration intensity</string> --> <string name="pref_pin_entry_enabled_title">Diseño de introducción de PIN</string> <string name="pref_pin_entry_enabled_summary">Para escribir cifras, fechas y números telefónicos</string> <string name="pref_category_style">Estilo</string> @@ -69,11 +69,6 @@ <string name="pref_swipe_dist_e_very_far">Muy larga</string> <string name="pref_key_horizontal_space">Espaciado horizontal entre las teclas</string> <string name="pref_key_vertical_space">Espaciado vertical entre las teclas</string> - <string name="pref_vibration_e_disabled">Deshabilitada</string> - <string name="pref_vibration_e_system">Igual al sistema</string> - <string name="pref_vibration_e_strong">Fuerte</string> - <string name="pref_vibration_e_medium">Media</string> - <string name="pref_vibration_e_light">Suave</string> <string name="key_action_next">Siguiente</string> <string name="key_action_done">Hecho</string> <string name="key_action_go">Ir</string> diff --git a/res/values-fa/strings.xml b/res/values-fa/strings.xml index b8e7b96..78c51b6 100644 --- a/res/values-fa/strings.xml +++ b/res/values-fa/strings.xml @@ -42,8 +42,8 @@ <string name="pref_autocapitalisation_summary">در شروع جملات دگرساز را فشار دهید</string> <string name="pref_switch_input_immediate_title">انتقال به آخرین صفحه کلید استفاده شده</string> <string name="pref_switch_input_immediate_summary">رفتار کلید تغییردهنده صفحه کلید</string> - <string name="pref_vibrate_title">لرزش</string> - <string name="pref_vibrate_summary">فعال/غیرفعال کردن لرزش در زمان فشار دادن کلیدها</string> + <!-- <string name="pref_vibrate_custom">Custom vibration</string> --> + <!-- <string name="pref_vibrate_duration_title">Vibration intensity</string> --> <!-- <string name="pref_pin_entry_enabled_title">Pin entry layout</string> --> <!-- <string name="pref_pin_entry_enabled_summary">When typing numbers, dates and phone numbers</string> --> <string name="pref_category_style">سبک</string> @@ -69,11 +69,6 @@ <string name="pref_swipe_dist_e_very_far">بسیار دور</string> <string name="pref_key_horizontal_space">فاصله افقی بین کلیدها</string> <string name="pref_key_vertical_space">فاصله عمودی بین کلیدها</string> - <!-- <string name="pref_vibration_e_disabled">Disabled</string> --> - <!-- <string name="pref_vibration_e_system">System</string> --> - <!-- <string name="pref_vibration_e_strong">Strong</string> --> - <!-- <string name="pref_vibration_e_medium">Medium</string> --> - <!-- <string name="pref_vibration_e_light">Light</string> --> <string name="key_action_next">بعدی</string> <string name="key_action_done">اتمام</string> <string name="key_action_go">برو</string> diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml index f1bb9c3..1028a8f 100644 --- a/res/values-fr/strings.xml +++ b/res/values-fr/strings.xml @@ -42,8 +42,8 @@ <string name="pref_autocapitalisation_summary">Activer Shift au début des phrases</string> <string name="pref_switch_input_immediate_title">Changer vers le clavier utilisé en dernier</string> <string name="pref_switch_input_immediate_summary">Comportement de la touche de changement de clavier</string> - <string name="pref_vibrate_title">Vibreur</string> - <string name="pref_vibrate_summary">Vibration a chaque touche</string> + <!-- <string name="pref_vibrate_custom">Custom vibration</string> --> + <!-- <string name="pref_vibrate_duration_title">Vibration intensity</string> --> <string name="pref_pin_entry_enabled_title">Clavier PIN</string> <string name="pref_pin_entry_enabled_summary">Lors de la saisie de nombres, de dates et de numéros de téléphone</string> <string name="pref_category_style">Style</string> @@ -69,11 +69,6 @@ <string name="pref_swipe_dist_e_very_far">Très longue</string> <string name="pref_key_horizontal_space">Espacement horizontal entre les touches</string> <string name="pref_key_vertical_space">Espacement vertical entre les touches</string> - <string name="pref_vibration_e_disabled">Désactivé</string> - <string name="pref_vibration_e_system">Système</string> - <string name="pref_vibration_e_strong">Fort</string> - <string name="pref_vibration_e_medium">Moyen</string> - <string name="pref_vibration_e_light">Léger</string> <string name="key_action_next">Suiv.</string> <string name="key_action_done">Fin</string> <string name="key_action_go">Aller</string> diff --git a/res/values-it/strings.xml b/res/values-it/strings.xml index 5ee8ec4..b237254 100644 --- a/res/values-it/strings.xml +++ b/res/values-it/strings.xml @@ -42,8 +42,8 @@ <string name="pref_autocapitalisation_summary">Premi Shift all\'inizio di una frase</string> <!-- <string name="pref_switch_input_immediate_title">Switch to the last used keyboard</string> --> <!-- <string name="pref_switch_input_immediate_summary">Behavior of the keyboard-switching key</string> --> - <string name="pref_vibrate_title">Vibrazione</string> - <string name="pref_vibrate_summary">Abilita/Disabilita Vibrazione alla pressione dei tasti</string> + <!-- <string name="pref_vibrate_custom">Custom vibration</string> --> + <!-- <string name="pref_vibrate_duration_title">Vibration intensity</string> --> <!-- <string name="pref_pin_entry_enabled_title">Pin entry layout</string> --> <!-- <string name="pref_pin_entry_enabled_summary">When typing numbers, dates and phone numbers</string> --> <string name="pref_category_style">Stile</string> @@ -69,11 +69,6 @@ <string name="pref_swipe_dist_e_very_far">Molto distante</string> <string name="pref_key_horizontal_space">Spazio orizzontale tra i tasti</string> <string name="pref_key_vertical_space">Spazio verticale tra i tasti</string> - <!-- <string name="pref_vibration_e_disabled">Disabled</string> --> - <!-- <string name="pref_vibration_e_system">System</string> --> - <!-- <string name="pref_vibration_e_strong">Strong</string> --> - <!-- <string name="pref_vibration_e_medium">Medium</string> --> - <!-- <string name="pref_vibration_e_light">Light</string> --> <string name="key_action_next">Prossimo</string> <string name="key_action_done">Fatto</string> <string name="key_action_go">Vai</string> diff --git a/res/values-ko/strings.xml b/res/values-ko/strings.xml index 5e023b4..9b3f659 100644 --- a/res/values-ko/strings.xml +++ b/res/values-ko/strings.xml @@ -42,8 +42,8 @@ <!-- <string name="pref_autocapitalisation_summary">Press Shift at the beginning of a sentence</string> --> <!-- <string name="pref_switch_input_immediate_title">Switch to the last used keyboard</string> --> <!-- <string name="pref_switch_input_immediate_summary">Behavior of the keyboard-switching key</string> --> - <string name="pref_vibrate_title">진동</string> - <string name="pref_vibrate_summary">키 누를 때 진동 키거/끄기</string> + <!-- <string name="pref_vibrate_custom">Custom vibration</string> --> + <!-- <string name="pref_vibrate_duration_title">Vibration intensity</string> --> <!-- <string name="pref_pin_entry_enabled_title">Pin entry layout</string> --> <!-- <string name="pref_pin_entry_enabled_summary">When typing numbers, dates and phone numbers</string> --> <string name="pref_category_style">스타일</string> @@ -69,11 +69,6 @@ <string name="pref_swipe_dist_e_very_far">매우 넓음</string> <string name="pref_key_horizontal_space">키보드 양 옆 간격</string> <string name="pref_key_vertical_space">키보드 세로 간격</string> - <!-- <string name="pref_vibration_e_disabled">Disabled</string> --> - <!-- <string name="pref_vibration_e_system">System</string> --> - <!-- <string name="pref_vibration_e_strong">Strong</string> --> - <!-- <string name="pref_vibration_e_medium">Medium</string> --> - <!-- <string name="pref_vibration_e_light">Light</string> --> <string name="key_action_next">다음</string> <string name="key_action_done">확인</string> <string name="key_action_go">Go</string> diff --git a/res/values-lv/strings.xml b/res/values-lv/strings.xml index 4a80a2c..8c3234f 100644 --- a/res/values-lv/strings.xml +++ b/res/values-lv/strings.xml @@ -42,8 +42,8 @@ <string name="pref_autocapitalisation_summary">Piespiest Shift teikuma sākumā</string> <string name="pref_switch_input_immediate_title">Pārslēgties uz pēdējo izmantoto tastatūru</string> <string name="pref_switch_input_immediate_summary">Tastatūras pārslēgšanas taustiņa uzvedība</string> - <string name="pref_vibrate_title">Trīcēšana</string> - <string name="pref_vibrate_summary">Iespējot/atspējot taustiņa piespiešanas trīcēšanu</string> + <!-- <string name="pref_vibrate_custom">Custom vibration</string> --> + <!-- <string name="pref_vibrate_duration_title">Vibration intensity</string> --> <string name="pref_pin_entry_enabled_title">Piespraust ievadīšanas izkārtojumu</string> <string name="pref_pin_entry_enabled_summary">Kad ievada skaitļus, datumus un tālruņa numurus</string> <string name="pref_category_style">Izskata pielāgojumi</string> @@ -69,11 +69,6 @@ <string name="pref_swipe_dist_e_very_far">Ļoti tāls</string> <string name="pref_key_horizontal_space">Līmeniskais attālums starp taustiņiem</string> <string name="pref_key_vertical_space">Stateniskais attālums starp taustiņiem</string> - <string name="pref_vibration_e_disabled">Atspējota</string> - <string name="pref_vibration_e_system">Sistēmas</string> - <string name="pref_vibration_e_strong">Spēcīga</string> - <string name="pref_vibration_e_medium">Vidēja</string> - <string name="pref_vibration_e_light">Vāja</string> <string name="key_action_next">Nākamais</string> <string name="key_action_done">Darīts</string> <string name="key_action_go">Aiziet</string> diff --git a/res/values-pl/strings.xml b/res/values-pl/strings.xml index 27bb10c..5639bc2 100644 --- a/res/values-pl/strings.xml +++ b/res/values-pl/strings.xml @@ -42,8 +42,8 @@ <string name="pref_autocapitalisation_summary">Naciśnij Shift na początku zdania</string> <string name="pref_switch_input_immediate_title">Przełącz na ostatnio używaną klawiaturę</string> <string name="pref_switch_input_immediate_summary">Działanie klawisza przełączającego klawiaturę</string> - <string name="pref_vibrate_title">Wibracje</string> - <string name="pref_vibrate_summary">Wł./wył. wibrację przy naciśnięciu klawisza</string> + <!-- <string name="pref_vibrate_custom">Custom vibration</string> --> + <!-- <string name="pref_vibrate_duration_title">Vibration intensity</string> --> <string name="pref_pin_entry_enabled_title">Układ klawiatury PIN</string> <string name="pref_pin_entry_enabled_summary">Podczas wpisywania liczb, dat i numerów telefonu</string> <string name="pref_category_style">Styl</string> @@ -69,11 +69,6 @@ <string name="pref_swipe_dist_e_very_far">Bardzo duża</string> <string name="pref_key_horizontal_space">Odległość pomiędzy klawiszami w poziomie</string> <string name="pref_key_vertical_space">Odległość pomiędzy klawiszami w pionie</string> - <string name="pref_vibration_e_disabled">Wyłączone</string> - <string name="pref_vibration_e_system">Systemowe</string> - <string name="pref_vibration_e_strong">Silne</string> - <string name="pref_vibration_e_medium">Normalne</string> - <string name="pref_vibration_e_light">Słabe</string> <string name="key_action_next">Dalej</string> <string name="key_action_done">OK</string> <string name="key_action_go">Przejdź</string> diff --git a/res/values-pt/strings.xml b/res/values-pt/strings.xml index d7dd843..c2d2629 100644 --- a/res/values-pt/strings.xml +++ b/res/values-pt/strings.xml @@ -42,8 +42,8 @@ <string name="pref_autocapitalisation_summary">Aciona o shift no início de cada frase</string> <string name="pref_switch_input_immediate_title">Alternar para o último teclado usado</string> <string name="pref_switch_input_immediate_summary">Comportamento da tecla de troca de teclado</string> - <string name="pref_vibrate_title">Vibração</string> - <string name="pref_vibrate_summary">Ativar/desativar vibração ao digitar</string> + <!-- <string name="pref_vibrate_custom">Custom vibration</string> --> + <!-- <string name="pref_vibrate_duration_title">Vibration intensity</string> --> <string name="pref_pin_entry_enabled_title">Layout PIN</string> <string name="pref_pin_entry_enabled_summary">Quando digitando números, datas ou números de telefone</string> <string name="pref_category_style">Estilo</string> @@ -69,11 +69,6 @@ <string name="pref_swipe_dist_e_very_far">Muito longo</string> <string name="pref_key_horizontal_space">Distância horizontal entre teclas</string> <string name="pref_key_vertical_space">Distância vertical entre teclas</string> - <string name="pref_vibration_e_disabled">Desabilitado</string> - <string name="pref_vibration_e_system">Sistema</string> - <string name="pref_vibration_e_strong">Intenso</string> - <string name="pref_vibration_e_medium">Médio</string> - <string name="pref_vibration_e_light">Suave</string> <string name="key_action_next">Próximo</string> <string name="key_action_done">Pronto</string> <string name="key_action_go">Ir</string> diff --git a/res/values-ro/strings.xml b/res/values-ro/strings.xml index a28e65f..6487dc8 100644 --- a/res/values-ro/strings.xml +++ b/res/values-ro/strings.xml @@ -42,8 +42,8 @@ <string name="pref_autocapitalisation_summary">Autoapăsare Shift la începutul fiecărei propoziții</string> <string name="pref_switch_input_immediate_title">Schimbă la ultima tastatură folosită</string> <string name="pref_switch_input_immediate_summary">Comportamentul tastei pentru schimbarea tastaturii</string> - <string name="pref_vibrate_title">Vibrație</string> - <string name="pref_vibrate_summary">Activați/dezactivați vibrația la apăsarea tastelor</string> + <!-- <string name="pref_vibrate_custom">Custom vibration</string> --> + <!-- <string name="pref_vibrate_duration_title">Vibration intensity</string> --> <!-- <string name="pref_pin_entry_enabled_title">Pin entry layout</string> --> <!-- <string name="pref_pin_entry_enabled_summary">When typing numbers, dates and phone numbers</string> --> <string name="pref_category_style">Stil</string> @@ -69,11 +69,6 @@ <string name="pref_swipe_dist_e_very_far">Foarte depărtată</string> <string name="pref_key_horizontal_space">Distanța orizontală dintre taste</string> <string name="pref_key_vertical_space">Distanța verticală dintre taste</string> - <!-- <string name="pref_vibration_e_disabled">Disabled</string> --> - <!-- <string name="pref_vibration_e_system">System</string> --> - <!-- <string name="pref_vibration_e_strong">Strong</string> --> - <!-- <string name="pref_vibration_e_medium">Medium</string> --> - <!-- <string name="pref_vibration_e_light">Light</string> --> <string name="key_action_next">Următor</string> <string name="key_action_done">Gata</string> <string name="key_action_go">Go</string> diff --git a/res/values-ru/strings.xml b/res/values-ru/strings.xml index 5b914b8..3ebb217 100644 --- a/res/values-ru/strings.xml +++ b/res/values-ru/strings.xml @@ -42,8 +42,8 @@ <string name="pref_autocapitalisation_summary">Автонажатие Shift в начале каждого предложения</string> <string name="pref_switch_input_immediate_title">Переключаться к последней используемой клавиатуре</string> <string name="pref_switch_input_immediate_summary">Поведение клавиши переключения клавиатуры</string> - <string name="pref_vibrate_title">Вибрация</string> - <string name="pref_vibrate_summary">Включение/выключение вибрации при нажатии клавиши</string> + <!-- <string name="pref_vibrate_custom">Custom vibration</string> --> + <!-- <string name="pref_vibrate_duration_title">Vibration intensity</string> --> <!-- <string name="pref_pin_entry_enabled_title">Pin entry layout</string> --> <!-- <string name="pref_pin_entry_enabled_summary">When typing numbers, dates and phone numbers</string> --> <string name="pref_category_style">Стиль</string> @@ -69,11 +69,6 @@ <string name="pref_swipe_dist_e_very_far">Очень далеко</string> <string name="pref_key_horizontal_space">Горизонтальное расстояние между клавишами</string> <string name="pref_key_vertical_space">Расстояние по вертикали между клавишами</string> - <!-- <string name="pref_vibration_e_disabled">Disabled</string> --> - <!-- <string name="pref_vibration_e_system">System</string> --> - <!-- <string name="pref_vibration_e_strong">Strong</string> --> - <!-- <string name="pref_vibration_e_medium">Medium</string> --> - <!-- <string name="pref_vibration_e_light">Light</string> --> <string name="key_action_next">Далее</string> <string name="key_action_done">Ввод</string> <string name="key_action_go">Go</string> diff --git a/res/values-tr/strings.xml b/res/values-tr/strings.xml index 9796a04..57f7af4 100644 --- a/res/values-tr/strings.xml +++ b/res/values-tr/strings.xml @@ -42,8 +42,8 @@ <string name="pref_autocapitalisation_summary">Noktadan sonra ve her cümlenin başında büyük harf yapar</string> <string name="pref_switch_input_immediate_title">Son kullanılan klavyeye geç</string> <string name="pref_switch_input_immediate_summary">Klavye değistirme tuşunun davranışını belirler</string> - <string name="pref_vibrate_title">Titreşim</string> - <string name="pref_vibrate_summary">Tuşlara basılınca titremeyi aç/kapat</string> + <!-- <string name="pref_vibrate_custom">Custom vibration</string> --> + <!-- <string name="pref_vibrate_duration_title">Vibration intensity</string> --> <string name="pref_pin_entry_enabled_title">NumPad</string> <string name="pref_pin_entry_enabled_summary">Sayıları, tarihleri ve telefon numaralarını yazarken</string> <string name="pref_category_style">Tarz</string> @@ -69,11 +69,6 @@ <string name="pref_swipe_dist_e_very_far">Çok uzun</string> <string name="pref_key_horizontal_space">Tuşlar arasındaki yatay boşluk</string> <string name="pref_key_vertical_space">Tuşlar arasındaki dikey boşluk</string> - <string name="pref_vibration_e_disabled">Aktif değil</string> - <string name="pref_vibration_e_system">Sistem</string> - <string name="pref_vibration_e_strong">Şiddetli</string> - <string name="pref_vibration_e_medium">Orta</string> - <string name="pref_vibration_e_light">Hafif</string> <string name="key_action_next">Sonraki</string> <string name="key_action_done">Tamam</string> <string name="key_action_go">ileri</string> diff --git a/res/values-vi/strings.xml b/res/values-vi/strings.xml index 4b01bed..800e6ea 100644 --- a/res/values-vi/strings.xml +++ b/res/values-vi/strings.xml @@ -42,8 +42,8 @@ <string name="pref_autocapitalisation_summary">Nhấn Shift ở đầu câu</string> <!-- <string name="pref_switch_input_immediate_title">Switch to the last used keyboard</string> --> <!-- <string name="pref_switch_input_immediate_summary">Behavior of the keyboard-switching key</string> --> - <string name="pref_vibrate_title">Sự rung</string> - <string name="pref_vibrate_summary">Bật/tắt rung khi nhấn</string> + <!-- <string name="pref_vibrate_custom">Custom vibration</string> --> + <!-- <string name="pref_vibrate_duration_title">Vibration intensity</string> --> <!-- <string name="pref_pin_entry_enabled_title">Pin entry layout</string> --> <!-- <string name="pref_pin_entry_enabled_summary">When typing numbers, dates and phone numbers</string> --> <string name="pref_category_style">Kiểu cách</string> @@ -69,11 +69,6 @@ <string name="pref_swipe_dist_e_very_far">Rất xa</string> <string name="pref_key_horizontal_space">Khoảng cách giữa các phím theo chiều ngang</string> <string name="pref_key_vertical_space">Khoảng cách giữa các phím theo chiều dọc</string> - <!-- <string name="pref_vibration_e_disabled">Disabled</string> --> - <!-- <string name="pref_vibration_e_system">System</string> --> - <!-- <string name="pref_vibration_e_strong">Strong</string> --> - <!-- <string name="pref_vibration_e_medium">Medium</string> --> - <!-- <string name="pref_vibration_e_light">Light</string> --> <string name="key_action_next">Tiếp</string> <string name="key_action_done">Xong</string> <string name="key_action_go">Đi</string> diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml index df8f65a..fb2f91d 100644 --- a/res/values-zh-rCN/strings.xml +++ b/res/values-zh-rCN/strings.xml @@ -42,8 +42,8 @@ <string name="pref_autocapitalisation_summary">在句子的开头自动按下Shift</string> <string name="pref_switch_input_immediate_title">切换到最近使用的键盘</string> <string name="pref_switch_input_immediate_summary">切换键盘按钮的行为</string> - <string name="pref_vibrate_title">振动</string> - <string name="pref_vibrate_summary">启用或者禁用按下按键时振动</string> + <!-- <string name="pref_vibrate_custom">Custom vibration</string> --> + <!-- <string name="pref_vibrate_duration_title">Vibration intensity</string> --> <!-- <string name="pref_pin_entry_enabled_title">Pin entry layout</string> --> <!-- <string name="pref_pin_entry_enabled_summary">When typing numbers, dates and phone numbers</string> --> <string name="pref_category_style">样式</string> @@ -69,11 +69,6 @@ <string name="pref_swipe_dist_e_very_far">非常长</string> <string name="pref_key_horizontal_space">按键的左右边距</string> <string name="pref_key_vertical_space">按键的上下边距</string> - <string name="pref_vibration_e_disabled">禁用</string> - <string name="pref_vibration_e_system">使用系统振动强度</string> - <string name="pref_vibration_e_strong">强</string> - <string name="pref_vibration_e_medium">中</string> - <string name="pref_vibration_e_light">弱</string> <string name="key_action_next">下一项</string> <string name="key_action_done">完成</string> <string name="key_action_go">前往</string> diff --git a/res/values/arrays.xml b/res/values/arrays.xml index 42e1738..04d13f9 100644 --- a/res/values/arrays.xml +++ b/res/values/arrays.xml @@ -54,18 +54,4 @@ <item>25</item> <item>35</item> </string-array> - <string-array name="pref_vibration_entries"> - <item>@string/pref_vibration_e_disabled</item> - <item>@string/pref_vibration_e_system</item> - <item>@string/pref_vibration_e_strong</item> - <item>@string/pref_vibration_e_medium</item> - <item>@string/pref_vibration_e_light</item> - </string-array> - <string-array name="pref_vibration_values"> - <item>disabled</item> - <item>system</item> - <item>strong</item> - <item>medium</item> - <item>light</item> - </string-array> </resources> diff --git a/res/values/strings.xml b/res/values/strings.xml index 50ed6b3..a85f374 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -42,8 +42,8 @@ <string name="pref_autocapitalisation_summary">Press Shift at the beginning of a sentence</string> <string name="pref_switch_input_immediate_title">Switch to the last used keyboard</string> <string name="pref_switch_input_immediate_summary">Behavior of the keyboard-switching key</string> - <string name="pref_vibrate_title">Vibration</string> - <string name="pref_vibrate_summary">Enable/disable vibration on keypress</string> + <string name="pref_vibrate_custom">Custom vibration</string> + <string name="pref_vibrate_duration_title">Vibration intensity</string> <string name="pref_pin_entry_enabled_title">Pin entry layout</string> <string name="pref_pin_entry_enabled_summary">When typing numbers, dates and phone numbers</string> <string name="pref_category_style">Style</string> @@ -69,11 +69,6 @@ <string name="pref_swipe_dist_e_very_far">Very far</string> <string name="pref_key_horizontal_space">Horizontal spacing between the keys</string> <string name="pref_key_vertical_space">Vertical spacing between the keys</string> - <string name="pref_vibration_e_disabled">Disabled</string> - <string name="pref_vibration_e_system">System</string> - <string name="pref_vibration_e_strong">Strong</string> - <string name="pref_vibration_e_medium">Medium</string> - <string name="pref_vibration_e_light">Light</string> <string name="key_action_next">Next</string> <string name="key_action_done">Done</string> <string name="key_action_go">Go</string> diff --git a/res/xml/settings.xml b/res/xml/settings.xml index f6467d6..653a3b0 100644 --- a/res/xml/settings.xml +++ b/res/xml/settings.xml @@ -21,7 +21,8 @@ <PreferenceCategory android:title="@string/pref_category_behavior"> <CheckBoxPreference android:key="autocapitalisation" android:title="@string/pref_autocapitalisation_title" android:summary="@string/pref_autocapitalisation_summary" android:defaultValue="true"/> <CheckBoxPreference android:key="switch_input_immediate" android:title="@string/pref_switch_input_immediate_title" android:summary="@string/pref_switch_input_immediate_summary" android:defaultValue="false"/> - <ListPreference android:key="vibration_behavior" android:title="@string/pref_vibrate_title" android:summary="@string/pref_vibrate_summary" android:defaultValue="system" android:entries="@array/pref_vibration_entries" android:entryValues="@array/pref_vibration_values"/> + <CheckBoxPreference android:key="vibrate_custom" android:title="@string/pref_vibrate_custom" android:defaultValue="false"/> + <juloo.common.IntSlideBarPreference android:dependency="vibrate_custom" android:key="vibrate_duration" android:title="@string/pref_vibrate_duration_title" android:summary="%sms" android:defaultValue="20" min="0" max="100"/> <CheckBoxPreference android:key="pin_entry_enabled" android:title="@string/pref_pin_entry_enabled_title" android:summary="@string/pref_pin_entry_enabled_summary" android:defaultValue="true"/> </PreferenceCategory> <PreferenceCategory android:title="@string/pref_category_style"> diff --git a/srcs/juloo.keyboard2/Config.java b/srcs/juloo.keyboard2/Config.java index 1b6a76a..53360de 100644 --- a/srcs/juloo.keyboard2/Config.java +++ b/srcs/juloo.keyboard2/Config.java @@ -35,7 +35,10 @@ final class Config public boolean number_row; public float swipe_dist_px; public float slide_step_px; - public VibratorCompat.VibrationBehavior vibration_behavior; + // Let the system handle vibration when false. + public boolean vibrate_custom; + // Control the vibration if [vibrate_custom] is true. + public long vibrate_duration; public long longPressTimeout; public long longPressInterval; public float margin_bottom; @@ -130,8 +133,8 @@ final class Config float swipe_dist_value = Float.valueOf(_prefs.getString("swipe_dist", "15")); swipe_dist_px = swipe_dist_value / 25.f * swipe_scaling; slide_step_px = swipe_dist_px / 4.f; - vibration_behavior = - VibratorCompat.VibrationBehavior.of_string(_prefs.getString("vibration_behavior", "system")); + vibrate_custom = _prefs.getBoolean("vibrate_custom", false); + vibrate_duration = _prefs.getInt("vibrate_duration", 20); longPressTimeout = _prefs.getInt("longpress_timeout", 600); longPressInterval = _prefs.getInt("longpress_interval", 65); margin_bottom = get_dip_pref_oriented(dm, "margin_bottom", 7, 3); diff --git a/srcs/juloo.keyboard2/Keyboard2View.java b/srcs/juloo.keyboard2/Keyboard2View.java index 3ef9957..205bbae 100644 --- a/srcs/juloo.keyboard2/Keyboard2View.java +++ b/srcs/juloo.keyboard2/Keyboard2View.java @@ -234,7 +234,7 @@ public class Keyboard2View extends View private void vibrate() { - VibratorCompat.vibrate(this, _config.vibration_behavior); + VibratorCompat.vibrate(this, _config); } @Override diff --git a/srcs/juloo.keyboard2/VibratorCompat.java b/srcs/juloo.keyboard2/VibratorCompat.java index 2795c71..4a9debe 100644 --- a/srcs/juloo.keyboard2/VibratorCompat.java +++ b/srcs/juloo.keyboard2/VibratorCompat.java @@ -8,32 +8,24 @@ import android.view.View; public final class VibratorCompat { - public static void vibrate(View v, VibrationBehavior b) + public static void vibrate(View v, Config config) { - switch (b) + if (config.vibrate_custom) { - case DISABLED: - break; - case SYSTEM: - if (VERSION.SDK_INT >= 8) - v.performHapticFeedback(HapticFeedbackConstants.KEYBOARD_TAP, - HapticFeedbackConstants.FLAG_IGNORE_VIEW_SETTING); - break; - case STRONG: - vibrator_vibrate(v, 90); - break; - case MEDIUM: - vibrator_vibrate(v, 45); - break; - case LIGHT: - vibrator_vibrate(v, 20); - break; + if (config.vibrate_duration > 0) + vibrator_vibrate(v, config.vibrate_duration); + } + else + { + if (VERSION.SDK_INT >= 8) + v.performHapticFeedback(HapticFeedbackConstants.KEYBOARD_TAP, + HapticFeedbackConstants.FLAG_IGNORE_VIEW_SETTING); } } /** Use the older [Vibrator] when the newer API is not available or the user wants more control. */ - static void vibrator_vibrate(View v, int duration) + static void vibrator_vibrate(View v, long duration) { try { @@ -53,29 +45,4 @@ public final class VibratorCompat } return vibrator_service; } - - public static enum VibrationBehavior - { - DISABLED, - SYSTEM, - STRONG, - MEDIUM, - LIGHT; - - VibrationBehavior() {} - - /** Defaults [SYSTEM] for unrecognized strings. */ - public static VibrationBehavior of_string(String s) - { - switch (s) - { - case "disabled": return DISABLED; - case "system": return SYSTEM; - case "strong": return STRONG; - case "medium": return MEDIUM; - case "light": return LIGHT; - default: return SYSTEM; - } - } - } } |
