Remove language settings from preference activity

Bug: 3268561

Change-Id: Ia910f0a090dc66c7dd9176999930d8cb763203b0
main
satok 2010-12-13 12:06:57 +09:00
parent 9ecad8c2e8
commit 7f1d3fa5d8
4 changed files with 10 additions and 0 deletions

View File

@ -21,6 +21,7 @@
<!-- Whether or not Popup on key press is enabled by default -->
<bool name="default_popup_preview">false</bool>
<bool name="config_enable_show_settings_key_option">false</bool>
<bool name="config_enable_show_subtype_settings">false</bool>
<bool name="config_enable_show_voice_key_option">false</bool>
<bool name="config_candidate_highlight_font_color_enabled">false</bool>
</resources>

View File

@ -31,6 +31,7 @@
<bool name="default_recorrection_enabled">true</bool>
<bool name="config_long_press_comma_for_settings_enabled">true</bool>
<bool name="config_enable_show_settings_key_option">true</bool>
<bool name="config_enable_show_subtype_settings">true</bool>
<bool name="config_enable_show_voice_key_option">true</bool>
<bool name="config_candidate_highlight_font_color_enabled">true</bool>
</resources>

View File

@ -73,6 +73,7 @@
<!-- TODO: Filter subtypes by IME in SubtypeEnabler -->
<!-- TODO: Maybe use this only for phone? -->
<PreferenceScreen
android:key="subtype_settings"
android:title="@string/language_selection_title"
android:summary="@string/language_selection_summary">
<intent

View File

@ -53,6 +53,7 @@ public class Settings extends PreferenceActivity
public static final String PREF_VOICE_SETTINGS_KEY = "voice_mode";
public static final String PREF_INPUT_LANGUAGE = "input_language";
public static final String PREF_SELECTED_LANGUAGES = "selected_languages";
public static final String PREF_SUBTYPES = "subtype_settings";
public static final String PREF_PREDICTION_SETTINGS_KEY = "prediction_settings";
public static final String PREF_QUICK_FIXES = "quick_fixes";
@ -119,6 +120,12 @@ public class Settings extends PreferenceActivity
getPreferenceScreen().removePreference(
getPreferenceScreen().findPreference(PREF_VIBRATE_ON));
}
final boolean showSubtypeSettings = getResources().getBoolean(
R.bool.config_enable_show_subtype_settings);
if (!showSubtypeSettings) {
getPreferenceScreen().removePreference(findPreference(PREF_SUBTYPES));
}
}
@Override