diff options
| author | Jules Aguillon | 2024-02-10 18:03:09 +0100 |
|---|---|---|
| committer | Jules Aguillon | 2024-02-10 18:10:49 +0100 |
| commit | f4d88cc0876ec29ff46dbda0159168ebee637afb (patch) | |
| tree | 72c96a25e03f187307c1e738ca4aeb990ce3ba85 | |
| parent | d5676d683f031a2d23f4e01e0ada0afd58dc9b89 (diff) | |
| download | unexpected-keyboard-f4d88cc0876ec29ff46dbda0159168ebee637afb.tar.gz unexpected-keyboard-f4d88cc0876ec29ff46dbda0159168ebee637afb.zip | |
Fix various linter warnings
Among others:
- Use `apply` instead of `commit` when saving shared preferences.
- Avoid inlined Api
- Remove unused resources
29 files changed, 40 insertions, 69 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 7cdbcda..a76585c 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -1,5 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:hardwareAccelerated="false"> + <uses-permission android:name="android.permission.VIBRATE"/> + <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/> + <application android:label="@string/app_name" android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:hardwareAccelerated="false"> <service android:name="juloo.keyboard2.Keyboard2" android:label="@string/app_name" android:permission="android.permission.BIND_INPUT_METHOD" android:exported="true" android:directBootAware="true"> <intent-filter> @@ -12,15 +15,13 @@ <action android:name="android.intent.action.MAIN"/> </intent-filter> </activity> - <activity android:name="juloo.keyboard2.LauncherActivity" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:theme="@style/appTheme" android:exported="true" android:directBootAware="true"> + <activity android:name="juloo.keyboard2.LauncherActivity" android:icon="@mipmap/ic_launcher" android:theme="@style/appTheme" android:exported="true" android:directBootAware="true"> <intent-filter> <action android:name="android.intent.action.MAIN"/> <category android:name="android.intent.category.LAUNCHER"/> </intent-filter> </activity> </application> - <uses-permission android:name="android.permission.VIBRATE"/> - <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/> <!-- To query enabled input methods for voice IME detection --> <queries> diff --git a/build.gradle b/build.gradle index 8ff3f0d..139b27b 100644 --- a/build.gradle +++ b/build.gradle @@ -77,6 +77,11 @@ android { sourceCompatibility JavaVersion.VERSION_1_7 targetCompatibility JavaVersion.VERSION_1_7 } + + lintOptions { + // Translation are already checked by 'syncTranslations' + disable 'MissingTranslation' + } } dependencies { diff --git a/res/layout/dialog_edit_text.xml b/res/layout/dialog_edit_text.xml index ad07947..5b935dc 100644 --- a/res/layout/dialog_edit_text.xml +++ b/res/layout/dialog_edit_text.xml @@ -1,4 +1,4 @@ <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content"> - <EditText android:id="@+id/text" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_margin="10dp"/> + <EditText android:id="@+id/text" android:inputType="text" android:importantForAutofill="no" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_margin="10dp"/> </LinearLayout> diff --git a/res/layout/launcher_activity.xml b/res/layout/launcher_activity.xml index c007299..4e0cc0c 100644 --- a/res/layout/launcher_activity.xml +++ b/res/layout/launcher_activity.xml @@ -1,12 +1,12 @@ <?xml version="1.0" encoding="utf-8"?> <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:fillViewport="true"> - <LinearLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical"> + <LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical"> <TextView style="@style/paragraph" android:text="@string/launcher_description"/> <Button style="@style/paragraph" android:text="@string/launcher_button_imesettings" android:onClick="launch_imesettings" android:layout_width="wrap_content"/> <Button style="@style/paragraph" android:text="@string/launcher_button_imepicker" android:onClick="launch_imepicker" android:layout_width="wrap_content"/> <VideoView android:id="@+id/launcher_intro_video" android:layout_width="240dp" android:layout_height="wrap_content" android:layout_gravity="center"/> <TextView android:id="@+id/launcher_tryhere_text" style="@style/paragraph" android:text="@string/launcher_tryhere"/> - <EditText android:id="@+id/launcher_tryhere_area" style="@style/paragraph" android:inputType="text"/> + <EditText android:id="@+id/launcher_tryhere_area" style="@style/paragraph" android:inputType="text" android:hint="@string/launcher_tryhere_hint" android:importantForAutofill="no"/> <TextView style="@style/paragraph" android:text="@string/launcher_sourcecode"/> <TextView style="@style/paragraph" android:text="https://github.com/Julow/Unexpected-Keyboard" android:autoLink="web" android:linksClickable="true"/> </LinearLayout> diff --git a/res/values-cs/strings.xml b/res/values-cs/strings.xml index 0c6f79e..771053b 100644 --- a/res/values-cs/strings.xml +++ b/res/values-cs/strings.xml @@ -47,8 +47,6 @@ Nezapomeňte... Jako každá virtuální klávesnice, i tato musí být aktivov <string name="pref_extra_keys_title">Přidat klávesy do klávesnice</string> <string name="pref_extra_keys_custom">Přidat vlastní klávesy</string> <string name="pref_extra_keys_internal">Výbrané klávesy k přidaní do klávesnice</string> - <string name="pref_second_layout_title">Vedlejší rozvržení</string> - <string name="pref_second_layout_none">Žádné</string> <string name="pref_category_typing">Psaní</string> <string name="pref_swipe_dist_title">Vzdálenost posunutí prstem</string> <string name="pref_swipe_dist_summary">Jak daleko je třeba posunout prst pro zadání znaku/znaménka v rohu klávey (%s)</string> @@ -102,6 +100,7 @@ Nezapomeňte... Jako každá virtuální klávesnice, i tato musí být aktivov <string name="launcher_description">Tato aplikace je pouhou virtuální klávesnicí. Přejděte do systémového nastavení, kliknutím na tlačítko níže a aktivujte ji.</string> <string name="launcher_sourcecode">Toto je volná, open-source aplikace. Její zdrojový kód, či hlášení chyb, naleznete na Githubu.</string> <string name="launcher_tryhere">Po aktivaci můžete klávesnici rovnou vyzkoušet zde:</string> + <!-- <string name="launcher_tryhere_hint">Try here</string> --> <string name="key_descr_capslock">Caps lock</string> <string name="key_descr_switch_greekmath">Řecké a matematické symboly</string> <!-- <string name="key_descr_change_method">Switch keyboard</string> --> @@ -122,5 +121,4 @@ Nezapomeňte... Jako každá virtuální klávesnice, i tato musí být aktivov <string name="key_descr_page_down">Page Down</string> <string name="key_descr_home">Home</string> <string name="key_descr_end">End</string> - <string name="pref_category_advanced">Pokročilé</string> </resources> diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml index c5df728..84f3e26 100644 --- a/res/values-de/strings.xml +++ b/res/values-de/strings.xml @@ -35,8 +35,6 @@ Diese App enthält keine Werbung, benötigt keinen Netzwerkzugriff und ist quell <string name="pref_extra_keys_title">Zusätzliche Zeichen zur Tastatur hinzufügen</string> <string name="pref_extra_keys_custom">Benutzerdefinierte Tasten hinzufügen</string> <string name="pref_extra_keys_internal">Tasten auswählen, die der Tastatur hinzugefügt werden sollen</string> - <string name="pref_second_layout_title">Zweites Layout</string> - <string name="pref_second_layout_none">Keines</string> <string name="pref_category_typing">Tippen</string> <string name="pref_swipe_dist_title">Länge der Wischgeste</string> <string name="pref_swipe_dist_summary">Abstand der Zeichen in den Ecken der Tasten (%s)</string> @@ -90,6 +88,7 @@ Diese App enthält keine Werbung, benötigt keinen Netzwerkzugriff und ist quell <string name="launcher_description">Diese App ist eine virtuelle Tastatur. Tippe auf den Button unten und aktivere Unexpected Keyboard in den Systemeinstellungen.</string> <string name="launcher_sourcecode">Dies ist eine freie und quelloffene App. Du findest den Quellcode auf Github. Dort können auch Bugs gemeldet werden.</string> <string name="launcher_tryhere">Nach Aktivierung kannst du die Tastatur hier ausprobieren:</string> + <!-- <string name="launcher_tryhere_hint">Try here</string> --> <string name="key_descr_capslock">Feststelltaste</string> <string name="key_descr_switch_greekmath">Griechische & mathematische Symbole</string> <!-- <string name="key_descr_change_method">Switch keyboard</string> --> @@ -110,5 +109,4 @@ Diese App enthält keine Werbung, benötigt keinen Netzwerkzugriff und ist quell <string name="key_descr_page_down">Bild ab</string> <string name="key_descr_home">Pos1</string> <string name="key_descr_end">Ende</string> - <string name="pref_category_advanced">Erweitert</string> </resources> diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml index c52168c..e58048d 100644 --- a/res/values-es/strings.xml +++ b/res/values-es/strings.xml @@ -35,8 +35,6 @@ La misma no contiene ningún anuncio/publicidad, no realiza peticiones de red y <string name="pref_extra_keys_title">Agregar teclas</string> <string name="pref_extra_keys_custom">Agregar teclas personalizadas</string> <string name="pref_extra_keys_internal">Selecciona teclas para agregar al teclado</string> - <string name="pref_second_layout_title">Formato secundario</string> - <string name="pref_second_layout_none">Ninguno</string> <string name="pref_category_typing">Escritura</string> <string name="pref_swipe_dist_title">Distancia de deslizamiento</string> <string name="pref_swipe_dist_summary">Distancia de caracteres en las esquinas de las teclas (%s)</string> @@ -90,6 +88,7 @@ La misma no contiene ningún anuncio/publicidad, no realiza peticiones de red y <string name="launcher_description">Esta aplicación es un teclado virtual. Presiona el botón de abajo para ir a Ajustes y habilitar Unexpected Keyboard.</string> <string name="launcher_sourcecode">Esta es una aplicación gratuita, libre y de código abierto. Puedes encontrar el código fuente o reportar errores en GitHub.</string> <string name="launcher_tryhere">Tras habilitarlo, puedes probar el teclado en este campo:</string> + <!-- <string name="launcher_tryhere_hint">Try here</string> --> <string name="key_descr_capslock">Bloq Mayús</string> <string name="key_descr_switch_greekmath">Símb. griegos y matemáticos</string> <!-- <string name="key_descr_change_method">Switch keyboard</string> --> @@ -110,5 +109,4 @@ La misma no contiene ningún anuncio/publicidad, no realiza peticiones de red y <string name="key_descr_page_down">Re Pág</string> <string name="key_descr_home">Inicio</string> <string name="key_descr_end">Fin</string> - <string name="pref_category_advanced">Avanzado</string> </resources> diff --git a/res/values-fa/strings.xml b/res/values-fa/strings.xml index d3fdeb2..1cbc7c7 100644 --- a/res/values-fa/strings.xml +++ b/res/values-fa/strings.xml @@ -35,8 +35,6 @@ This application contains no ads, doesn't make any network requests and is Open <string name="pref_extra_keys_title">افزودن کلیدها به صفحه کلید</string> <!-- <string name="pref_extra_keys_custom">Add custom keys</string> --> <!-- <string name="pref_extra_keys_internal">Select keys to add to the keyboard</string> --> - <string name="pref_second_layout_title">طرح دوم</string> - <string name="pref_second_layout_none">هیچ</string> <string name="pref_category_typing">درحال نوشتن</string> <string name="pref_swipe_dist_title">فاصله کشیدن</string> <string name="pref_swipe_dist_summary">فاصله حروف از گوشههای کلیدها )(%s)</string> @@ -90,6 +88,7 @@ This application contains no ads, doesn't make any network requests and is Open <string name="launcher_description">این برنامه یک صفحه کلید مجازی است. با کلیک روی گزینه زیر به تنظیمات سامانه بروید و صفحه کلید غیرمنتظره را فعال کنید.</string> <string name="launcher_sourcecode">این یک برنامه متن باز و آزاد است. شما میتوانید کد منبع را در گیتهاب پیدا کرده و نیز باگها را گزارش کنید.</string> <string name="launcher_tryhere">بعد از فعالسازی، صفحه کلید را اینجا امتحان کنید:</string> + <!-- <string name="launcher_tryhere_hint">Try here</string> --> <!-- <string name="key_descr_capslock">Caps lock</string> --> <!-- <string name="key_descr_switch_greekmath">Greek & math symbols</string> --> <!-- <string name="key_descr_change_method">Switch keyboard</string> --> @@ -110,5 +109,4 @@ This application contains no ads, doesn't make any network requests and is Open <!-- <string name="key_descr_page_down">Page Down</string> --> <!-- <string name="key_descr_home">Home</string> --> <!-- <string name="key_descr_end">End</string> --> - <string name="pref_category_advanced">پیشرفته</string> </resources> diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml index 82b9e1f..971fef9 100644 --- a/res/values-fr/strings.xml +++ b/res/values-fr/strings.xml @@ -35,8 +35,6 @@ Cette application ne contient pas de publicité, n'accède pas au réseau et est <string name="pref_extra_keys_title">Ajouter des touches au clavier</string> <string name="pref_extra_keys_custom">Ajouter des touches personnalisées</string> <string name="pref_extra_keys_internal">Sélectionner les touches à ajouter au clavier</string> - <string name="pref_second_layout_title">Disposition secondaire</string> - <string name="pref_second_layout_none">Aucune</string> <string name="pref_category_typing">Saisie</string> <string name="pref_swipe_dist_title">Distance de swipe</string> <string name="pref_swipe_dist_summary">La distance des caractères dans les coins (%s)</string> @@ -90,6 +88,7 @@ Cette application ne contient pas de publicité, n'accède pas au réseau et est <string name="launcher_description">Cette application est un clavier virtuel. Activez-le dans les paramètres système en cliquant sur le bouton ci-dessous.</string> <string name="launcher_sourcecode">Cette application est libre et open-source. Lisez le source code et reportez des problèmes sur Github.</string> <string name="launcher_tryhere">Après l\'avoir activé, vous pouvez l\'essayer ici:</string> + <!-- <string name="launcher_tryhere_hint">Try here</string> --> <string name="key_descr_capslock">Verrouillage majuscules</string> <string name="key_descr_switch_greekmath">Symboles mathématiques</string> <!-- <string name="key_descr_change_method">Switch keyboard</string> --> @@ -110,5 +109,4 @@ Cette application ne contient pas de publicité, n'accède pas au réseau et est <string name="key_descr_page_down">Page suivante</string> <string name="key_descr_home">Début</string> <string name="key_descr_end">Fin</string> - <string name="pref_category_advanced">Avancé</string> </resources> diff --git a/res/values-it/strings.xml b/res/values-it/strings.xml index b40b664..b6a278d 100644 --- a/res/values-it/strings.xml +++ b/res/values-it/strings.xml @@ -35,8 +35,6 @@ This application contains no ads, doesn't make any network requests and is Open <!-- <string name="pref_extra_keys_title">Add keys to the keyboard</string> --> <!-- <string name="pref_extra_keys_custom">Add custom keys</string> --> <!-- <string name="pref_extra_keys_internal">Select keys to add to the keyboard</string> --> - <!-- <string name="pref_second_layout_title">Secondary layout</string> --> - <string name="pref_second_layout_none">Nessuno</string> <string name="pref_category_typing">Digitando</string> <string name="pref_swipe_dist_title">Distanza swipe</string> <string name="pref_swipe_dist_summary">Distanza dei caratteri negli angoli dei tasti (%s)</string> @@ -90,6 +88,7 @@ This application contains no ads, doesn't make any network requests and is Open <!-- <string name="launcher_description">This application is a virtual keyboard. Go to the system settings by clicking on the button below and enable Unexpected-Keyboard.</string> --> <!-- <string name="launcher_sourcecode">This is an free and open source application. You can find the source code or report bugs on Github.</string> --> <!-- <string name="launcher_tryhere">After enabling, you can try the keyboard here:</string> --> + <!-- <string name="launcher_tryhere_hint">Try here</string> --> <!-- <string name="key_descr_capslock">Caps lock</string> --> <!-- <string name="key_descr_switch_greekmath">Greek & math symbols</string> --> <!-- <string name="key_descr_change_method">Switch keyboard</string> --> @@ -110,5 +109,4 @@ This application contains no ads, doesn't make any network requests and is Open <!-- <string name="key_descr_page_down">Page Down</string> --> <!-- <string name="key_descr_home">Home</string> --> <!-- <string name="key_descr_end">End</string> --> - <!-- <string name="pref_category_advanced">Advanced</string> --> </resources> diff --git a/res/values-ko/strings.xml b/res/values-ko/strings.xml index 90d7ce1..06ee380 100644 --- a/res/values-ko/strings.xml +++ b/res/values-ko/strings.xml @@ -47,8 +47,6 @@ <!-- <string name="pref_extra_keys_title">Add keys to the keyboard</string> --> <!-- <string name="pref_extra_keys_custom">Add custom keys</string> --> <!-- <string name="pref_extra_keys_internal">Select keys to add to the keyboard</string> --> - <!-- <string name="pref_second_layout_title">Secondary layout</string> --> - <!-- <string name="pref_second_layout_none">None</string> --> <string name="pref_category_typing">타자</string> <string name="pref_swipe_dist_title">스와이프 범위</string> <string name="pref_swipe_dist_summary">키 모서리 문자의 입력 범위 (%s)</string> @@ -102,6 +100,7 @@ <!-- <string name="launcher_description">This application is a virtual keyboard. Go to the system settings by clicking on the button below and enable Unexpected-Keyboard.</string> --> <!-- <string name="launcher_sourcecode">This is an free and open source application. You can find the source code or report bugs on Github.</string> --> <!-- <string name="launcher_tryhere">After enabling, you can try the keyboard here:</string> --> + <!-- <string name="launcher_tryhere_hint">Try here</string> --> <!-- <string name="key_descr_capslock">Caps lock</string> --> <!-- <string name="key_descr_switch_greekmath">Greek & math symbols</string> --> <!-- <string name="key_descr_change_method">Switch keyboard</string> --> @@ -122,5 +121,4 @@ <!-- <string name="key_descr_page_down">Page Down</string> --> <!-- <string name="key_descr_home">Home</string> --> <!-- <string name="key_descr_end">End</string> --> - <!-- <string name="pref_category_advanced">Advanced</string> --> </resources> diff --git a/res/values-land/dimens.xml b/res/values-land/dimens.xml deleted file mode 100644 index 91e6c40..0000000 --- a/res/values-land/dimens.xml +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<resources> - <dimen name="emoji_type_button_height">48dp</dimen> -</resources> diff --git a/res/values-lv/strings.xml b/res/values-lv/strings.xml index b874a87..fc32013 100644 --- a/res/values-lv/strings.xml +++ b/res/values-lv/strings.xml @@ -35,8 +35,6 @@ Tagad lieliski piemērota izmantošanai ikdienā. <string name="pref_extra_keys_title">Pievienot tastatūrai taustiņus</string> <string name="pref_extra_keys_custom">Pievienot pielāgotus taustiņus</string> <string name="pref_extra_keys_internal">Atlasīt taustiņus, ko pievienot tastatūrai</string> - <string name="pref_second_layout_title">Otrējais izkārtojums</string> - <string name="pref_second_layout_none">Neviens</string> <string name="pref_category_typing">Rakstīšana</string> <string name="pref_swipe_dist_title">Pavilkšanas attālums</string> <string name="pref_swipe_dist_summary">Taustiņu stūros esošo rakstzīmju attālums (%s)</string> @@ -92,6 +90,7 @@ Tagad lieliski piemērota izmantošanai ikdienā. <string name="launcher_sourcecode">Šī ir bezmaksas un atvērtā pirmkoda lietotne. GitHub var atrast pirmkodu un ziņot par nepilnībām.</string> <string name="launcher_tryhere">Pēc iespējošanas šeit var izmēģināt tastatūru:</string> + <!-- <string name="launcher_tryhere_hint">Try here</string> --> <string name="key_descr_capslock">Burtslēgs</string> <string name="key_descr_switch_greekmath">Grieķu un matemātikas rakstzīmes</string> <!-- <string name="key_descr_change_method">Switch keyboard</string> --> @@ -112,5 +111,4 @@ Tagad lieliski piemērota izmantošanai ikdienā. <string name="key_descr_page_down">Lejupšķirt</string> <string name="key_descr_home">Sākums</string> <string name="key_descr_end">Beigas</string> - <string name="pref_category_advanced">Papildu</string> </resources> diff --git a/res/values-pl/strings.xml b/res/values-pl/strings.xml index 9c9ceaa..aa983b4 100644 --- a/res/values-pl/strings.xml +++ b/res/values-pl/strings.xml @@ -35,8 +35,6 @@ Aplikacja nie zawiera reklam, nie żąda dostępu do internetu, a jej kod źród <string name="pref_extra_keys_title">Dodaj klawisze do klawiatury</string> <string name="pref_extra_keys_custom">Dodaj niestandardowe klawisze</string> <string name="pref_extra_keys_internal">Wybierz klawisze, które chcesz dodać do klawiatury</string> - <string name="pref_second_layout_title">Drugi układ</string> - <string name="pref_second_layout_none">Żaden</string> <string name="pref_category_typing">Pisanie</string> <string name="pref_swipe_dist_title">Odległość przesuwania</string> <string name="pref_swipe_dist_summary">Odległość znaków od rogów klawiszy (%s)</string> @@ -90,6 +88,7 @@ Aplikacja nie zawiera reklam, nie żąda dostępu do internetu, a jej kod źród <string name="launcher_description">Ta aplikacja jest klawiaturą ekranową. Naciśnij poniższy przycisk, aby przejść do ustawień systemu i włącz Unexpected-Keyboard.</string> <string name="launcher_sourcecode">Jest to darmowa aplikacja o otwartym kodzie źródłowym. Możesz zobaczyć kod źródłowy oraz zgłosić błedy na Githubie.</string> <string name="launcher_tryhere">Po jej włączeniu, możesz wypróbować klawiaturę tutaj:</string> + <!-- <string name="launcher_tryhere_hint">Try here</string> --> <string name="key_descr_capslock">Caps lock</string> <string name="key_descr_switch_greekmath">Symbole greckie i matematyczne</string> <!-- <string name="key_descr_change_method">Switch keyboard</string> --> @@ -110,5 +109,4 @@ Aplikacja nie zawiera reklam, nie żąda dostępu do internetu, a jej kod źród <string name="key_descr_page_down">Page Down</string> <string name="key_descr_home">Home</string> <string name="key_descr_end">End</string> - <string name="pref_category_advanced">Zaawansowane</string> </resources> diff --git a/res/values-pt/strings.xml b/res/values-pt/strings.xml index 292e073..7a603f6 100644 --- a/res/values-pt/strings.xml +++ b/res/values-pt/strings.xml @@ -47,8 +47,6 @@ Sistema > Idioma e entrada > Teclado virtual > Gerenciar teclados virtu <string name="pref_extra_keys_title">Adicionar teclas ao teclado</string> <string name="pref_extra_keys_custom">Adicionar teclas customizadas</string> <string name="pref_extra_keys_internal">Selecione teclas para serem adicionadas ao teclado</string> - <string name="pref_second_layout_title">Layout secundário</string> - <string name="pref_second_layout_none">Nenhum</string> <string name="pref_category_typing">Digitação</string> <string name="pref_swipe_dist_title">Distância a deslizar</string> <string name="pref_swipe_dist_summary">Distância até acionar os cantos das teclas (%s)</string> @@ -102,6 +100,7 @@ Sistema > Idioma e entrada > Teclado virtual > Gerenciar teclados virtu <string name="launcher_description">Este app é um teclado virtual. Vá para as configurações do sistema clicando no botão abaixo e ative o Teclado Unexpected.</string> <string name="launcher_sourcecode">Este app é gratuito é de código aberto. Você pode consultar o código ou fazer sugestões em Github.</string> <string name="launcher_tryhere">Após ativar, experimente aqui:</string> + <!-- <string name="launcher_tryhere_hint">Try here</string> --> <string name="key_descr_capslock">Caps lock</string> <string name="key_descr_switch_greekmath">Grego & símbolos matemáticos</string> <string name="key_descr_change_method">Trocar de teclado</string> @@ -122,5 +121,4 @@ Sistema > Idioma e entrada > Teclado virtual > Gerenciar teclados virtu <!-- <string name="key_descr_page_down">Page Down</string> --> <!-- <string name="key_descr_home">Home</string> --> <!-- <string name="key_descr_end">End</string> --> - <string name="pref_category_advanced">Avançado</string> </resources> diff --git a/res/values-ro/strings.xml b/res/values-ro/strings.xml index a3a9ec7..f4b814b 100644 --- a/res/values-ro/strings.xml +++ b/res/values-ro/strings.xml @@ -35,8 +35,6 @@ Această aplicație nu conține publicitate, nu folosește rețeaua deloc și e <string name="pref_extra_keys_title">Adaugă taste pe tastatură</string> <!-- <string name="pref_extra_keys_custom">Add custom keys</string> --> <!-- <string name="pref_extra_keys_internal">Select keys to add to the keyboard</string> --> - <string name="pref_second_layout_title">Aranjament secundar</string> - <string name="pref_second_layout_none">Nimic</string> <string name="pref_category_typing">Tipărire</string> <string name="pref_swipe_dist_title">Distanța de glisare</string> <string name="pref_swipe_dist_summary">Distanța dintre caracterele din colțurile tastelor (%s)</string> @@ -90,6 +88,7 @@ Această aplicație nu conține publicitate, nu folosește rețeaua deloc și e <string name="launcher_description">Această aplicație este o tastatură virtuală. Accesați setările sistemului făcând clic pe butonul de mai jos și activați tastatura Unexpected.</string> <string name="launcher_sourcecode">Aceasta este o aplicație gratuită și open source. Puteți găsi codul sursă sau raporta erori folosind link-ul Github.</string> <string name="launcher_tryhere">După activare, puteți să încercați tastatura aici:</string> + <!-- <string name="launcher_tryhere_hint">Try here</string> --> <!-- <string name="key_descr_capslock">Caps lock</string> --> <!-- <string name="key_descr_switch_greekmath">Greek & math symbols</string> --> <!-- <string name="key_descr_change_method">Switch keyboard</string> --> @@ -110,5 +109,4 @@ Această aplicație nu conține publicitate, nu folosește rețeaua deloc și e <!-- <string name="key_descr_page_down">Page Down</string> --> <!-- <string name="key_descr_home">Home</string> --> <!-- <string name="key_descr_end">End</string> --> - <string name="pref_category_advanced">Setări avansate</string> </resources> diff --git a/res/values-ru/strings.xml b/res/values-ru/strings.xml index f552588..a2defba 100644 --- a/res/values-ru/strings.xml +++ b/res/values-ru/strings.xml @@ -35,8 +35,6 @@ <string name="pref_extra_keys_title">Добавить клавиши на клавиатуру</string> <!-- <string name="pref_extra_keys_custom">Add custom keys</string> --> <!-- <string name="pref_extra_keys_internal">Select keys to add to the keyboard</string> --> - <string name="pref_second_layout_title">Дополнительная раскладка</string> - <string name="pref_second_layout_none">Нет</string> <string name="pref_category_typing">Печать</string> <string name="pref_swipe_dist_title">Расстояние пролистывания</string> <string name="pref_swipe_dist_summary">Расстояние между символами в углах клавиш (%s)</string> @@ -90,6 +88,7 @@ <string name="launcher_description">Данное приложение является виртуальной клавиатурой. Зайдите в настройки, нажав кнопку внизу и активируйте Unexpected-Keyboard.</string> <string name="launcher_sourcecode">Это бесплатное приложение с открытым исходным кодом. Вы можете изучить код или сообщить об ошибках по ссылке Github.</string> <string name="launcher_tryhere">После активации вы можете попробовать клавиатуру прямо здесь:</string> + <!-- <string name="launcher_tryhere_hint">Try here</string> --> <!-- <string name="key_descr_capslock">Caps lock</string> --> <!-- <string name="key_descr_switch_greekmath">Greek & math symbols</string> --> <!-- <string name="key_descr_change_method">Switch keyboard</string> --> @@ -110,5 +109,4 @@ <!-- <string name="key_descr_page_down">Page Down</string> --> <!-- <string name="key_descr_home">Home</string> --> <!-- <string name="key_descr_end">End</string> --> - <string name="pref_category_advanced">Расширенные настройки</string> </resources> diff --git a/res/values-tr/strings.xml b/res/values-tr/strings.xml index 3a557cf..0dc19f9 100644 --- a/res/values-tr/strings.xml +++ b/res/values-tr/strings.xml @@ -35,8 +35,6 @@ Bu uygulama açık kaynaklıdır. Reklam içermez ve internete bağlanmaz."</str <string name="pref_extra_keys_title">Tuş ekle</string> <string name="pref_extra_keys_custom">Özel tuş ekle</string> <string name="pref_extra_keys_internal">Klavyeye eklenecek tuşları seçin</string> - <string name="pref_second_layout_title">İklncil tuş düzeni</string> - <string name="pref_second_layout_none">Hiçbiri</string> <string name="pref_category_typing">Yazma</string> <string name="pref_swipe_dist_title">Kaydırma mesafesi</string> <string name="pref_swipe_dist_summary">Tuşların köşelerinden kaydırma mesafesi (%s)</string> @@ -90,6 +88,7 @@ Bu uygulama açık kaynaklıdır. Reklam içermez ve internete bağlanmaz."</str <string name="launcher_description">Bu uygulama bir sanal klavye uygulamasıdır. Aşağıdaki butona basarak sistem ayarlarında etkinleştiriniz.</string> <string name="launcher_sourcecode">Bu uygulama ücretsiz ve açık kaynaklıdır. Kaynak koduna erişmek veya bir hata raporlamak için GitHub</string> <string name="launcher_tryhere">Ayarlardan aktif ettikten sonra klavyeyi burada test edebilirsin:</string> + <!-- <string name="launcher_tryhere_hint">Try here</string> --> <string name="key_descr_capslock">CapsLock</string> <string name="key_descr_switch_greekmath">Greek & math sembolleri</string> <string name="key_descr_change_method">Klavye değiştir</string> @@ -110,5 +109,4 @@ Bu uygulama açık kaynaklıdır. Reklam içermez ve internete bağlanmaz."</str <string name="key_descr_page_down">Aşağı</string> <string name="key_descr_home">BAŞ(Sol yön tuşu)</string> <string name="key_descr_end">SON(Sağ yön tuşu)</string> - <string name="pref_category_advanced">Gelişmiş</string> </resources> diff --git a/res/values-uk/strings.xml b/res/values-uk/strings.xml index d2abf34..eb7f4c4 100644 --- a/res/values-uk/strings.xml +++ b/res/values-uk/strings.xml @@ -35,8 +35,6 @@ This application contains no ads, doesn't make any network requests and is Open <string name="pref_extra_keys_title">Додати клавіші до клавіатури</string> <string name="pref_extra_keys_custom">Додайте власні клавіші</string> <string name="pref_extra_keys_internal">Виберіть клавіші, які потрібно додати до клавіатури</string> - <string name="pref_second_layout_title">Додаткова розкладка</string> - <string name="pref_second_layout_none">Немає</string> <string name="pref_category_typing">Введення</string> <string name="pref_swipe_dist_title">Відстань проведення</string> <string name="pref_swipe_dist_summary">Відстань між символами в кутах клавіш (%s)</string> @@ -90,6 +88,7 @@ This application contains no ads, doesn't make any network requests and is Open <string name="launcher_description">Ця програма є віртуальною клавіатурою. Перейдіть до системних налаштувань, натиснувши кнопку нижче, і ввімкніть Unexpected-Keyboard.</string> <string name="launcher_sourcecode">Це безкоштовна програма з відкритим кодом. Ви можете знайти початковий код або повідомити про помилки на GitHub.</string> <string name="launcher_tryhere">Після ввімкнення ви можете спробувати клавіатуру тут:</string> + <!-- <string name="launcher_tryhere_hint">Try here</string> --> <string name="key_descr_capslock">Caps lock</string> <string name="key_descr_switch_greekmath">Грецькі та математичні символи</string> <string name="key_descr_change_method">Переключити клавіатуру</string> @@ -110,5 +109,4 @@ This application contains no ads, doesn't make any network requests and is Open <string name="key_descr_page_down">Page Down</string> <string name="key_descr_home">Home</string> <string name="key_descr_end">End</string> - <string name="pref_category_advanced">Додаткові</string> </resources> diff --git a/res/values-vi/strings.xml b/res/values-vi/strings.xml index b77e43e..fc028b1 100644 --- a/res/values-vi/strings.xml +++ b/res/values-vi/strings.xml @@ -35,8 +35,6 @@ Bây giờ đã hoàn hảo cho việc sử dụng hàng ngày. <string name="pref_extra_keys_title">Thêm phím vào bàn phím</string> <!-- <string name="pref_extra_keys_custom">Add custom keys</string> --> <!-- <string name="pref_extra_keys_internal">Select keys to add to the keyboard</string> --> - <string name="pref_second_layout_title">Bố cục phụ</string> - <string name="pref_second_layout_none">Không</string> <string name="pref_category_typing">Gõ</string> <string name="pref_swipe_dist_title">Khoảng cách vuốt</string> <string name="pref_swipe_dist_summary">Khoảng cách giữa các ký tự ở góc phím (%s)</string> @@ -90,6 +88,7 @@ Bây giờ đã hoàn hảo cho việc sử dụng hàng ngày. <!-- <string name="launcher_description">This application is a virtual keyboard. Go to the system settings by clicking on the button below and enable Unexpected-Keyboard.</string> --> <!-- <string name="launcher_sourcecode">This is an free and open source application. You can find the source code or report bugs on Github.</string> --> <!-- <string name="launcher_tryhere">After enabling, you can try the keyboard here:</string> --> + <!-- <string name="launcher_tryhere_hint">Try here</string> --> <!-- <string name="key_descr_capslock">Caps lock</string> --> <!-- <string name="key_descr_switch_greekmath">Greek & math symbols</string> --> <!-- <string name="key_descr_change_method">Switch keyboard</string> --> @@ -110,5 +109,4 @@ Bây giờ đã hoàn hảo cho việc sử dụng hàng ngày. <!-- <string name="key_descr_page_down">Page Down</string> --> <!-- <string name="key_descr_home">Home</string> --> <!-- <string name="key_descr_end">End</string> --> - <string name="pref_category_advanced">Nâng cao</string> </resources> diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml index d9a93a6..e2c8415 100644 --- a/res/values-zh-rCN/strings.xml +++ b/res/values-zh-rCN/strings.xml @@ -35,8 +35,6 @@ This application contains no ads, doesn't make any network requests and is Open <string name="pref_extra_keys_title">选择要显示的按键</string> <!-- <string name="pref_extra_keys_custom">Add custom keys</string> --> <!-- <string name="pref_extra_keys_internal">Select keys to add to the keyboard</string> --> - <string name="pref_second_layout_title">第二键盘布局</string> - <string name="pref_second_layout_none">无</string> <string name="pref_category_typing">输入</string> <string name="pref_swipe_dist_title">滑动触发距离</string> <string name="pref_swipe_dist_summary">输入按键四角的符号需要滑动的距离 (%s)</string> @@ -90,6 +88,7 @@ This application contains no ads, doesn't make any network requests and is Open <string name="launcher_description">这是一个虚拟键盘软件。点击按钮进入系统设置,然后启用 Unexpected-Keyboard 即可使用。</string> <string name="launcher_sourcecode">这是一个免费且开源的软件。你可以在 Github 上找到源代码或者反馈 bug。</string> <string name="launcher_tryhere">启用键盘后,可以在这里测试效果:</string> + <!-- <string name="launcher_tryhere_hint">Try here</string> --> <!-- <string name="key_descr_capslock">Caps lock</string> --> <!-- <string name="key_descr_switch_greekmath">Greek & math symbols</string> --> <!-- <string name="key_descr_change_method">Switch keyboard</string> --> @@ -110,5 +109,4 @@ This application contains no ads, doesn't make any network requests and is Open <!-- <string name="key_descr_page_down">Page Down</string> --> <!-- <string name="key_descr_home">Home</string> --> <!-- <string name="key_descr_end">End</string> --> - <string name="pref_category_advanced">高级设置</string> </resources> diff --git a/res/values/strings.xml b/res/values/strings.xml index 313475d..e334706 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -35,8 +35,6 @@ This application contains no ads, doesn't make any network requests and is Open <string name="pref_extra_keys_title">Add keys to the keyboard</string> <string name="pref_extra_keys_custom">Add custom keys</string> <string name="pref_extra_keys_internal">Select keys to add to the keyboard</string> - <string name="pref_second_layout_title">Secondary layout</string> - <string name="pref_second_layout_none">None</string> <string name="pref_category_typing">Typing</string> <string name="pref_swipe_dist_title">Swiping distance</string> <string name="pref_swipe_dist_summary">Distance of characters in the corners of the keys (%s)</string> @@ -90,6 +88,7 @@ This application contains no ads, doesn't make any network requests and is Open <string name="launcher_description">This application is a virtual keyboard. Go to the system settings by clicking on the button below and enable Unexpected-Keyboard.</string> <string name="launcher_sourcecode">This is an free and open source application. You can find the source code or report bugs on Github.</string> <string name="launcher_tryhere">After enabling, you can try the keyboard here:</string> + <string name="launcher_tryhere_hint">Try here</string> <string name="key_descr_capslock">Caps lock</string> <string name="key_descr_switch_greekmath">Greek & math symbols</string> <string name="key_descr_change_method">Switch keyboard</string> @@ -110,6 +109,4 @@ This application contains no ads, doesn't make any network requests and is Open <string name="key_descr_page_down">Page Down</string> <string name="key_descr_home">Home</string> <string name="key_descr_end">End</string> - <!-- Unused --> - <string name="pref_category_advanced">Advanced</string> </resources> diff --git a/res/values/values.xml b/res/values/values.xml index 8e40307..cc048e9 100644 --- a/res/values/values.xml +++ b/res/values/values.xml @@ -2,7 +2,6 @@ <resources> <dimen name="margin_top">3dp</dimen> <dimen name="key_padding">2dp</dimen> - <dimen name="emoji_type_button_height">56dp</dimen> <dimen name="emoji_grid_height">250dp</dimen> <dimen name="emoji_text_size">28dp</dimen> <dimen name="pref_button_size">28dp</dimen> diff --git a/srcs/juloo.keyboard2/Config.java b/srcs/juloo.keyboard2/Config.java index a39486d..9f95519 100644 --- a/srcs/juloo.keyboard2/Config.java +++ b/srcs/juloo.keyboard2/Config.java @@ -435,7 +435,7 @@ public final class Config case 1: default: break; } - e.commit(); + e.apply(); } private static LayoutsPreference.Layout migrate_layout(String name) diff --git a/srcs/juloo.keyboard2/DirectBootAwarePreferences.java b/srcs/juloo.keyboard2/DirectBootAwarePreferences.java index fcc67c6..df1612e 100644 --- a/srcs/juloo.keyboard2/DirectBootAwarePreferences.java +++ b/srcs/juloo.keyboard2/DirectBootAwarePreferences.java @@ -59,7 +59,7 @@ public final class DirectBootAwarePreferences // Device is locked, migrate later. return; } - prefs.edit().putBoolean("need_migration", false).commit(); + prefs.edit().putBoolean("need_migration", false).apply(); copy_shared_preferences(prefs, protected_prefs); } @@ -83,6 +83,6 @@ public final class DirectBootAwarePreferences else if (v instanceof Set) e.putStringSet(k, (Set<String>)v); } - e.commit(); + e.apply(); } } diff --git a/srcs/juloo.keyboard2/KeyEventHandler.java b/srcs/juloo.keyboard2/KeyEventHandler.java index 51d4385..65de779 100644 --- a/srcs/juloo.keyboard2/KeyEventHandler.java +++ b/srcs/juloo.keyboard2/KeyEventHandler.java @@ -1,5 +1,6 @@ package juloo.keyboard2; +import android.annotation.SuppressLint; import android.os.Looper; import android.text.InputType; import android.view.KeyEvent; @@ -197,6 +198,7 @@ public final class KeyEventHandler implements Config.IKeyEventHandler conn.performContextMenuAction(id); } + @SuppressLint("InlinedApi") void handle_editing_key(KeyValue.Editing ev) { switch (ev) diff --git a/srcs/juloo.keyboard2/Keyboard2View.java b/srcs/juloo.keyboard2/Keyboard2View.java index 42c93ca..fb95412 100644 --- a/srcs/juloo.keyboard2/Keyboard2View.java +++ b/srcs/juloo.keyboard2/Keyboard2View.java @@ -77,12 +77,14 @@ public class Keyboard2View extends View return; // The intermediate Window is a [Dialog]. Window w = getParentWindow(context); + w.setNavigationBarColor(_theme.colorNavBar); + if (VERSION.SDK_INT < 26) + return; int uiFlags = getSystemUiVisibility(); if (_theme.isLightNavBar) uiFlags |= View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR; else uiFlags &= ~View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR; - w.setNavigationBarColor(_theme.colorNavBar); setSystemUiVisibility(uiFlags); } diff --git a/srcs/juloo.keyboard2/Utils.java b/srcs/juloo.keyboard2/Utils.java index 712c83d..f0f3036 100644 --- a/srcs/juloo.keyboard2/Utils.java +++ b/srcs/juloo.keyboard2/Utils.java @@ -6,6 +6,7 @@ import android.view.Window; import android.view.WindowManager; import java.io.InputStream; import java.io.InputStreamReader; +import java.util.Locale; public final class Utils { @@ -16,7 +17,7 @@ public final class Utils return s; // Make sure not to cut a code point in half int i = s.offsetByCodePoints(0, 1); - return s.substring(0, i).toUpperCase() + s.substring(i); + return s.substring(0, i).toUpperCase(Locale.getDefault()) + s.substring(i); } /** Like [dialog.show()] but properly configure layout params when called diff --git a/srcs/juloo.keyboard2/VoiceImeSwitcher.java b/srcs/juloo.keyboard2/VoiceImeSwitcher.java index 56bd33d..d228130 100644 --- a/srcs/juloo.keyboard2/VoiceImeSwitcher.java +++ b/srcs/juloo.keyboard2/VoiceImeSwitcher.java @@ -65,7 +65,7 @@ class VoiceImeSwitcher prefs.edit() .putString(PREF_LAST_USED, selected.get_id()) .putString(PREF_KNOWN_IMES, serialize_ime_ids(imes)) - .commit(); + .apply(); switch_input_method(ims, selected); } }) |
