mirror of
https://github.com/Julow/Unexpected-Keyboard.git
synced 2025-08-18 01:30:59 +02:00
Compare commits
3 Commits
vertical-s
...
insets-nav
Author | SHA1 | Date | |
---|---|---|---|
|
35bd1d038a | ||
|
0680dd055b | ||
|
4ed8594794 |
@@ -49,8 +49,10 @@
|
||||
<string name="pref_switch_input_immediate_summary">Jak bude klávesa pro přepnutí klávesnice reagovat</string>
|
||||
<string name="pref_vibrate_custom">Vlastní vibrace</string>
|
||||
<string name="pref_vibrate_duration_title">Síla vibrace</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_number_entry_title">Layout when typing numbers, dates and phone numbers</string> -->
|
||||
<!-- <string name="pref_number_entry_layout_pin">PIN Entry</string> -->
|
||||
<!-- <string name="pref_number_entry_layout_number">Number pane</string> -->
|
||||
<!-- <string name="pref_number_entry_layout_normal">Use the main layout</string> -->
|
||||
<string name="pref_category_style">Styl</string>
|
||||
<string name="pref_margin_bottom_title">Spodní odsazení</string>
|
||||
<string name="pref_keyboard_height_title">Výška klávesnice</string>
|
||||
|
@@ -49,8 +49,10 @@
|
||||
<string name="pref_switch_input_immediate_summary">Verhalten der Tastaturumschalttaste</string>
|
||||
<string name="pref_vibrate_custom">Benutzerdefinierte Vibration</string>
|
||||
<string name="pref_vibrate_duration_title">Vibrationsstärke</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_number_entry_title">Layout when typing numbers, dates and phone numbers</string> -->
|
||||
<!-- <string name="pref_number_entry_layout_pin">PIN Entry</string> -->
|
||||
<!-- <string name="pref_number_entry_layout_number">Number pane</string> -->
|
||||
<!-- <string name="pref_number_entry_layout_normal">Use the main layout</string> -->
|
||||
<string name="pref_category_style">Design</string>
|
||||
<string name="pref_margin_bottom_title">Unterer Abstand</string>
|
||||
<string name="pref_keyboard_height_title">Höhe der Tastatur</string>
|
||||
|
@@ -49,8 +49,10 @@
|
||||
<string name="pref_switch_input_immediate_summary">Comportamiento de la tecla para cambiar diseño</string>
|
||||
<string name="pref_vibrate_custom">Vibración personalizada</string>
|
||||
<string name="pref_vibrate_duration_title">Intensidad de vibración</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_number_entry_title">Layout when typing numbers, dates and phone numbers</string> -->
|
||||
<!-- <string name="pref_number_entry_layout_pin">PIN Entry</string> -->
|
||||
<!-- <string name="pref_number_entry_layout_number">Number pane</string> -->
|
||||
<!-- <string name="pref_number_entry_layout_normal">Use the main layout</string> -->
|
||||
<string name="pref_category_style">Estilo</string>
|
||||
<string name="pref_margin_bottom_title">Margen inferior</string>
|
||||
<string name="pref_keyboard_height_title">Altura del teclado</string>
|
||||
|
@@ -49,8 +49,10 @@
|
||||
<string name="pref_switch_input_immediate_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_number_entry_title">Layout when typing numbers, dates and phone numbers</string> -->
|
||||
<!-- <string name="pref_number_entry_layout_pin">PIN Entry</string> -->
|
||||
<!-- <string name="pref_number_entry_layout_number">Number pane</string> -->
|
||||
<!-- <string name="pref_number_entry_layout_normal">Use the main layout</string> -->
|
||||
<string name="pref_category_style">سبک</string>
|
||||
<string name="pref_margin_bottom_title">حاشیه پایین</string>
|
||||
<string name="pref_keyboard_height_title">ارتفاع صفحه کلید</string>
|
||||
|
@@ -49,8 +49,10 @@
|
||||
<string name="pref_switch_input_immediate_summary">Comportement de la touche de changement de clavier</string>
|
||||
<string name="pref_vibrate_custom">Vibrations personnalisées</string>
|
||||
<string name="pref_vibrate_duration_title">Intensité des vibrations</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_number_entry_title">Layout when typing numbers, dates and phone numbers</string> -->
|
||||
<!-- <string name="pref_number_entry_layout_pin">PIN Entry</string> -->
|
||||
<!-- <string name="pref_number_entry_layout_number">Number pane</string> -->
|
||||
<!-- <string name="pref_number_entry_layout_normal">Use the main layout</string> -->
|
||||
<string name="pref_category_style">Style</string>
|
||||
<string name="pref_margin_bottom_title">Marge du bas</string>
|
||||
<string name="pref_keyboard_height_title">Hauteur du clavier</string>
|
||||
|
@@ -49,8 +49,10 @@
|
||||
<!-- <string name="pref_switch_input_immediate_summary">Behavior of the keyboard-switching key</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_number_entry_title">Layout when typing numbers, dates and phone numbers</string> -->
|
||||
<!-- <string name="pref_number_entry_layout_pin">PIN Entry</string> -->
|
||||
<!-- <string name="pref_number_entry_layout_number">Number pane</string> -->
|
||||
<!-- <string name="pref_number_entry_layout_normal">Use the main layout</string> -->
|
||||
<string name="pref_category_style">Stile</string>
|
||||
<string name="pref_margin_bottom_title">Margine inferiore</string>
|
||||
<string name="pref_keyboard_height_title">Altezza tastiera</string>
|
||||
|
@@ -49,8 +49,10 @@
|
||||
<string name="pref_switch_input_immediate_summary">キーボード切替キーの挙動</string>
|
||||
<string name="pref_vibrate_custom">キーボード独自の振動設定</string>
|
||||
<string name="pref_vibrate_duration_title">振動の時間</string>
|
||||
<string name="pref_pin_entry_enabled_title">PIN入力</string>
|
||||
<string name="pref_pin_entry_enabled_summary">数字・日付・電話番号入力時</string>
|
||||
<!-- <string name="pref_number_entry_title">Layout when typing numbers, dates and phone numbers</string> -->
|
||||
<!-- <string name="pref_number_entry_layout_pin">PIN Entry</string> -->
|
||||
<!-- <string name="pref_number_entry_layout_number">Number pane</string> -->
|
||||
<!-- <string name="pref_number_entry_layout_normal">Use the main layout</string> -->
|
||||
<string name="pref_category_style">表示</string>
|
||||
<string name="pref_margin_bottom_title">下の余白</string>
|
||||
<string name="pref_keyboard_height_title">キーボードの高さ</string>
|
||||
|
@@ -49,8 +49,10 @@
|
||||
<string name="pref_switch_input_immediate_summary">키보드 전환 키의 동작 방식입니다.</string>
|
||||
<string name="pref_vibrate_custom">사용자 정의 진동</string>
|
||||
<string name="pref_vibrate_duration_title">진동 강도</string>
|
||||
<string name="pref_pin_entry_enabled_title">Pin 입력 레이아웃</string>
|
||||
<string name="pref_pin_entry_enabled_summary">숫자를 입력할 때, 날짜와 전화번호를 입력할 때 해당 레이아웃이 사용됩니다.</string>
|
||||
<!-- <string name="pref_number_entry_title">Layout when typing numbers, dates and phone numbers</string> -->
|
||||
<!-- <string name="pref_number_entry_layout_pin">PIN Entry</string> -->
|
||||
<!-- <string name="pref_number_entry_layout_number">Number pane</string> -->
|
||||
<!-- <string name="pref_number_entry_layout_normal">Use the main layout</string> -->
|
||||
<string name="pref_category_style">스타일</string>
|
||||
<string name="pref_margin_bottom_title">아래 넓이</string>
|
||||
<string name="pref_keyboard_height_title">키보드 높이</string>
|
||||
|
@@ -49,8 +49,10 @@
|
||||
<string name="pref_switch_input_immediate_summary">Tastatūras pārslēgšanas taustiņa uzvedība</string>
|
||||
<string name="pref_vibrate_custom">Pielāgota trīcēšana</string>
|
||||
<string name="pref_vibrate_duration_title">Trīcēšanas stiprums</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_number_entry_title">Layout when typing numbers, dates and phone numbers</string> -->
|
||||
<!-- <string name="pref_number_entry_layout_pin">PIN Entry</string> -->
|
||||
<!-- <string name="pref_number_entry_layout_number">Number pane</string> -->
|
||||
<!-- <string name="pref_number_entry_layout_normal">Use the main layout</string> -->
|
||||
<string name="pref_category_style">Izskata pielāgojumi</string>
|
||||
<string name="pref_margin_bottom_title">Apakšējā apmale</string>
|
||||
<string name="pref_keyboard_height_title">Tastatūras augstums</string>
|
||||
|
@@ -49,8 +49,10 @@
|
||||
<string name="pref_switch_input_immediate_summary">Działanie klawisza przełączającego klawiaturę</string>
|
||||
<string name="pref_vibrate_custom">Własna wibracja</string>
|
||||
<string name="pref_vibrate_duration_title">Intensywność wibracji</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_number_entry_title">Layout when typing numbers, dates and phone numbers</string> -->
|
||||
<!-- <string name="pref_number_entry_layout_pin">PIN Entry</string> -->
|
||||
<!-- <string name="pref_number_entry_layout_number">Number pane</string> -->
|
||||
<!-- <string name="pref_number_entry_layout_normal">Use the main layout</string> -->
|
||||
<string name="pref_category_style">Styl</string>
|
||||
<string name="pref_margin_bottom_title">Margines dolny</string>
|
||||
<string name="pref_keyboard_height_title">Wysokość klawiatury</string>
|
||||
|
@@ -49,8 +49,10 @@
|
||||
<string name="pref_switch_input_immediate_summary">Comportamento da tecla de troca de teclado</string>
|
||||
<string name="pref_vibrate_custom">Vibração personalizada</string>
|
||||
<string name="pref_vibrate_duration_title">Intensidade da vibração</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_number_entry_title">Layout when typing numbers, dates and phone numbers</string> -->
|
||||
<!-- <string name="pref_number_entry_layout_pin">PIN Entry</string> -->
|
||||
<!-- <string name="pref_number_entry_layout_number">Number pane</string> -->
|
||||
<!-- <string name="pref_number_entry_layout_normal">Use the main layout</string> -->
|
||||
<string name="pref_category_style">Estilo</string>
|
||||
<string name="pref_margin_bottom_title">Margem inferior</string>
|
||||
<string name="pref_keyboard_height_title">Altura do teclado</string>
|
||||
|
@@ -49,8 +49,10 @@
|
||||
<string name="pref_switch_input_immediate_summary">Comportamentul tastei pentru schimbarea tastaturii</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_number_entry_title">Layout when typing numbers, dates and phone numbers</string> -->
|
||||
<!-- <string name="pref_number_entry_layout_pin">PIN Entry</string> -->
|
||||
<!-- <string name="pref_number_entry_layout_number">Number pane</string> -->
|
||||
<!-- <string name="pref_number_entry_layout_normal">Use the main layout</string> -->
|
||||
<string name="pref_category_style">Stil</string>
|
||||
<string name="pref_margin_bottom_title">Marginea de jos</string>
|
||||
<string name="pref_keyboard_height_title">Înălțimea tastaturii</string>
|
||||
|
@@ -49,8 +49,10 @@
|
||||
<string name="pref_switch_input_immediate_summary">Поведение клавиши переключения клавиатуры</string>
|
||||
<string name="pref_vibrate_custom">Настройка вибрации</string>
|
||||
<string name="pref_vibrate_duration_title">Интенсивность вибрации</string>
|
||||
<string name="pref_pin_entry_enabled_title">Закрепить раскладку</string>
|
||||
<string name="pref_pin_entry_enabled_summary">При вводе чисел, дат и телефонных номеров</string>
|
||||
<!-- <string name="pref_number_entry_title">Layout when typing numbers, dates and phone numbers</string> -->
|
||||
<!-- <string name="pref_number_entry_layout_pin">PIN Entry</string> -->
|
||||
<!-- <string name="pref_number_entry_layout_number">Number pane</string> -->
|
||||
<!-- <string name="pref_number_entry_layout_normal">Use the main layout</string> -->
|
||||
<string name="pref_category_style">Стиль</string>
|
||||
<string name="pref_margin_bottom_title">Нижняя граница поля</string>
|
||||
<string name="pref_keyboard_height_title">Высота клавиатуры</string>
|
||||
|
@@ -49,8 +49,10 @@
|
||||
<string name="pref_switch_input_immediate_summary">Klavye değistirme tuşunun davranışını belirler</string>
|
||||
<string name="pref_vibrate_custom">Özel titreşim</string>
|
||||
<string name="pref_vibrate_duration_title">Titreşim yoğunluğu</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_number_entry_title">Layout when typing numbers, dates and phone numbers</string> -->
|
||||
<!-- <string name="pref_number_entry_layout_pin">PIN Entry</string> -->
|
||||
<!-- <string name="pref_number_entry_layout_number">Number pane</string> -->
|
||||
<!-- <string name="pref_number_entry_layout_normal">Use the main layout</string> -->
|
||||
<string name="pref_category_style">Tarz</string>
|
||||
<string name="pref_margin_bottom_title">Alt boşluk</string>
|
||||
<string name="pref_keyboard_height_title">Klavye yüksekliği</string>
|
||||
|
@@ -49,8 +49,10 @@
|
||||
<string name="pref_switch_input_immediate_summary">Поведінка клавіші перемикання клавіатури</string>
|
||||
<string name="pref_vibrate_custom">Спеціальна вібрація</string>
|
||||
<string name="pref_vibrate_duration_title">Інтенсивність вібрації</string>
|
||||
<string name="pref_pin_entry_enabled_title">Макет введення PIN-коду</string>
|
||||
<string name="pref_pin_entry_enabled_summary">При наборі чисел, дат і номерів телефонів</string>
|
||||
<!-- <string name="pref_number_entry_title">Layout when typing numbers, dates and phone numbers</string> -->
|
||||
<!-- <string name="pref_number_entry_layout_pin">PIN Entry</string> -->
|
||||
<!-- <string name="pref_number_entry_layout_number">Number pane</string> -->
|
||||
<!-- <string name="pref_number_entry_layout_normal">Use the main layout</string> -->
|
||||
<string name="pref_category_style">Стиль</string>
|
||||
<string name="pref_margin_bottom_title">Поле знизу</string>
|
||||
<string name="pref_keyboard_height_title">Висота клавіатури</string>
|
||||
|
@@ -49,8 +49,10 @@
|
||||
<!-- <string name="pref_switch_input_immediate_summary">Behavior of the keyboard-switching key</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_number_entry_title">Layout when typing numbers, dates and phone numbers</string> -->
|
||||
<!-- <string name="pref_number_entry_layout_pin">PIN Entry</string> -->
|
||||
<!-- <string name="pref_number_entry_layout_number">Number pane</string> -->
|
||||
<!-- <string name="pref_number_entry_layout_normal">Use the main layout</string> -->
|
||||
<string name="pref_category_style">Kiểu cách</string>
|
||||
<string name="pref_margin_bottom_title">Căn lề dưới</string>
|
||||
<string name="pref_keyboard_height_title">Chiều cao bàn phím</string>
|
||||
|
@@ -49,8 +49,10 @@
|
||||
<string name="pref_switch_input_immediate_summary">切换键盘按钮的行为</string>
|
||||
<string name="pref_vibrate_custom">自定义振动</string>
|
||||
<string name="pref_vibrate_duration_title">振动强度</string>
|
||||
<string name="pref_pin_entry_enabled_title">数字输入布局</string>
|
||||
<string name="pref_pin_entry_enabled_summary">输入数字、日期与电话号码时</string>
|
||||
<!-- <string name="pref_number_entry_title">Layout when typing numbers, dates and phone numbers</string> -->
|
||||
<!-- <string name="pref_number_entry_layout_pin">PIN Entry</string> -->
|
||||
<!-- <string name="pref_number_entry_layout_number">Number pane</string> -->
|
||||
<!-- <string name="pref_number_entry_layout_normal">Use the main layout</string> -->
|
||||
<string name="pref_category_style">样式</string>
|
||||
<string name="pref_margin_bottom_title">键盘下边距</string>
|
||||
<string name="pref_keyboard_height_title">键盘高度</string>
|
||||
|
@@ -84,4 +84,14 @@
|
||||
<item>4</item>
|
||||
<item>12</item>
|
||||
</string-array>
|
||||
<string-array name="pref_number_entry_entries">
|
||||
<item>@string/pref_number_entry_layout_pin</item>
|
||||
<item>@string/pref_number_entry_layout_number</item>
|
||||
<item>@string/pref_number_entry_layout_normal</item>
|
||||
</string-array>
|
||||
<string-array name="pref_number_entry_values">
|
||||
<item>pin</item>
|
||||
<item>number</item>
|
||||
<item>normal</item>
|
||||
</string-array>
|
||||
</resources>
|
||||
|
@@ -49,8 +49,10 @@
|
||||
<string name="pref_switch_input_immediate_summary">Behavior of the keyboard-switching key</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_number_entry_title">Layout when typing numbers, dates and phone numbers</string>
|
||||
<string name="pref_number_entry_layout_pin">PIN Entry</string>
|
||||
<string name="pref_number_entry_layout_number">Number pane</string>
|
||||
<string name="pref_number_entry_layout_normal">Use the main layout</string>
|
||||
<string name="pref_category_style">Style</string>
|
||||
<string name="pref_margin_bottom_title">Margin bottom</string>
|
||||
<string name="pref_keyboard_height_title">Keyboard height</string>
|
||||
|
@@ -6,9 +6,6 @@
|
||||
<dimen name="emoji_text_size">28dp</dimen>
|
||||
<dimen name="clipboard_view_height">300dp</dimen>
|
||||
<dimen name="pref_button_size">28dp</dimen>
|
||||
<!-- Margin needed to accomodate the gesture nav bar on Android 15. Found in
|
||||
[core/res/res/values/dimens.xml]. -->
|
||||
<dimen name="bottom_inset_min">48dp</dimen>
|
||||
<!-- Will be overwritten automatically by Gradle for the debug build variant -->
|
||||
<bool name="debug_logs">false</bool>
|
||||
</resources>
|
||||
|
@@ -25,7 +25,7 @@
|
||||
<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"/>
|
||||
<CheckBoxPreference android:key="vibrate_custom" android:title="@string/pref_vibrate_custom" android:defaultValue="false"/>
|
||||
<juloo.keyboard2.prefs.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"/>
|
||||
<ListPreference android:key="number_entry_layout" android:title="@string/pref_number_entry_title" android:summary="%s" android:defaultValue="pin" android:entries="@array/pref_number_entry_entries" android:entryValues="@array/pref_number_entry_values"/>
|
||||
</PreferenceCategory>
|
||||
<PreferenceCategory android:title="@string/pref_category_style">
|
||||
<ListPreference android:key="theme" android:title="@string/pref_theme" android:summary="%s" android:defaultValue="system" android:entries="@array/pref_theme_entries" android:entryValues="@array/pref_theme_values"/>
|
||||
|
@@ -58,7 +58,7 @@ public final class Config
|
||||
public int theme; // Values are R.style.*
|
||||
public boolean autocapitalisation;
|
||||
public boolean switch_input_immediate;
|
||||
public boolean pin_entry_enabled;
|
||||
public NumberLayout selected_number_layout;
|
||||
public boolean borderConfig;
|
||||
public int circle_sensitivity;
|
||||
public boolean clipboard_history_enabled;
|
||||
@@ -81,7 +81,6 @@ public final class Config
|
||||
int current_layout_landscape;
|
||||
int current_layout_unfolded_portrait;
|
||||
int current_layout_unfolded_landscape;
|
||||
public int bottomInsetMin;
|
||||
|
||||
private Config(SharedPreferences prefs, Resources res, IKeyEventHandler h, Boolean foldableUnfolded)
|
||||
{
|
||||
@@ -169,15 +168,13 @@ public final class Config
|
||||
switch_input_immediate = _prefs.getBoolean("switch_input_immediate", false);
|
||||
extra_keys_param = ExtraKeysPreference.get_extra_keys(_prefs);
|
||||
extra_keys_custom = CustomExtraKeysPreference.get(_prefs);
|
||||
pin_entry_enabled = _prefs.getBoolean("pin_entry_enabled", true);
|
||||
selected_number_layout = NumberLayout.valueOf(_prefs.getString("number_entry_layout", "pin").toUpperCase());
|
||||
current_layout_portrait = _prefs.getInt("current_layout_portrait", 0);
|
||||
current_layout_landscape = _prefs.getInt("current_layout_landscape", 0);
|
||||
current_layout_unfolded_portrait = _prefs.getInt("current_layout_unfolded_portrait", 0);
|
||||
current_layout_unfolded_landscape = _prefs.getInt("current_layout_unfolded_landscape", 0);
|
||||
circle_sensitivity = Integer.valueOf(_prefs.getString("circle_sensitivity", "2"));
|
||||
clipboard_history_enabled = _prefs.getBoolean("clipboard_history_enabled", false);
|
||||
bottomInsetMin = Utils.is_navigation_bar_gestural(res) ?
|
||||
(int)res.getDimension(R.dimen.bottom_inset_min) : 0;
|
||||
}
|
||||
|
||||
public int get_current_layout()
|
||||
@@ -300,7 +297,7 @@ public final class Config
|
||||
|
||||
/** Config migrations. */
|
||||
|
||||
private static int CONFIG_VERSION = 2;
|
||||
private static int CONFIG_VERSION = 3;
|
||||
|
||||
public static void migrate(SharedPreferences prefs)
|
||||
{
|
||||
@@ -332,6 +329,11 @@ public final class Config
|
||||
e.putString("number_row", add_number_row ? "no_symbols" : "no_number_row");
|
||||
// Fallthrough
|
||||
case 2:
|
||||
if (!prefs.contains("number_entry_layout")) {
|
||||
e.putString("number_entry_layout", prefs.getBoolean("pin_entry_enabled", true) ? "pin" : "number");
|
||||
}
|
||||
// Fallthrough
|
||||
case 3:
|
||||
default: break;
|
||||
}
|
||||
e.apply();
|
||||
|
@@ -265,9 +265,9 @@ public class Keyboard2 extends InputMethodService
|
||||
case InputType.TYPE_CLASS_NUMBER:
|
||||
case InputType.TYPE_CLASS_PHONE:
|
||||
case InputType.TYPE_CLASS_DATETIME:
|
||||
if (_config.pin_entry_enabled)
|
||||
if (_config.selected_number_layout == NumberLayout.PIN)
|
||||
return loadPinentry(R.xml.pin);
|
||||
else
|
||||
else if (_config.selected_number_layout == NumberLayout.NUMBER)
|
||||
return loadNumpad(R.xml.numeric);
|
||||
default:
|
||||
break;
|
||||
|
@@ -47,6 +47,9 @@ public class Keyboard2View extends View
|
||||
private float _marginRight;
|
||||
private float _marginLeft;
|
||||
private float _marginBottom;
|
||||
private int _insets_left = 0;
|
||||
private int _insets_right = 0;
|
||||
private int _insets_bottom = 0;
|
||||
|
||||
private Theme _theme;
|
||||
private Theme.Computed _tc;
|
||||
@@ -264,35 +267,11 @@ public class Keyboard2View extends View
|
||||
public void onMeasure(int wSpec, int hSpec)
|
||||
{
|
||||
int width;
|
||||
int insets_left = 0;
|
||||
int insets_right = 0;
|
||||
int insets_bottom = 0;
|
||||
// LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS is set in [Keyboard2#updateSoftInputWindowLayoutParams].
|
||||
// and keyboard is allowed do draw behind status/navigation bars
|
||||
if (VERSION.SDK_INT >= 35)
|
||||
{
|
||||
WindowMetrics metrics =
|
||||
((WindowManager)getContext().getSystemService(Context.WINDOW_SERVICE))
|
||||
.getCurrentWindowMetrics();
|
||||
width = metrics.getBounds().width();
|
||||
WindowInsets wi = metrics.getWindowInsets();
|
||||
int insets_types =
|
||||
WindowInsets.Type.systemBars()
|
||||
| WindowInsets.Type.displayCutout()
|
||||
| WindowInsets.Type.mandatorySystemGestures();
|
||||
Insets insets = wi.getInsets(insets_types);
|
||||
insets_left = insets.left;
|
||||
insets_right = insets.right;
|
||||
insets_bottom = Math.max(insets.bottom, _config.bottomInsetMin);
|
||||
}
|
||||
else
|
||||
{
|
||||
DisplayMetrics dm = getContext().getResources().getDisplayMetrics();
|
||||
width = dm.widthPixels;
|
||||
}
|
||||
_marginLeft = Math.max(_config.horizontal_margin, insets_left);
|
||||
_marginRight = Math.max(_config.horizontal_margin, insets_right);
|
||||
_marginBottom = _config.margin_bottom + insets_bottom;
|
||||
DisplayMetrics dm = getContext().getResources().getDisplayMetrics();
|
||||
width = dm.widthPixels;
|
||||
_marginLeft = Math.max(_config.horizontal_margin, _insets_left);
|
||||
_marginRight = Math.max(_config.horizontal_margin, _insets_right);
|
||||
_marginBottom = _config.margin_bottom + _insets_bottom;
|
||||
_keyWidth = (width - _marginLeft - _marginRight) / _keyboard.keysWidth;
|
||||
_tc = new Theme.Computed(_theme, _config, _keyWidth, _keyboard);
|
||||
// Compute the size of labels based on the width or the height of keys. The
|
||||
@@ -328,6 +307,22 @@ public class Keyboard2View extends View
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public WindowInsets onApplyWindowInsets(WindowInsets wi)
|
||||
{
|
||||
// LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS is set in [Keyboard2#updateSoftInputWindowLayoutParams] for SDK_INT >= 35.
|
||||
if (VERSION.SDK_INT < 35)
|
||||
return wi;
|
||||
int insets_types =
|
||||
WindowInsets.Type.systemBars()
|
||||
| WindowInsets.Type.displayCutout();
|
||||
Insets insets = wi.getInsets(insets_types);
|
||||
_insets_left = insets.left;
|
||||
_insets_right = insets.right;
|
||||
_insets_bottom = insets.bottom;
|
||||
return WindowInsets.CONSUMED;
|
||||
}
|
||||
|
||||
/** Horizontal and vertical position of the 9 indexes. */
|
||||
static final Paint.Align[] LABEL_POSITION_H = new Paint.Align[]{
|
||||
Paint.Align.CENTER, Paint.Align.LEFT, Paint.Align.RIGHT, Paint.Align.LEFT,
|
||||
|
7
srcs/juloo.keyboard2/NumberLayout.java
Normal file
7
srcs/juloo.keyboard2/NumberLayout.java
Normal file
@@ -0,0 +1,7 @@
|
||||
package juloo.keyboard2;
|
||||
|
||||
public enum NumberLayout {
|
||||
PIN,
|
||||
NUMBER,
|
||||
NORMAL
|
||||
}
|
@@ -608,10 +608,6 @@ public final class Pointers implements Handler.Callback
|
||||
static final float SPEED_SMOOTHING = 0.7f;
|
||||
/** Avoid absurdly large values. */
|
||||
static final float SPEED_MAX = 4.f;
|
||||
/** Make vertical sliders slower. The intention is to make the up/down
|
||||
slider slower, as we have less visibility and do smaller movements in
|
||||
that direction. */
|
||||
static final float SPEED_VERTICAL_MULT = 0.5f;
|
||||
|
||||
public void onTouchMove(Pointer ptr, float x, float y)
|
||||
{
|
||||
@@ -625,9 +621,8 @@ public final class Pointers implements Handler.Callback
|
||||
return;
|
||||
last_move_ms = System.currentTimeMillis();
|
||||
}
|
||||
d += ((x - last_x) * speed * direction_x
|
||||
+ (y - last_y) * speed * SPEED_VERTICAL_MULT * direction_y)
|
||||
/ _config.slide_step_px;
|
||||
d += ((x - last_x) * direction_x + (y - last_y) * direction_y)
|
||||
* speed / _config.slide_step_px;
|
||||
update_speed(travelled, x, y);
|
||||
// Send an event when [abs(d)] exceeds [1].
|
||||
int d_ = (int)d;
|
||||
|
@@ -49,14 +49,4 @@ public final class Utils
|
||||
out.append(buff, 0, l);
|
||||
return out.toString();
|
||||
}
|
||||
|
||||
/** Whether the thin gesture-navigation bar is used.
|
||||
https://stackoverflow.com/questions/36514167/how-to-really-get-the-navigation-bar-height-in-android
|
||||
*/
|
||||
public static boolean is_navigation_bar_gestural(Resources res)
|
||||
{
|
||||
// core/java/android/view/WindowManagerPolicyConstants.java
|
||||
int res_id = res.getIdentifier("config_navBarInteractionMode", "integer", "android");
|
||||
return (res_id > 0 && res.getInteger(res_id) == 2);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user