am aa4e054d: am ce9c4171: Change separator titles in settings screen.
* commit 'aa4e054dd69ffe597f9e06aa0d6eeb2c30585184': Change separator titles in settings screen.main
commit
19bca2a227
|
@ -34,8 +34,11 @@
|
||||||
<!-- Option to control whether or not to show a popup with a larger font on each key press. -->
|
<!-- Option to control whether or not to show a popup with a larger font on each key press. -->
|
||||||
<string name="popup_on_keypress">Popup on keypress</string>
|
<string name="popup_on_keypress">Popup on keypress</string>
|
||||||
|
|
||||||
|
<!-- Category title for general settings for Android keyboard -->
|
||||||
|
<string name="general_category">General</string>
|
||||||
|
|
||||||
<!-- Category title for text prediction -->
|
<!-- Category title for text prediction -->
|
||||||
<string name="prediction_category">Word suggestion settings</string>
|
<string name="prediction_category">Text correction</string>
|
||||||
|
|
||||||
<!-- Option to enable auto capitalization of sentences -->
|
<!-- Option to enable auto capitalization of sentences -->
|
||||||
<string name="auto_cap">Auto-capitalization</string>
|
<string name="auto_cap">Auto-capitalization</string>
|
||||||
|
@ -46,7 +49,7 @@
|
||||||
<string name="quick_fixes_summary">Corrects commonly typed mistakes</string>
|
<string name="quick_fixes_summary">Corrects commonly typed mistakes</string>
|
||||||
|
|
||||||
<!-- Option to enable showing suggestions -->
|
<!-- Option to enable showing suggestions -->
|
||||||
<string name="prefs_show_suggestions">Show suggestions</string>
|
<string name="prefs_show_suggestions">Show correction suggestions</string>
|
||||||
<!-- Description for show suggestions -->
|
<!-- Description for show suggestions -->
|
||||||
<string name="prefs_show_suggestions_summary">Display suggested words while typing</string>
|
<string name="prefs_show_suggestions_summary">Display suggested words while typing</string>
|
||||||
<string name="prefs_suggestion_visibility_show_name">Always show</string>
|
<string name="prefs_suggestion_visibility_show_name">Always show</string>
|
||||||
|
|
|
@ -18,6 +18,10 @@
|
||||||
android:title="@string/english_ime_settings"
|
android:title="@string/english_ime_settings"
|
||||||
android:key="english_ime_settings">
|
android:key="english_ime_settings">
|
||||||
|
|
||||||
|
<PreferenceCategory
|
||||||
|
android:title="@string/general_category"
|
||||||
|
android:key="general_settings">
|
||||||
|
|
||||||
<CheckBoxPreference
|
<CheckBoxPreference
|
||||||
android:key="auto_cap"
|
android:key="auto_cap"
|
||||||
android:title="@string/auto_cap"
|
android:title="@string/auto_cap"
|
||||||
|
@ -75,6 +79,8 @@
|
||||||
android:title="@string/language_selection_title"
|
android:title="@string/language_selection_title"
|
||||||
android:summary="@string/language_selection_summary" />
|
android:summary="@string/language_selection_summary" />
|
||||||
|
|
||||||
|
</PreferenceCategory>
|
||||||
|
|
||||||
<PreferenceCategory
|
<PreferenceCategory
|
||||||
android:title="@string/prediction_category"
|
android:title="@string/prediction_category"
|
||||||
android:key="prediction_settings">
|
android:key="prediction_settings">
|
||||||
|
|
|
@ -48,6 +48,7 @@ public class Settings extends PreferenceActivity
|
||||||
DialogInterface.OnDismissListener, OnPreferenceClickListener {
|
DialogInterface.OnDismissListener, OnPreferenceClickListener {
|
||||||
private static final String TAG = "Settings";
|
private static final String TAG = "Settings";
|
||||||
|
|
||||||
|
public static final String PREF_GENERAL_SETTINGS_KEY = "general_settings";
|
||||||
public static final String PREF_VIBRATE_ON = "vibrate_on";
|
public static final String PREF_VIBRATE_ON = "vibrate_on";
|
||||||
public static final String PREF_SOUND_ON = "sound_on";
|
public static final String PREF_SOUND_ON = "sound_on";
|
||||||
public static final String PREF_POPUP_ON = "popup_on";
|
public static final String PREF_POPUP_ON = "popup_on";
|
||||||
|
@ -111,40 +112,42 @@ public class Settings extends PreferenceActivity
|
||||||
mBigramSuggestion = (CheckBoxPreference) findPreference(PREF_BIGRAM_SUGGESTIONS);
|
mBigramSuggestion = (CheckBoxPreference) findPreference(PREF_BIGRAM_SUGGESTIONS);
|
||||||
ensureConsistencyOfAutoCorrectionSettings();
|
ensureConsistencyOfAutoCorrectionSettings();
|
||||||
|
|
||||||
|
final PreferenceGroup generalSettings =
|
||||||
|
(PreferenceGroup) findPreference(PREF_GENERAL_SETTINGS_KEY);
|
||||||
|
|
||||||
final boolean showSettingsKeyOption = getResources().getBoolean(
|
final boolean showSettingsKeyOption = getResources().getBoolean(
|
||||||
R.bool.config_enable_show_settings_key_option);
|
R.bool.config_enable_show_settings_key_option);
|
||||||
if (!showSettingsKeyOption) {
|
if (!showSettingsKeyOption) {
|
||||||
getPreferenceScreen().removePreference(mSettingsKeyPreference);
|
generalSettings.removePreference(mSettingsKeyPreference);
|
||||||
}
|
}
|
||||||
|
|
||||||
final boolean showVoiceKeyOption = getResources().getBoolean(
|
final boolean showVoiceKeyOption = getResources().getBoolean(
|
||||||
R.bool.config_enable_show_voice_key_option);
|
R.bool.config_enable_show_voice_key_option);
|
||||||
if (!showVoiceKeyOption) {
|
if (!showVoiceKeyOption) {
|
||||||
getPreferenceScreen().removePreference(mVoicePreference);
|
generalSettings.removePreference(mVoicePreference);
|
||||||
}
|
}
|
||||||
|
|
||||||
Vibrator vibrator = (Vibrator) getSystemService(VIBRATOR_SERVICE);
|
Vibrator vibrator = (Vibrator) getSystemService(VIBRATOR_SERVICE);
|
||||||
if (vibrator == null || !vibrator.hasVibrator()) {
|
if (vibrator == null || !vibrator.hasVibrator()) {
|
||||||
getPreferenceScreen().removePreference(
|
generalSettings.removePreference(findPreference(PREF_VIBRATE_ON));
|
||||||
getPreferenceScreen().findPreference(PREF_VIBRATE_ON));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
final boolean showSubtypeSettings = getResources().getBoolean(
|
final boolean showSubtypeSettings = getResources().getBoolean(
|
||||||
R.bool.config_enable_show_subtype_settings);
|
R.bool.config_enable_show_subtype_settings);
|
||||||
if (!showSubtypeSettings) {
|
if (!showSubtypeSettings) {
|
||||||
getPreferenceScreen().removePreference(findPreference(PREF_SUBTYPES));
|
generalSettings.removePreference(findPreference(PREF_SUBTYPES));
|
||||||
}
|
}
|
||||||
|
|
||||||
final boolean showPopupOption = getResources().getBoolean(
|
final boolean showPopupOption = getResources().getBoolean(
|
||||||
R.bool.config_enable_show_popup_on_keypress_option);
|
R.bool.config_enable_show_popup_on_keypress_option);
|
||||||
if (!showPopupOption) {
|
if (!showPopupOption) {
|
||||||
getPreferenceScreen().removePreference(findPreference(PREF_POPUP_ON));
|
generalSettings.removePreference(findPreference(PREF_POPUP_ON));
|
||||||
}
|
}
|
||||||
|
|
||||||
final boolean showRecorrectionOption = getResources().getBoolean(
|
final boolean showRecorrectionOption = getResources().getBoolean(
|
||||||
R.bool.config_enable_show_recorrection_option);
|
R.bool.config_enable_show_recorrection_option);
|
||||||
if (!showRecorrectionOption) {
|
if (!showRecorrectionOption) {
|
||||||
getPreferenceScreen().removePreference(findPreference(PREF_RECORRECTION_ENABLED));
|
generalSettings.removePreference(findPreference(PREF_RECORRECTION_ENABLED));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue