added an option to disable the Predictive Mode alltogether
This commit is contained in:
parent
174bd97e1d
commit
f06ee6f4b9
3 changed files with 16 additions and 0 deletions
|
|
@ -296,6 +296,8 @@ public abstract class TypingHandler extends KeyPadHandler {
|
|||
allowedInputModes = new ArrayList<>(inputType.determineInputModes(getApplicationContext()));
|
||||
if (LanguageKind.isKorean(mLanguage)) {
|
||||
allowedInputModes.remove((Integer) InputMode.MODE_ABC);
|
||||
} else if (!settings.getPredictiveMode()) {
|
||||
allowedInputModes.remove((Integer) InputMode.MODE_PREDICTIVE);
|
||||
}
|
||||
|
||||
return InputModeValidator.validateMode(settings.getInputMode(), allowedInputModes);
|
||||
|
|
|
|||
|
|
@ -30,6 +30,10 @@ class SettingsTyping extends SettingsPunctuation {
|
|||
return character.equals("\\n") ? "\n" : character;
|
||||
}
|
||||
|
||||
public boolean getPredictiveMode() {
|
||||
return prefs.getBoolean("pref_predictive_mode", true);
|
||||
}
|
||||
|
||||
public boolean getPredictWordPairs() {
|
||||
return prefs.getBoolean("pref_predict_word_pairs", true);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,12 +2,19 @@
|
|||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<SwitchPreferenceCompat
|
||||
android:defaultValue="true"
|
||||
android:key="pref_predictive_mode"
|
||||
android:title="@string/pref_category_predictive_mode" />
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
android:defaultValue="true"
|
||||
android:dependency="pref_predictive_mode"
|
||||
android:key="auto_space"
|
||||
android:summary="@string/pref_auto_space_summary"
|
||||
android:title="@string/pref_auto_space" />
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
android:defaultValue="true"
|
||||
android:dependency="pref_predictive_mode"
|
||||
android:key="auto_text_case"
|
||||
android:summary="@string/pref_auto_text_case_summary"
|
||||
android:title="@string/pref_auto_text_case" />
|
||||
|
|
@ -21,18 +28,21 @@
|
|||
|
||||
<SwitchPreferenceCompat
|
||||
android:defaultValue="true"
|
||||
android:dependency="pref_predictive_mode"
|
||||
android:key="pref_predict_word_pairs"
|
||||
android:summary="@string/pref_predict_word_pairs_summary"
|
||||
android:title="@string/pref_predict_word_pairs" />
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
android:defaultValue="true"
|
||||
android:dependency="pref_predictive_mode"
|
||||
android:key="backspace_recomposing"
|
||||
android:summary="@string/pref_backspace_recomposing_summary"
|
||||
android:title="@string/pref_backspace_recomposing" />
|
||||
|
||||
<DropDownPreference
|
||||
android:defaultValue="."
|
||||
android:dependency="pref_predictive_mode"
|
||||
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