aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/Settings.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2011-01-19 15:07:14 +0900
committerJean Chalard <jchalard@google.com>2011-01-19 19:50:14 +0900
commitce9c4171842d37fccb2cc5fe0cbcba06998ddf32 (patch)
tree94c63b8057a54278b2a62dfeed91a49d57b75f33 /java/src/com/android/inputmethod/latin/Settings.java
parentce4b2d2daba8005c2c07a995c8a145ee812f56ff (diff)
downloadlatinime-ce9c4171842d37fccb2cc5fe0cbcba06998ddf32.tar.gz
latinime-ce9c4171842d37fccb2cc5fe0cbcba06998ddf32.tar.xz
latinime-ce9c4171842d37fccb2cc5fe0cbcba06998ddf32.zip
Change separator titles in settings screen.
Add a "General" category to enclose general settings, and rename "Word suggestion settings" to "Text correction". bug: 3282448 Change-Id: Ie695683af0646974da82e29e11d1c3a785ef46c7
Diffstat (limited to 'java/src/com/android/inputmethod/latin/Settings.java')
-rw-r--r--java/src/com/android/inputmethod/latin/Settings.java17
1 files changed, 10 insertions, 7 deletions
diff --git a/java/src/com/android/inputmethod/latin/Settings.java b/java/src/com/android/inputmethod/latin/Settings.java
index 75ebbe7e5..1b802d4ab 100644
--- a/java/src/com/android/inputmethod/latin/Settings.java
+++ b/java/src/com/android/inputmethod/latin/Settings.java
@@ -48,6 +48,7 @@ public class Settings extends PreferenceActivity
DialogInterface.OnDismissListener, OnPreferenceClickListener {
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_SOUND_ON = "sound_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);
ensureConsistencyOfAutoCorrectionSettings();
+ final PreferenceGroup generalSettings =
+ (PreferenceGroup) findPreference(PREF_GENERAL_SETTINGS_KEY);
+
final boolean showSettingsKeyOption = getResources().getBoolean(
R.bool.config_enable_show_settings_key_option);
if (!showSettingsKeyOption) {
- getPreferenceScreen().removePreference(mSettingsKeyPreference);
+ generalSettings.removePreference(mSettingsKeyPreference);
}
final boolean showVoiceKeyOption = getResources().getBoolean(
R.bool.config_enable_show_voice_key_option);
if (!showVoiceKeyOption) {
- getPreferenceScreen().removePreference(mVoicePreference);
+ generalSettings.removePreference(mVoicePreference);
}
Vibrator vibrator = (Vibrator) getSystemService(VIBRATOR_SERVICE);
if (vibrator == null || !vibrator.hasVibrator()) {
- getPreferenceScreen().removePreference(
- getPreferenceScreen().findPreference(PREF_VIBRATE_ON));
+ generalSettings.removePreference(findPreference(PREF_VIBRATE_ON));
}
final boolean showSubtypeSettings = getResources().getBoolean(
R.bool.config_enable_show_subtype_settings);
if (!showSubtypeSettings) {
- getPreferenceScreen().removePreference(findPreference(PREF_SUBTYPES));
+ generalSettings.removePreference(findPreference(PREF_SUBTYPES));
}
final boolean showPopupOption = getResources().getBoolean(
R.bool.config_enable_show_popup_on_keypress_option);
if (!showPopupOption) {
- getPreferenceScreen().removePreference(findPreference(PREF_POPUP_ON));
+ generalSettings.removePreference(findPreference(PREF_POPUP_ON));
}
final boolean showRecorrectionOption = getResources().getBoolean(
R.bool.config_enable_show_recorrection_option);
if (!showRecorrectionOption) {
- getPreferenceScreen().removePreference(findPreference(PREF_RECORRECTION_ENABLED));
+ generalSettings.removePreference(findPreference(PREF_RECORRECTION_ENABLED));
}
}