Reorganized the typing settings. The Predictive and ABC mode settings are on separate screens now
This commit is contained in:
parent
83c2296d9f
commit
3ecdd7020e
22 changed files with 139 additions and 78 deletions
|
|
@ -28,6 +28,8 @@ import io.github.sspanak.tt9.preferences.screens.keypad.KeyPadScreen;
|
|||
import io.github.sspanak.tt9.preferences.screens.languageSelection.LanguageSelectionScreen;
|
||||
import io.github.sspanak.tt9.preferences.screens.languages.LanguagesScreen;
|
||||
import io.github.sspanak.tt9.preferences.screens.main.MainSettingsScreen;
|
||||
import io.github.sspanak.tt9.preferences.screens.modeAbc.ModeAbcScreen;
|
||||
import io.github.sspanak.tt9.preferences.screens.modePredictive.ModePredictiveScreen;
|
||||
import io.github.sspanak.tt9.preferences.screens.setup.SetupScreen;
|
||||
import io.github.sspanak.tt9.ui.ActivityWithNavigation;
|
||||
import io.github.sspanak.tt9.util.Logger;
|
||||
|
|
@ -146,6 +148,10 @@ public class PreferencesActivity extends ActivityWithNavigation implements Prefe
|
|||
return new LanguagesScreen(this);
|
||||
case LanguageSelectionScreen.NAME:
|
||||
return new LanguageSelectionScreen(this);
|
||||
case ModePredictiveScreen.NAME:
|
||||
return new ModePredictiveScreen(this);
|
||||
case ModeAbcScreen.NAME:
|
||||
return new ModeAbcScreen(this);
|
||||
case SetupScreen.NAME:
|
||||
return new SetupScreen(this);
|
||||
case UsageStatsScreen.NAME:
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ package io.github.sspanak.tt9.preferences.screens.keypad;
|
|||
|
||||
import io.github.sspanak.tt9.R;
|
||||
import io.github.sspanak.tt9.preferences.PreferencesActivity;
|
||||
import io.github.sspanak.tt9.preferences.items.ItemDropDown;
|
||||
import io.github.sspanak.tt9.preferences.screens.BaseScreenFragment;
|
||||
|
||||
public class KeyPadScreen extends BaseScreenFragment {
|
||||
|
|
@ -17,17 +16,7 @@ public class KeyPadScreen extends BaseScreenFragment {
|
|||
@Override
|
||||
protected void onCreate() {
|
||||
(new ItemHapticFeedback(findPreference(ItemHapticFeedback.NAME), activity.getSettings())).populate().enableClickHandler();
|
||||
|
||||
ItemDropDown[] items = {
|
||||
new ItemSelectZeroKeyCharacter(findPreference(ItemSelectZeroKeyCharacter.NAME), activity),
|
||||
new ItemSelectABCAutoAccceptTime(findPreference(ItemSelectABCAutoAccceptTime.NAME), activity),
|
||||
new ItemKeyPadDebounceTime(findPreference(ItemKeyPadDebounceTime.NAME), activity)
|
||||
};
|
||||
|
||||
for (ItemDropDown item : items) {
|
||||
item.populate().enableClickHandler().preview();
|
||||
}
|
||||
|
||||
(new ItemKeyPadDebounceTime(findPreference(ItemKeyPadDebounceTime.NAME), activity)).populate().enableClickHandler().preview();
|
||||
resetFontSize(false);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
package io.github.sspanak.tt9.preferences.screens.keypad;
|
||||
package io.github.sspanak.tt9.preferences.screens.modeAbc;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
|
|
@ -10,16 +10,16 @@ import io.github.sspanak.tt9.R;
|
|||
import io.github.sspanak.tt9.preferences.items.ItemDropDown;
|
||||
|
||||
|
||||
public class ItemSelectABCAutoAccceptTime extends ItemDropDown {
|
||||
public class ItemSelectAbcAutoAccceptTime extends ItemDropDown {
|
||||
public static final String NAME = "pref_abc_auto_accept_time";
|
||||
private final Context context;
|
||||
|
||||
public ItemSelectABCAutoAccceptTime(DropDownPreference item, Context context) {
|
||||
public ItemSelectAbcAutoAccceptTime(DropDownPreference item, Context context) {
|
||||
super(item);
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
public ItemSelectABCAutoAccceptTime populate() {
|
||||
public ItemSelectAbcAutoAccceptTime populate() {
|
||||
LinkedHashMap<String, String> dropDownOptions = new LinkedHashMap<>();
|
||||
dropDownOptions.put("-1", context.getString(R.string.pref_abc_auto_accept_off));
|
||||
dropDownOptions.put("350", context.getString(R.string.pref_abc_auto_accept_fastest));
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
package io.github.sspanak.tt9.preferences.screens.modeAbc;
|
||||
|
||||
import io.github.sspanak.tt9.R;
|
||||
import io.github.sspanak.tt9.preferences.PreferencesActivity;
|
||||
import io.github.sspanak.tt9.preferences.screens.BaseScreenFragment;
|
||||
|
||||
public class ModeAbcScreen extends BaseScreenFragment {
|
||||
public static final String NAME = "ModeAbc";
|
||||
|
||||
public ModeAbcScreen() { init(); }
|
||||
public ModeAbcScreen(PreferencesActivity activity) { init(activity); }
|
||||
|
||||
@Override public String getName() { return NAME; }
|
||||
@Override protected int getTitle() { return R.string.pref_category_abc_mode; }
|
||||
@Override protected int getXml() { return R.xml.prefs_screen_mode_abc; }
|
||||
|
||||
@Override
|
||||
protected void onCreate() {
|
||||
new ItemSelectAbcAutoAccceptTime(findPreference(ItemSelectAbcAutoAccceptTime.NAME), activity).populate().enableClickHandler().preview();
|
||||
resetFontSize(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package io.github.sspanak.tt9.preferences.screens.keypad;
|
||||
package io.github.sspanak.tt9.preferences.screens.modePredictive;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package io.github.sspanak.tt9.preferences.screens.modePredictive;
|
||||
|
||||
import io.github.sspanak.tt9.R;
|
||||
import io.github.sspanak.tt9.preferences.PreferencesActivity;
|
||||
import io.github.sspanak.tt9.preferences.screens.BaseScreenFragment;
|
||||
|
||||
public class ModePredictiveScreen extends BaseScreenFragment {
|
||||
public static final String NAME = "ModePredictive";
|
||||
|
||||
public ModePredictiveScreen() { init(); }
|
||||
public ModePredictiveScreen(PreferencesActivity activity) { init(activity); }
|
||||
|
||||
@Override public String getName() { return NAME; }
|
||||
@Override protected int getTitle() { return R.string.pref_category_predictive_mode; }
|
||||
@Override protected int getXml() { return R.xml.prefs_screen_mode_predictive; }
|
||||
|
||||
@Override
|
||||
protected void onCreate() {
|
||||
new ItemSelectZeroKeyCharacter(findPreference(ItemSelectZeroKeyCharacter.NAME), activity).populate().enableClickHandler().preview();
|
||||
resetFontSize(false);
|
||||
}
|
||||
}
|
||||
|
|
@ -98,6 +98,7 @@
|
|||
<string name="dictionary_loading_indeterminate">Зареждане на речник</string>
|
||||
<string name="dictionary_load_no_internet">Неуспешно изтегляне на речника за език „%1$s“. Проверете връзката с интернет.</string>
|
||||
<string name="dictionary_load_cancelled">Зареждането е отменено.</string>
|
||||
<string name="pref_category_typing_modes">Режими на писане</string>
|
||||
<string name="pref_abc_auto_accept">Автоматичен избор на буква</string>
|
||||
<string name="pref_abc_auto_accept_off">Изключен</string>
|
||||
<string name="pref_abc_auto_accept_fastest">Много бърз</string>
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
<string name="pref_haptic_feedback_summary">Vibrieren beim Drücken einer virtuellen Taste.</string>
|
||||
<string name="pref_help">Hilfe</string>
|
||||
<string name="pref_dark_theme">Dunkles Thema</string>
|
||||
<string name="pref_category_typing_modes">Eingabemodi</string>
|
||||
<string name="pref_abc_auto_accept">Automatische Buchstabenauswahl</string>
|
||||
<string name="pref_abc_auto_accept_off">Aus</string>
|
||||
<string name="pref_abc_auto_accept_fastest">Sehr schnell</string>
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@
|
|||
<string name="dictionary_cancel_load">Cancelar la carga</string>
|
||||
<string name="pref_auto_text_case">Mayúsculas automáticas</string>
|
||||
<string name="pref_auto_text_case_summary">Escribir la primera letra de cada frase en mayúscula.</string>
|
||||
<string name="pref_category_typing_modes">Modos de escritura</string>
|
||||
<string name="pref_abc_auto_accept">Selección automática de letra</string>
|
||||
<string name="pref_abc_auto_accept_off">Apagada</string>
|
||||
<string name="pref_abc_auto_accept_fastest">Muy rápido</string>
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@
|
|||
<string name="dictionary_load_no_internet">Échec du téléchargement du dictionnaire pour la langue « %1$s ». Vérifiez la connexion Internet.</string>
|
||||
<string name="dictionary_load_cancelled">Chargement est annulé.</string>
|
||||
<string name="pref_category_predictive_mode">Saisie intuitive</string>
|
||||
<string name="pref_category_typing_modes">Modes de saisie</string>
|
||||
<string name="pref_abc_auto_accept">Sélection de lettre automatique</string>
|
||||
<string name="pref_abc_auto_accept_off">Désactivée</string>
|
||||
<string name="pref_abc_auto_accept_fastest">Très rapide</string>
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@
|
|||
<string name="pref_haptic_feedback_summary">Vibrare alla pressione di un tasto virtuale.</string>
|
||||
<string name="pref_help">Aiuto</string>
|
||||
<string name="pref_dark_theme">Tema scuro</string>
|
||||
<string name="pref_category_typing_modes">Modalità di digitazione</string>
|
||||
<string name="pref_abc_auto_accept">Selezione automatica delle lettere</string>
|
||||
<string name="pref_abc_auto_accept_off">Spenta</string>
|
||||
<string name="pref_abc_auto_accept_fastest">Molto veloce</string>
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
<string name="pref_category_function_keys">בחר מקשי קיצור</string>
|
||||
<string name="pref_category_keypad">מקלדת</string>
|
||||
|
||||
<string name="pref_category_typing_modes">מצבי הקלדה</string>
|
||||
<string name="pref_abc_auto_accept">בחירת אותיות אוטומטית</string>
|
||||
<string name="pref_abc_auto_accept_off">כבויה</string>
|
||||
<string name="pref_abc_auto_accept_fastest">מאוד מהיר</string>
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
<string name="pref_category_keypad">Mygtukai</string>
|
||||
<string name="pref_category_setup">Pradiniai nustatymai</string>
|
||||
|
||||
<string name="pref_category_typing_modes">Įvedimo režimai</string>
|
||||
<string name="pref_abc_auto_accept">Automatinis raidės pasirinkimas</string>
|
||||
<string name="pref_abc_auto_accept_off">Išjungtas</string>
|
||||
<string name="pref_abc_auto_accept_fastest">Labai greitas</string>
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
<string name="pref_haptic_feedback_summary">Trillen bij het indrukken van een virtuele toets.</string>
|
||||
<string name="pref_help">Helpen</string>
|
||||
<string name="pref_dark_theme">Donker thema</string>
|
||||
<string name="pref_category_typing_modes">Typen modi</string>
|
||||
<string name="pref_abc_auto_accept">Automatische letterselectie</string>
|
||||
<string name="pref_abc_auto_accept_off">Uit</string>
|
||||
<string name="pref_abc_auto_accept_fastest">Zeer snel</string>
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
<string name="pref_category_keypad">Teclado</string>
|
||||
|
||||
<string name="pref_category_setup">Configuração inicial</string>
|
||||
<string name="pref_category_typing_modes">Modos de digitação</string>
|
||||
<string name="pref_abc_auto_accept">Seleção automática de letras</string>
|
||||
<string name="pref_abc_auto_accept_off">Desligada</string>
|
||||
<string name="pref_abc_auto_accept_fastest">Muito rápido</string>
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@
|
|||
<string name="pref_category_hacks">Cовместимость</string>
|
||||
<string name="pref_category_appearance">Внешний вид</string>
|
||||
<string name="pref_category_function_keys">Горячие клавиши</string>
|
||||
<string name="pref_category_typing_modes">Режимы ввода</string>
|
||||
<string name="pref_abc_auto_accept">Автоматический выбор буквы</string>
|
||||
<string name="pref_abc_auto_accept_off">Выключено</string>
|
||||
<string name="pref_abc_auto_accept_fastest">Очень быстро</string>
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
<string name="pref_haptic_feedback_summary">Sanal bir tuşa basıldığında titremek.</string>
|
||||
<string name="pref_help">Yardım</string>
|
||||
<string name="pref_dark_theme">Karanlık Tema</string>
|
||||
<string name="pref_category_typing_modes">Yazma Modları</string>
|
||||
<string name="pref_abc_auto_accept">Otomatik Harf Seçimi</string>
|
||||
<string name="pref_abc_auto_accept_off">Devre Dışı</string>
|
||||
<string name="pref_abc_auto_accept_fastest">Çok Hızlı</string>
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@
|
|||
<string name="pref_category_keypad">Клавіатура</string>
|
||||
<string name="pref_category_setup">Початкові налаштування</string>
|
||||
|
||||
<string name="pref_category_typing_modes">Режими введення</string>
|
||||
<string name="pref_abc_auto_accept">Автоматичний вибір літери</string>
|
||||
<string name="pref_abc_auto_accept_off">Вимкнено</string>
|
||||
<string name="pref_abc_auto_accept_fastest">Дуже швидко</string>
|
||||
|
|
|
|||
|
|
@ -28,15 +28,16 @@
|
|||
|
||||
<string name="pref_category_about">About</string>
|
||||
<string name="pref_category_abc_mode">ABC Mode</string>
|
||||
<string name="pref_category_custom_words">Added Words</string>
|
||||
<string name="pref_category_delete_words">Delete Added Words</string>
|
||||
<string name="pref_category_hacks">Compatibility</string>
|
||||
<string name="pref_category_appearance">Appearance</string>
|
||||
<string name="pref_category_custom_words">Added Words</string>
|
||||
<string name="pref_category_debug_options" translatable="false">Debug Options</string>
|
||||
<string name="pref_category_predictive_mode">Predictive Mode</string>
|
||||
<string name="pref_category_delete_words">Delete Added Words</string>
|
||||
<string name="pref_category_function_keys">Select Hotkeys</string>
|
||||
<string name="pref_category_hacks">Compatibility</string>
|
||||
<string name="pref_category_keypad">Keypad</string>
|
||||
<string name="pref_category_predictive_mode">Predictive Mode</string>
|
||||
<string name="pref_category_setup">Initial Setup</string>
|
||||
<string name="pref_category_typing_modes">Typing Modes</string>
|
||||
<string name="pref_category_usage_stats" translatable="false">Usage Stats</string>
|
||||
|
||||
<string name="pref_abc_auto_accept">Automatic Letter Selection</string>
|
||||
|
|
|
|||
|
|
@ -1,77 +1,46 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
app:orderingFromXml="true">
|
||||
android:orderingFromXml="true">
|
||||
|
||||
<Preference
|
||||
app:fragment="io.github.sspanak.tt9.preferences.HotkeysScreen"
|
||||
app:key="screen_hotkeys"
|
||||
app:title="@string/pref_category_function_keys" />
|
||||
android:fragment="io.github.sspanak.tt9.preferences.screens.hotkeys.HotkeysScreen"
|
||||
android:key="screen_hotkeys"
|
||||
android:title="@string/pref_category_function_keys" />
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
app:defaultValue="false"
|
||||
app:key="backspace_acceleration"
|
||||
app:title="@string/pref_backspace_acceleration"
|
||||
app:summary="@string/pref_backspace_acceleration_summary" />
|
||||
android:defaultValue="false"
|
||||
android:key="backspace_acceleration"
|
||||
android:title="@string/pref_backspace_acceleration"
|
||||
android:summary="@string/pref_backspace_acceleration_summary" />
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
app:key="pref_haptic_feedback"
|
||||
app:title="@string/pref_haptic_feedback"
|
||||
app:summary="@string/pref_haptic_feedback_summary"/>
|
||||
android:key="pref_haptic_feedback"
|
||||
android:title="@string/pref_haptic_feedback"
|
||||
android:summary="@string/pref_haptic_feedback_summary"/>
|
||||
|
||||
<PreferenceCategory android:title="@string/pref_category_predictive_mode">
|
||||
<PreferenceCategory android:title="@string/pref_category_typing_modes">
|
||||
<Preference
|
||||
android:fragment="io.github.sspanak.tt9.preferences.screens.modePredictive.ModePredictiveScreen"
|
||||
android:key="screen_predictive_mode"
|
||||
android:title="@string/pref_category_predictive_mode" />
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
app:defaultValue="true"
|
||||
app:key="auto_space"
|
||||
app:title="@string/pref_auto_space"
|
||||
app:summary="@string/pref_auto_space_summary" />
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
app:defaultValue="true"
|
||||
app:key="auto_text_case"
|
||||
app:summary="@string/pref_auto_text_case_summary"
|
||||
app:title="@string/pref_auto_text_case" />
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
app:defaultValue="false"
|
||||
app:dependency="auto_text_case"
|
||||
app:key="auto_capitals_after_newline"
|
||||
app:summary="@string/pref_auto_capitals_after_newline_summary"
|
||||
app:title="@string/pref_auto_capitals_after_newline" />
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
app:defaultValue="true"
|
||||
app:key="backspace_recomposing"
|
||||
app:title="@string/pref_backspace_recomposing"
|
||||
app:summary="@string/pref_backspace_recomposing_summary" />
|
||||
|
||||
<DropDownPreference
|
||||
app:defaultValue="."
|
||||
app:key="pref_double_zero_char"
|
||||
app:title="@string/pref_double_zero_char" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
|
||||
<PreferenceCategory android:title="@string/pref_category_abc_mode">
|
||||
<DropDownPreference
|
||||
app:defaultValue="800"
|
||||
app:key="pref_abc_auto_accept_time"
|
||||
app:title="@string/pref_abc_auto_accept" />
|
||||
<Preference
|
||||
android:fragment="io.github.sspanak.tt9.preferences.screens.modeAbc.ModeAbcScreen"
|
||||
android:key="screen_abc_mode"
|
||||
android:title="@string/pref_category_abc_mode" />
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory android:title="@string/pref_category_hacks">
|
||||
<DropDownPreference
|
||||
app:key="pref_key_pad_debounce_time"
|
||||
app:title="@string/pref_hack_key_pad_debounce_time" />
|
||||
android:key="pref_key_pad_debounce_time"
|
||||
android:title="@string/pref_hack_key_pad_debounce_time" />
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
app:defaultValue="false"
|
||||
app:key="pref_upside_down_keys"
|
||||
app:summary="@string/pref_upside_down_keys_summary"
|
||||
app:title="@string/pref_upside_down_keys" />
|
||||
android:defaultValue="false"
|
||||
android:key="pref_upside_down_keys"
|
||||
android:summary="@string/pref_upside_down_keys_summary"
|
||||
android:title="@string/pref_upside_down_keys" />
|
||||
</PreferenceCategory>
|
||||
|
||||
</PreferenceScreen>
|
||||
|
|
|
|||
7
app/src/main/res/xml/prefs_screen_mode_abc.xml
Normal file
7
app/src/main/res/xml/prefs_screen_mode_abc.xml
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<DropDownPreference
|
||||
android:defaultValue="800"
|
||||
android:key="pref_abc_auto_accept_time"
|
||||
android:title="@string/pref_abc_auto_accept" />
|
||||
</androidx.preference.PreferenceScreen>
|
||||
32
app/src/main/res/xml/prefs_screen_mode_predictive.xml
Normal file
32
app/src/main/res/xml/prefs_screen_mode_predictive.xml
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<SwitchPreferenceCompat
|
||||
android:defaultValue="true"
|
||||
android:key="auto_space"
|
||||
android:summary="@string/pref_auto_space_summary"
|
||||
android:title="@string/pref_auto_space" />
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
android:defaultValue="true"
|
||||
android:key="auto_text_case"
|
||||
android:summary="@string/pref_auto_text_case_summary"
|
||||
android:title="@string/pref_auto_text_case" />
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
android:defaultValue="false"
|
||||
android:dependency="auto_text_case"
|
||||
android:key="auto_capitals_after_newline"
|
||||
android:summary="@string/pref_auto_capitals_after_newline_summary"
|
||||
android:title="@string/pref_auto_capitals_after_newline" />
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
android:defaultValue="true"
|
||||
android:key="backspace_recomposing"
|
||||
android:summary="@string/pref_backspace_recomposing_summary"
|
||||
android:title="@string/pref_backspace_recomposing" />
|
||||
|
||||
<DropDownPreference
|
||||
android:defaultValue="."
|
||||
android:key="pref_double_zero_char"
|
||||
android:title="@string/pref_double_zero_char" />
|
||||
</androidx.preference.PreferenceScreen>
|
||||
Loading…
Add table
Add a link
Reference in a new issue