mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-04-25 17:16:43 +00:00
Added sub-categories and moved some settings to more appropriate categories
This commit is contained in:
parent
38789cc87f
commit
35f53b0649
7 changed files with 339 additions and 288 deletions
|
@ -57,15 +57,6 @@ public final class AdvancedSettingsFragment extends SubScreenFragment {
|
|||
if (!Settings.isInternal(prefs)) {
|
||||
removePreference(Settings.SCREEN_DEBUG);
|
||||
}
|
||||
|
||||
if (!AudioAndHapticFeedbackManager.getInstance().hasVibrator()) {
|
||||
removePreference(Settings.PREF_VIBRATION_DURATION_SETTINGS);
|
||||
}
|
||||
|
||||
setupKeypressVibrationDurationSettings();
|
||||
setupKeypressSoundVolumeSettings();
|
||||
setupKeyLongpressTimeoutSettings();
|
||||
refreshEnablingsOfKeypressSoundAndVibrationSettings();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -73,154 +64,5 @@ public final class AdvancedSettingsFragment extends SubScreenFragment {
|
|||
if (key.equals(Settings.PREF_SHOW_SETUP_WIZARD_ICON)) {
|
||||
SystemBroadcastReceiver.toggleAppIcon(getActivity());
|
||||
}
|
||||
refreshEnablingsOfKeypressSoundAndVibrationSettings();
|
||||
}
|
||||
|
||||
private void refreshEnablingsOfKeypressSoundAndVibrationSettings() {
|
||||
final SharedPreferences prefs = getSharedPreferences();
|
||||
final Resources res = getResources();
|
||||
setPreferenceEnabled(Settings.PREF_VIBRATION_DURATION_SETTINGS,
|
||||
Settings.readVibrationEnabled(prefs, res));
|
||||
setPreferenceEnabled(Settings.PREF_KEYPRESS_SOUND_VOLUME,
|
||||
Settings.readKeypressSoundEnabled(prefs, res));
|
||||
}
|
||||
|
||||
private void setupKeypressVibrationDurationSettings() {
|
||||
final SeekBarDialogPreference pref = (SeekBarDialogPreference)findPreference(
|
||||
Settings.PREF_VIBRATION_DURATION_SETTINGS);
|
||||
if (pref == null) {
|
||||
return;
|
||||
}
|
||||
final SharedPreferences prefs = getSharedPreferences();
|
||||
final Resources res = getResources();
|
||||
pref.setInterface(new SeekBarDialogPreference.ValueProxy() {
|
||||
@Override
|
||||
public void writeValue(final int value, final String key) {
|
||||
prefs.edit().putInt(key, value).apply();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeDefaultValue(final String key) {
|
||||
prefs.edit().remove(key).apply();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int readValue(final String key) {
|
||||
return Settings.readKeypressVibrationDuration(prefs, res);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int readDefaultValue(final String key) {
|
||||
return Settings.readDefaultKeypressVibrationDuration(res);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void feedbackValue(final int value) {
|
||||
AudioAndHapticFeedbackManager.getInstance().vibrate(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getValueText(final int value) {
|
||||
if (value < 0) {
|
||||
return res.getString(R.string.settings_system_default);
|
||||
}
|
||||
return res.getString(R.string.abbreviation_unit_milliseconds, value);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void setupKeypressSoundVolumeSettings() {
|
||||
final SeekBarDialogPreference pref = (SeekBarDialogPreference)findPreference(
|
||||
Settings.PREF_KEYPRESS_SOUND_VOLUME);
|
||||
if (pref == null) {
|
||||
return;
|
||||
}
|
||||
final SharedPreferences prefs = getSharedPreferences();
|
||||
final Resources res = getResources();
|
||||
final AudioManager am = (AudioManager)getActivity().getSystemService(Context.AUDIO_SERVICE);
|
||||
pref.setInterface(new SeekBarDialogPreference.ValueProxy() {
|
||||
private static final float PERCENTAGE_FLOAT = 100.0f;
|
||||
|
||||
private float getValueFromPercentage(final int percentage) {
|
||||
return percentage / PERCENTAGE_FLOAT;
|
||||
}
|
||||
|
||||
private int getPercentageFromValue(final float floatValue) {
|
||||
return (int)(floatValue * PERCENTAGE_FLOAT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeValue(final int value, final String key) {
|
||||
prefs.edit().putFloat(key, getValueFromPercentage(value)).apply();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeDefaultValue(final String key) {
|
||||
prefs.edit().remove(key).apply();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int readValue(final String key) {
|
||||
return getPercentageFromValue(Settings.readKeypressSoundVolume(prefs, res));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int readDefaultValue(final String key) {
|
||||
return getPercentageFromValue(Settings.readDefaultKeypressSoundVolume(res));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getValueText(final int value) {
|
||||
if (value < 0) {
|
||||
return res.getString(R.string.settings_system_default);
|
||||
}
|
||||
return Integer.toString(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void feedbackValue(final int value) {
|
||||
am.playSoundEffect(
|
||||
AudioManager.FX_KEYPRESS_STANDARD, getValueFromPercentage(value));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void setupKeyLongpressTimeoutSettings() {
|
||||
final SharedPreferences prefs = getSharedPreferences();
|
||||
final Resources res = getResources();
|
||||
final SeekBarDialogPreference pref = (SeekBarDialogPreference)findPreference(
|
||||
Settings.PREF_KEY_LONGPRESS_TIMEOUT);
|
||||
if (pref == null) {
|
||||
return;
|
||||
}
|
||||
pref.setInterface(new SeekBarDialogPreference.ValueProxy() {
|
||||
@Override
|
||||
public void writeValue(final int value, final String key) {
|
||||
prefs.edit().putInt(key, value).apply();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeDefaultValue(final String key) {
|
||||
prefs.edit().remove(key).apply();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int readValue(final String key) {
|
||||
return Settings.readKeyLongpressTimeout(prefs, res);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int readDefaultValue(final String key) {
|
||||
return Settings.readDefaultKeyLongpressTimeout(res);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getValueText(final int value) {
|
||||
return res.getString(R.string.abbreviation_unit_milliseconds, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void feedbackValue(final int value) {}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,6 +19,7 @@ package org.dslul.openboard.inputmethod.latin.settings;
|
|||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.res.Resources;
|
||||
import android.media.AudioManager;
|
||||
import android.os.Bundle;
|
||||
import android.preference.Preference;
|
||||
|
||||
|
@ -26,17 +27,6 @@ import org.dslul.openboard.inputmethod.latin.AudioAndHapticFeedbackManager;
|
|||
import org.dslul.openboard.inputmethod.latin.R;
|
||||
import org.dslul.openboard.inputmethod.latin.RichInputMethodManager;
|
||||
|
||||
/**
|
||||
* "Preferences" settings sub screen.
|
||||
*
|
||||
* This settings sub screen handles the following input preferences.
|
||||
* - Auto-capitalization
|
||||
* - Double-space period
|
||||
* - Vibrate on keypress
|
||||
* - Sound on keypress
|
||||
* - Popup on keypress
|
||||
* - Voice input key
|
||||
*/
|
||||
public final class PreferencesSettingsFragment extends SubScreenFragment {
|
||||
|
||||
private static final boolean VOICE_IME_ENABLED =
|
||||
|
@ -62,11 +52,16 @@ public final class PreferencesSettingsFragment extends SubScreenFragment {
|
|||
}
|
||||
if (!AudioAndHapticFeedbackManager.getInstance().hasVibrator()) {
|
||||
removePreference(Settings.PREF_VIBRATE_ON);
|
||||
removePreference(Settings.PREF_VIBRATION_DURATION_SETTINGS);
|
||||
}
|
||||
if (!Settings.readFromBuildConfigIfToShowKeyPreviewPopupOption(res)) {
|
||||
removePreference(Settings.PREF_POPUP_ON);
|
||||
}
|
||||
|
||||
setupKeypressVibrationDurationSettings();
|
||||
setupKeypressSoundVolumeSettings();
|
||||
setupKeyLongpressTimeoutSettings();
|
||||
refreshEnablingsOfKeypressSoundAndVibrationSettings();
|
||||
refreshEnablingsOfKeypressSoundAndVibrationSettings();
|
||||
}
|
||||
|
||||
|
@ -95,4 +90,143 @@ public final class PreferencesSettingsFragment extends SubScreenFragment {
|
|||
setPreferenceEnabled(Settings.PREF_KEYPRESS_SOUND_VOLUME,
|
||||
Settings.readKeypressSoundEnabled(prefs, res));
|
||||
}
|
||||
|
||||
private void setupKeypressVibrationDurationSettings() {
|
||||
final SeekBarDialogPreference pref = (SeekBarDialogPreference)findPreference(
|
||||
Settings.PREF_VIBRATION_DURATION_SETTINGS);
|
||||
if (pref == null) {
|
||||
return;
|
||||
}
|
||||
final SharedPreferences prefs = getSharedPreferences();
|
||||
final Resources res = getResources();
|
||||
pref.setInterface(new SeekBarDialogPreference.ValueProxy() {
|
||||
@Override
|
||||
public void writeValue(final int value, final String key) {
|
||||
prefs.edit().putInt(key, value).apply();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeDefaultValue(final String key) {
|
||||
prefs.edit().remove(key).apply();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int readValue(final String key) {
|
||||
return Settings.readKeypressVibrationDuration(prefs, res);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int readDefaultValue(final String key) {
|
||||
return Settings.readDefaultKeypressVibrationDuration(res);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void feedbackValue(final int value) {
|
||||
AudioAndHapticFeedbackManager.getInstance().vibrate(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getValueText(final int value) {
|
||||
if (value < 0) {
|
||||
return res.getString(R.string.settings_system_default);
|
||||
}
|
||||
return res.getString(R.string.abbreviation_unit_milliseconds, value);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void setupKeypressSoundVolumeSettings() {
|
||||
final SeekBarDialogPreference pref = (SeekBarDialogPreference)findPreference(
|
||||
Settings.PREF_KEYPRESS_SOUND_VOLUME);
|
||||
if (pref == null) {
|
||||
return;
|
||||
}
|
||||
final SharedPreferences prefs = getSharedPreferences();
|
||||
final Resources res = getResources();
|
||||
final AudioManager am = (AudioManager)getActivity().getSystemService(Context.AUDIO_SERVICE);
|
||||
pref.setInterface(new SeekBarDialogPreference.ValueProxy() {
|
||||
private static final float PERCENTAGE_FLOAT = 100.0f;
|
||||
|
||||
private float getValueFromPercentage(final int percentage) {
|
||||
return percentage / PERCENTAGE_FLOAT;
|
||||
}
|
||||
|
||||
private int getPercentageFromValue(final float floatValue) {
|
||||
return (int)(floatValue * PERCENTAGE_FLOAT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeValue(final int value, final String key) {
|
||||
prefs.edit().putFloat(key, getValueFromPercentage(value)).apply();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeDefaultValue(final String key) {
|
||||
prefs.edit().remove(key).apply();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int readValue(final String key) {
|
||||
return getPercentageFromValue(Settings.readKeypressSoundVolume(prefs, res));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int readDefaultValue(final String key) {
|
||||
return getPercentageFromValue(Settings.readDefaultKeypressSoundVolume(res));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getValueText(final int value) {
|
||||
if (value < 0) {
|
||||
return res.getString(R.string.settings_system_default);
|
||||
}
|
||||
return Integer.toString(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void feedbackValue(final int value) {
|
||||
am.playSoundEffect(
|
||||
AudioManager.FX_KEYPRESS_STANDARD, getValueFromPercentage(value));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void setupKeyLongpressTimeoutSettings() {
|
||||
final SharedPreferences prefs = getSharedPreferences();
|
||||
final Resources res = getResources();
|
||||
final SeekBarDialogPreference pref = (SeekBarDialogPreference)findPreference(
|
||||
Settings.PREF_KEY_LONGPRESS_TIMEOUT);
|
||||
if (pref == null) {
|
||||
return;
|
||||
}
|
||||
pref.setInterface(new SeekBarDialogPreference.ValueProxy() {
|
||||
@Override
|
||||
public void writeValue(final int value, final String key) {
|
||||
prefs.edit().putInt(key, value).apply();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeDefaultValue(final String key) {
|
||||
prefs.edit().remove(key).apply();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int readValue(final String key) {
|
||||
return Settings.readKeyLongpressTimeout(prefs, res);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int readDefaultValue(final String key) {
|
||||
return Settings.readDefaultKeyLongpressTimeout(res);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getValueText(final int value) {
|
||||
return res.getString(R.string.abbreviation_unit_milliseconds, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void feedbackValue(final int value) {}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,6 +25,7 @@ import android.os.Build;
|
|||
import android.os.Bundle;
|
||||
import android.preference.ListPreference;
|
||||
import android.preference.Preference;
|
||||
import android.preference.PreferenceCategory;
|
||||
import android.preference.PreferenceFragment;
|
||||
import android.preference.PreferenceScreen;
|
||||
import android.util.Log;
|
||||
|
@ -47,8 +48,14 @@ public abstract class SubScreenFragment extends PreferenceFragment
|
|||
|
||||
static void removePreference(final String prefKey, final PreferenceScreen screen) {
|
||||
final Preference preference = screen.findPreference(prefKey);
|
||||
if (preference != null) {
|
||||
screen.removePreference(preference);
|
||||
if (preference != null && !screen.removePreference(preference)) {
|
||||
final int count = screen.getPreferenceCount();
|
||||
for (int i = 0; i < count; i++) {
|
||||
final Preference pref = screen.getPreference(i);
|
||||
if (pref instanceof PreferenceCategory
|
||||
&& ((PreferenceCategory) pref).removePreference(preference))
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -606,4 +606,17 @@ disposition rather than other common dispositions for Latin languages. [CHAR LIM
|
|||
<string name="prefs_force_incognito_mode_summary">Disable learning of new words</string>
|
||||
<string name="show_emoji_key">Show emoji key</string>
|
||||
<string name="show_emoji_key_summary">Show a separate emoji key. When disabled, the emoji keyboard is still accessible by long-pressing the ENTER button.</string>
|
||||
<string name="settings_category_input">Input</string>
|
||||
<string name="settings_category_additional_keys">Additional keys</string>
|
||||
<string name="settings_category_correction">Corrections</string>
|
||||
<string name="settings_category_suggestions">Suggestions</string>
|
||||
<string name="settings_category_experimental">Experimental</string>
|
||||
<string name="settings_category_miscellaneous">Miscellaneous</string>
|
||||
<string name="theme_family">Theme family</string>
|
||||
<string name="theme_variant">Theme variant</string>
|
||||
<string name="key_borders">Key borders</string>
|
||||
<string name="day_night_mode">Auto day/night mode</string>
|
||||
<string name="day_night_mode_summary">Appearance will follow system settings</string>
|
||||
<string name="amoled_mode">Deep black backgrounds</string>
|
||||
<string name="amoled_mode_summary">Can reduce power usage depending on the device’s screen technology</string>
|
||||
</resources>
|
||||
|
|
|
@ -19,51 +19,62 @@
|
|||
xmlns:latin="http://schemas.android.com/apk/res-auto"
|
||||
android:title="@string/settings_screen_advanced"
|
||||
android:key="screen_advanced">
|
||||
|
||||
<CheckBoxPreference
|
||||
android:key="pref_always_incognito_mode"
|
||||
android:title="@string/prefs_force_incognito_mode"
|
||||
android:summary="@string/prefs_force_incognito_mode_summary"
|
||||
android:defaultValue="false" />
|
||||
<org.dslul.openboard.inputmethod.latin.settings.SeekBarDialogPreference
|
||||
android:key="pref_vibration_duration_settings"
|
||||
android:title="@string/prefs_keypress_vibration_duration_settings"
|
||||
latin:maxValue="@integer/config_max_vibration_duration" />
|
||||
<org.dslul.openboard.inputmethod.latin.settings.SeekBarDialogPreference
|
||||
android:key="pref_keypress_sound_volume"
|
||||
android:title="@string/prefs_keypress_sound_volume_settings"
|
||||
latin:maxValue="100" /> <!-- percent -->
|
||||
|
||||
<org.dslul.openboard.inputmethod.latin.settings.SeekBarDialogPreference
|
||||
android:key="pref_key_longpress_timeout"
|
||||
android:title="@string/prefs_key_longpress_timeout_settings"
|
||||
latin:minValue="@integer/config_min_longpress_timeout"
|
||||
latin:maxValue="@integer/config_max_longpress_timeout"
|
||||
latin:stepValue="@integer/config_longpress_timeout_step" />
|
||||
|
||||
<CheckBoxPreference
|
||||
android:key="prefs_long_press_keyboard_to_change_lang"
|
||||
android:title="@string/prefs_long_press_keyboard_to_change_lang"
|
||||
android:persistent="true"
|
||||
android:defaultValue="true" />
|
||||
|
||||
<CheckBoxPreference
|
||||
android:key="pref_enable_emoji_alt_physical_key"
|
||||
android:title="@string/prefs_enable_emoji_alt_physical_key"
|
||||
android:summary="@string/prefs_enable_emoji_alt_physical_key_summary"
|
||||
android:defaultValue="true"
|
||||
android:persistent="true" />
|
||||
|
||||
<CheckBoxPreference
|
||||
android:key="pref_show_setup_wizard_icon"
|
||||
android:title="@string/show_setup_wizard_icon"
|
||||
android:summary="@string/show_setup_wizard_icon_summary"
|
||||
android:defaultValue="true"
|
||||
android:persistent="true" />
|
||||
<CheckBoxPreference
|
||||
android:key="pref_space_trackpad"
|
||||
android:title="@string/space_trackpad"
|
||||
android:summary="@string/space_trackpad_summary"
|
||||
android:defaultValue="true" />
|
||||
<CheckBoxPreference
|
||||
android:key="pref_delete_swipe"
|
||||
android:title="@string/delete_swipe"
|
||||
android:summary="@string/delete_swipe_summary"
|
||||
android:defaultValue="true" />
|
||||
|
||||
<PreferenceScreen
|
||||
android:fragment="org.dslul.openboard.inputmethod.latin.settings.DebugSettingsFragment"
|
||||
android:key="screen_debug"
|
||||
android:title="Debug settings"
|
||||
android:defaultValue="false"
|
||||
android:persistent="true" />
|
||||
|
||||
<PreferenceCategory
|
||||
android:title="@string/settings_category_experimental">
|
||||
|
||||
<CheckBoxPreference
|
||||
android:key="pref_space_trackpad"
|
||||
android:title="@string/space_trackpad"
|
||||
android:summary="@string/space_trackpad_summary"
|
||||
android:defaultValue="true" />
|
||||
|
||||
<CheckBoxPreference
|
||||
android:key="pref_delete_swipe"
|
||||
android:title="@string/delete_swipe"
|
||||
android:summary="@string/delete_swipe_summary"
|
||||
android:defaultValue="true" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
</PreferenceScreen>
|
||||
|
|
|
@ -17,39 +17,70 @@
|
|||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:title="@string/settings_screen_correction"
|
||||
android:key="screen_correction">
|
||||
|
||||
<PreferenceScreen
|
||||
android:key="edit_personal_dictionary"
|
||||
android:title="@string/edit_personal_dictionary">
|
||||
<intent android:action="android.settings.USER_DICTIONARY_SETTINGS" />
|
||||
</PreferenceScreen>
|
||||
|
||||
<PreferenceCategory
|
||||
android:title="@string/settings_category_correction">
|
||||
|
||||
<CheckBoxPreference
|
||||
android:key="pref_key_block_potentially_offensive"
|
||||
android:title="@string/prefs_block_potentially_offensive_title"
|
||||
android:summary="@string/prefs_block_potentially_offensive_summary"
|
||||
android:defaultValue="@bool/config_block_potentially_offensive"
|
||||
android:persistent="true" />
|
||||
|
||||
<CheckBoxPreference
|
||||
android:key="pref_key_auto_correction"
|
||||
android:title="@string/auto_correction"
|
||||
android:summary="@string/auto_correction_summary"
|
||||
android:defaultValue="true"
|
||||
android:persistent="true" />
|
||||
|
||||
<CheckBoxPreference
|
||||
android:key="auto_cap"
|
||||
android:title="@string/auto_cap"
|
||||
android:summary="@string/auto_cap_summary"
|
||||
android:defaultValue="true"
|
||||
android:persistent="true" />
|
||||
|
||||
<CheckBoxPreference
|
||||
android:key="pref_key_use_double_space_period"
|
||||
android:title="@string/use_double_space_period"
|
||||
android:summary="@string/use_double_space_period_summary"
|
||||
android:defaultValue="true"
|
||||
android:persistent="true" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
android:title="@string/settings_category_suggestions">
|
||||
|
||||
<CheckBoxPreference
|
||||
android:key="show_suggestions"
|
||||
android:summary="@string/prefs_show_suggestions_summary"
|
||||
android:title="@string/prefs_show_suggestions"
|
||||
android:defaultValue="true"
|
||||
android:persistent="true" />
|
||||
|
||||
<CheckBoxPreference
|
||||
android:key="pref_key_use_personalized_dicts"
|
||||
android:title="@string/use_personalized_dicts"
|
||||
android:summary="@string/use_personalized_dicts_summary"
|
||||
android:defaultValue="true"
|
||||
android:persistent="true" />
|
||||
|
||||
<CheckBoxPreference
|
||||
android:key="next_word_prediction"
|
||||
android:title="@string/bigram_prediction"
|
||||
android:summary="@string/bigram_prediction_summary"
|
||||
android:defaultValue="true"
|
||||
android:persistent="true" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
</PreferenceScreen>
|
||||
|
|
|
@ -15,71 +15,84 @@
|
|||
-->
|
||||
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:latin="http://schemas.android.com/apk/res-auto"
|
||||
android:title="@string/settings_screen_preferences">
|
||||
<CheckBoxPreference
|
||||
android:key="auto_cap"
|
||||
android:title="@string/auto_cap"
|
||||
android:summary="@string/auto_cap_summary"
|
||||
android:defaultValue="true"
|
||||
android:persistent="true" />
|
||||
<CheckBoxPreference
|
||||
android:key="pref_show_number_row"
|
||||
android:title="@string/number_row"
|
||||
android:summary="@string/number_row_summary"
|
||||
android:defaultValue="false"
|
||||
android:persistent="true" />
|
||||
|
||||
<PreferenceCategory android:title="@string/settings_category_input">
|
||||
|
||||
<CheckBoxPreference
|
||||
android:key="pref_show_hints"
|
||||
android:title="@string/show_hints"
|
||||
android:summary="@string/show_hints_summary"
|
||||
android:defaultValue="true"
|
||||
android:persistent="true" />
|
||||
|
||||
<CheckBoxPreference
|
||||
android:key="prefs_long_press_keyboard_to_change_lang"
|
||||
android:title="@string/prefs_long_press_keyboard_to_change_lang"
|
||||
android:persistent="true"
|
||||
android:defaultValue="true" />
|
||||
android:key="vibrate_on"
|
||||
android:title="@string/vibrate_on_keypress"
|
||||
android:defaultValue="@bool/config_default_vibration_enabled"
|
||||
android:persistent="true" />
|
||||
|
||||
<org.dslul.openboard.inputmethod.latin.settings.SeekBarDialogPreference
|
||||
android:key="pref_vibration_duration_settings"
|
||||
android:title="@string/prefs_keypress_vibration_duration_settings"
|
||||
latin:maxValue="@integer/config_max_vibration_duration" />
|
||||
|
||||
<CheckBoxPreference
|
||||
android:key="sound_on"
|
||||
android:title="@string/sound_on_keypress"
|
||||
android:defaultValue="@bool/config_default_sound_enabled"
|
||||
android:persistent="true" />
|
||||
|
||||
<org.dslul.openboard.inputmethod.latin.settings.SeekBarDialogPreference
|
||||
android:key="pref_keypress_sound_volume"
|
||||
android:title="@string/prefs_keypress_sound_volume_settings"
|
||||
latin:maxValue="100" /> <!-- percent -->
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<CheckBoxPreference
|
||||
android:key="popup_on"
|
||||
android:title="@string/popup_on_keypress"
|
||||
android:defaultValue="@bool/config_default_key_preview_popup"
|
||||
android:persistent="true" />
|
||||
|
||||
<PreferenceCategory
|
||||
android:title="@string/settings_category_additional_keys">
|
||||
|
||||
<CheckBoxPreference
|
||||
android:key="pref_show_number_row"
|
||||
android:title="@string/number_row"
|
||||
android:summary="@string/number_row_summary"
|
||||
android:defaultValue="false"
|
||||
android:persistent="true" />
|
||||
|
||||
<CheckBoxPreference
|
||||
android:key="pref_show_language_switch_key"
|
||||
android:title="@string/show_language_switch_key"
|
||||
android:defaultValue="false"
|
||||
android:persistent="true" />
|
||||
|
||||
<CheckBoxPreference
|
||||
android:key="pref_show_emoji_key"
|
||||
android:title="@string/show_emoji_key"
|
||||
android:summary="@string/show_emoji_key_summary"
|
||||
android:defaultValue="false"
|
||||
android:persistent="true" />
|
||||
<CheckBoxPreference
|
||||
android:key="pref_key_use_double_space_period"
|
||||
android:title="@string/use_double_space_period"
|
||||
android:summary="@string/use_double_space_period_summary"
|
||||
android:defaultValue="true"
|
||||
android:persistent="true" />
|
||||
<CheckBoxPreference
|
||||
android:key="vibrate_on"
|
||||
android:title="@string/vibrate_on_keypress"
|
||||
android:defaultValue="@bool/config_default_vibration_enabled"
|
||||
android:persistent="true" />
|
||||
<CheckBoxPreference
|
||||
android:key="sound_on"
|
||||
android:title="@string/sound_on_keypress"
|
||||
android:defaultValue="@bool/config_default_sound_enabled"
|
||||
android:persistent="true" />
|
||||
<CheckBoxPreference
|
||||
android:key="popup_on"
|
||||
android:title="@string/popup_on_keypress"
|
||||
android:defaultValue="@bool/config_default_key_preview_popup"
|
||||
android:persistent="true" />
|
||||
|
||||
<CheckBoxPreference
|
||||
android:key="pref_voice_input_key"
|
||||
android:title="@string/voice_input"
|
||||
android:defaultValue="true"
|
||||
android:persistent="true" />
|
||||
|
||||
<CheckBoxPreference
|
||||
android:key="pref_show_clipboard_key"
|
||||
android:title="@string/show_clipboard_key"
|
||||
android:summary="@string/show_clipboard_key_summary"
|
||||
android:defaultValue="false"
|
||||
android:persistent="true" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
</PreferenceScreen>
|
||||
|
|
Loading…
Add table
Reference in a new issue