am 15638aec
: Show the value of the "Show suggestions" option in summary.
* commit '15638aec336139e05c2f91140da69fe6d7b4c307': Show the value of the "Show suggestions" option in summary.
This commit is contained in:
commit
33dd262084
1 changed files with 12 additions and 0 deletions
|
@ -75,6 +75,7 @@ public class Settings extends PreferenceActivity
|
||||||
private CheckBoxPreference mQuickFixes;
|
private CheckBoxPreference mQuickFixes;
|
||||||
private ListPreference mVoicePreference;
|
private ListPreference mVoicePreference;
|
||||||
private ListPreference mSettingsKeyPreference;
|
private ListPreference mSettingsKeyPreference;
|
||||||
|
private ListPreference mShowCorrectionSuggestionsPreference;
|
||||||
private ListPreference mAutoCorrectionThreshold;
|
private ListPreference mAutoCorrectionThreshold;
|
||||||
private CheckBoxPreference mBigramSuggestion;
|
private CheckBoxPreference mBigramSuggestion;
|
||||||
private boolean mVoiceOn;
|
private boolean mVoiceOn;
|
||||||
|
@ -102,6 +103,8 @@ public class Settings extends PreferenceActivity
|
||||||
mQuickFixes = (CheckBoxPreference) findPreference(PREF_QUICK_FIXES);
|
mQuickFixes = (CheckBoxPreference) findPreference(PREF_QUICK_FIXES);
|
||||||
mVoicePreference = (ListPreference) findPreference(PREF_VOICE_SETTINGS_KEY);
|
mVoicePreference = (ListPreference) findPreference(PREF_VOICE_SETTINGS_KEY);
|
||||||
mSettingsKeyPreference = (ListPreference) findPreference(PREF_SETTINGS_KEY);
|
mSettingsKeyPreference = (ListPreference) findPreference(PREF_SETTINGS_KEY);
|
||||||
|
mShowCorrectionSuggestionsPreference =
|
||||||
|
(ListPreference) findPreference(PREF_SHOW_SUGGESTIONS_SETTING);
|
||||||
SharedPreferences prefs = getPreferenceManager().getSharedPreferences();
|
SharedPreferences prefs = getPreferenceManager().getSharedPreferences();
|
||||||
prefs.registerOnSharedPreferenceChangeListener(this);
|
prefs.registerOnSharedPreferenceChangeListener(this);
|
||||||
|
|
||||||
|
@ -188,6 +191,7 @@ public class Settings extends PreferenceActivity
|
||||||
updateVoiceModeSummary();
|
updateVoiceModeSummary();
|
||||||
}
|
}
|
||||||
updateSettingsKeySummary();
|
updateSettingsKeySummary();
|
||||||
|
updateShowCorrectionSuggestionsSummary();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -212,6 +216,7 @@ public class Settings extends PreferenceActivity
|
||||||
.equals(mVoiceModeOff));
|
.equals(mVoiceModeOff));
|
||||||
updateVoiceModeSummary();
|
updateVoiceModeSummary();
|
||||||
updateSettingsKeySummary();
|
updateSettingsKeySummary();
|
||||||
|
updateShowCorrectionSuggestionsSummary();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -230,6 +235,13 @@ public class Settings extends PreferenceActivity
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void updateShowCorrectionSuggestionsSummary() {
|
||||||
|
mShowCorrectionSuggestionsPreference.setSummary(
|
||||||
|
getResources().getStringArray(R.array.prefs_suggestion_visibilities)
|
||||||
|
[mShowCorrectionSuggestionsPreference.findIndexOfValue(
|
||||||
|
mShowCorrectionSuggestionsPreference.getValue())]);
|
||||||
|
}
|
||||||
|
|
||||||
private void updateSettingsKeySummary() {
|
private void updateSettingsKeySummary() {
|
||||||
mSettingsKeyPreference.setSummary(
|
mSettingsKeyPreference.setSummary(
|
||||||
getResources().getStringArray(R.array.settings_key_modes)
|
getResources().getStringArray(R.array.settings_key_modes)
|
||||||
|
|
Loading…
Reference in a new issue