1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-30 05:02:26 -05:00

more settings UI for "AlwaysBcc"

This commit is contained in:
Jesse Vincent 2008-10-29 03:52:20 +00:00
parent 3d4bfc1aa5
commit 6b2f737982

View File

@ -24,6 +24,7 @@ public class AccountSettings extends PreferenceActivity {
private static final String PREFERENCE_TOP_CATERGORY = "account_settings"; private static final String PREFERENCE_TOP_CATERGORY = "account_settings";
private static final String PREFERENCE_DESCRIPTION = "account_description"; private static final String PREFERENCE_DESCRIPTION = "account_description";
private static final String PREFERENCE_NAME = "account_name"; private static final String PREFERENCE_NAME = "account_name";
private static final String PREFERENCE_ALWAYS_BCC = "account_always_bcc";
private static final String PREFERENCE_FREQUENCY = "account_check_frequency"; private static final String PREFERENCE_FREQUENCY = "account_check_frequency";
private static final String PREFERENCE_DEFAULT = "account_default"; private static final String PREFERENCE_DEFAULT = "account_default";
private static final String PREFERENCE_NOTIFY = "account_notify"; private static final String PREFERENCE_NOTIFY = "account_notify";
@ -37,6 +38,7 @@ public class AccountSettings extends PreferenceActivity {
private EditTextPreference mAccountDescription; private EditTextPreference mAccountDescription;
private EditTextPreference mAccountName; private EditTextPreference mAccountName;
private EditTextPreference mAccountAlwaysBcc;
private ListPreference mCheckFrequency; private ListPreference mCheckFrequency;
private CheckBoxPreference mAccountDefault; private CheckBoxPreference mAccountDefault;
private CheckBoxPreference mAccountNotify; private CheckBoxPreference mAccountNotify;
@ -84,6 +86,21 @@ public class AccountSettings extends PreferenceActivity {
} }
}); });
mAccountAlwaysBcc = (EditTextPreference) findPreference(PREFERENCE_ALWAYS_BCC);
mAccountAlwaysBcc.setSummary(mAccount.getAlwaysBcc());
mAccountAlwaysBcc.setText(mAccount.getAlwaysBcc());
mAccountAlwaysBcc.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
public boolean onPreferenceChange(Preference preference, Object newValue) {
final String summary = newValue.toString();
mAccountAlwaysBcc.setSummary(summary);
mAccountAlwaysBcc.setText(summary);
return false;
}
});
mCheckFrequency = (ListPreference) findPreference(PREFERENCE_FREQUENCY); mCheckFrequency = (ListPreference) findPreference(PREFERENCE_FREQUENCY);
mCheckFrequency.setValue(String.valueOf(mAccount.getAutomaticCheckIntervalMinutes())); mCheckFrequency.setValue(String.valueOf(mAccount.getAutomaticCheckIntervalMinutes()));
mCheckFrequency.setSummary(mCheckFrequency.getEntry()); mCheckFrequency.setSummary(mCheckFrequency.getEntry());