Simplify latin IME settings page.
Do not show the recorrection option on xlarge terminals, and make it true by default. Also, bring the Auto-capitalization at the top of the settings page. Issue: 3282448 Change-Id: I51a9ae6c7e496be2970107277f0a4ac65b12821emain
parent
4e73674943
commit
fd7d814c81
|
@ -23,6 +23,7 @@
|
|||
<bool name="config_enable_show_subtype_settings">false</bool>
|
||||
<bool name="config_enable_show_voice_key_option">false</bool>
|
||||
<bool name="config_enable_show_popup_on_keypress_option">false</bool>
|
||||
<bool name="config_enable_show_recorrection_option">false</bool>
|
||||
<bool name="config_candidate_highlight_font_color_enabled">false</bool>
|
||||
<bool name="config_swipe_down_dismiss_keyboard_enabled">false</bool>
|
||||
<bool name="config_sliding_key_input_enabled">false</bool>
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
<bool name="config_enable_show_subtype_settings">true</bool>
|
||||
<bool name="config_enable_show_voice_key_option">true</bool>
|
||||
<bool name="config_enable_show_popup_on_keypress_option">true</bool>
|
||||
<bool name="config_enable_show_recorrection_option">true</bool>
|
||||
<bool name="config_candidate_highlight_font_color_enabled">true</bool>
|
||||
<bool name="config_swipe_down_dismiss_keyboard_enabled">true</bool>
|
||||
<bool name="config_sliding_key_input_enabled">true</bool>
|
||||
|
|
|
@ -18,6 +18,13 @@
|
|||
android:title="@string/english_ime_settings"
|
||||
android:key="english_ime_settings">
|
||||
|
||||
<CheckBoxPreference
|
||||
android:key="auto_cap"
|
||||
android:title="@string/auto_cap"
|
||||
android:persistent="true"
|
||||
android:defaultValue="true"
|
||||
/>
|
||||
|
||||
<CheckBoxPreference
|
||||
android:key="vibrate_on"
|
||||
android:title="@string/vibrate_on_keypress"
|
||||
|
@ -45,13 +52,6 @@
|
|||
android:defaultValue="@bool/default_recorrection_enabled"
|
||||
/>
|
||||
|
||||
<CheckBoxPreference
|
||||
android:key="auto_cap"
|
||||
android:title="@string/auto_cap"
|
||||
android:persistent="true"
|
||||
android:defaultValue="true"
|
||||
/>
|
||||
|
||||
<ListPreference
|
||||
android:key="settings_key"
|
||||
android:title="@string/prefs_settings_key"
|
||||
|
|
|
@ -353,8 +353,16 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
|||
|
||||
final Resources res = getResources();
|
||||
mResources = res;
|
||||
mReCorrectionEnabled = prefs.getBoolean(Settings.PREF_RECORRECTION_ENABLED,
|
||||
res.getBoolean(R.bool.default_recorrection_enabled));
|
||||
|
||||
// If the option should not be shown, do not read the recorrection preference
|
||||
// but always use the default setting defined in the resources.
|
||||
if (res.getBoolean(R.bool.config_enable_show_recorrection_option)) {
|
||||
mReCorrectionEnabled = prefs.getBoolean(Settings.PREF_RECORRECTION_ENABLED,
|
||||
res.getBoolean(R.bool.default_recorrection_enabled));
|
||||
} else {
|
||||
mReCorrectionEnabled = res.getBoolean(R.bool.default_recorrection_enabled);
|
||||
}
|
||||
|
||||
mConfigSwipeDownDismissKeyboardEnabled = res.getBoolean(
|
||||
R.bool.config_swipe_down_dismiss_keyboard_enabled);
|
||||
mConfigDelayBeforeFadeoutLanguageOnSpacebar = res.getInteger(
|
||||
|
|
|
@ -140,6 +140,12 @@ public class Settings extends PreferenceActivity
|
|||
if (!showPopupOption) {
|
||||
getPreferenceScreen().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));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue