Update the signature summary

Bug: 9480853
Change-Id: I8996efa268c906485ee1d5cfcf0f883d40927009
This commit is contained in:
Paul Westbrook 2013-06-18 16:25:22 -07:00
parent 33f92a7f96
commit e7d539ddf9
3 changed files with 11 additions and 9 deletions

View File

@ -953,16 +953,12 @@ as <xliff:g id="filename">%s</xliff:g>.</string>
<string name="account_settings_description_label">Account name</string>
<!-- On Settings screen, setting option name -->
<string name="account_settings_name_label">Your name</string>
<!-- On Settings screen, setting option name -->
<string name="account_settings_signature_label">Signature</string>
<!-- On Settings screen, setting option name. Allows user to modify saved quick responses
for insertion in message body. [CHAR_LIMIT=24]-->
<string name="account_settings_edit_quick_responses_label">Quick responses</string>
<!-- On Settings screen, setting option summary [CHAR LIMIT=64] -->
<string name="account_settings_edit_quick_responses_summary">
Edit text that you frequently insert when composing email</string>
<!-- On Settings screen, setting option name -->
<string name="account_settings_signature_hint">Append text to messages you send</string>
<!-- On Settings screen, section heading -->
<string name="account_settings_notifications">Notification settings</string>
<!-- On Settings screen, section heading for data usage [CHAR LIMIT=70] -->

View File

@ -32,10 +32,9 @@
<EditTextPreference
android:key="account_signature"
android:title="@string/account_settings_signature_label"
android:summary="@string/account_settings_signature_hint"
android:dialogTitle="@string/account_settings_signature_label"
android:inputType="textCapSentences|textMultiLine" />
android:title="@string/preferences_signature_title"
android:singleLine="false"
android:dialogTitle="@string/preferences_signature_dialog_title" />
<PreferenceScreen
android:key="account_quick_responses"

View File

@ -60,6 +60,7 @@ import com.android.mail.preferences.AccountPreferences;
import com.android.mail.preferences.FolderPreferences;
import com.android.mail.providers.Folder;
import com.android.mail.providers.UIProvider;
import com.android.mail.ui.settings.SettingsUtils;
import com.android.mail.utils.LogUtils;
import com.android.mail.utils.NotificationUtils;
@ -363,6 +364,8 @@ public class AccountSettingsFragment extends EmailPreferenceFragment
signature = "";
}
mAccountSignature.setText(signature);
SettingsUtils.updatePreferenceSummary(mAccountSignature, signature,
R.string.preferences_signature_summary_not_set);
preferenceChanged(PREFERENCE_SIGNATURE, signature);
return false;
} else if (key.equals(PREFERENCE_NAME)) {
@ -619,9 +622,13 @@ public class AccountSettingsFragment extends EmailPreferenceFragment
mAccountName.setText(senderName);
mAccountName.setOnPreferenceChangeListener(this);
final String accountSignature = mAccount.getSignature();
mAccountSignature = (EditTextPreference) findPreference(PREFERENCE_SIGNATURE);
mAccountSignature.setText(mAccount.getSignature());
mAccountSignature.setText(accountSignature);
mAccountSignature.setOnPreferenceChangeListener(this);
SettingsUtils.updatePreferenceSummary(mAccountSignature, accountSignature,
R.string.preferences_signature_summary_not_set);
mCheckFrequency = (ListPreference) findPreference(PREFERENCE_FREQUENCY);
final String protocol = Account.getProtocol(mContext, mAccount.mId);