Use unified strings for sender image preference and switch to checkbox
b/10693718 Change-Id: Iec81347915611f81ded0c62ca37c401fdb28ae9f
This commit is contained in:
parent
e3a4a1b25d
commit
acfbeb812b
@ -646,19 +646,6 @@
|
||||
<!-- On mailbox settings screen: Mailbox sync window (the number of days to synchronize email for) setting label [CHAR LIMIT=none] -->
|
||||
<string name="mailbox_settings_mailbox_sync_window_label">Days of mail to sync</string>
|
||||
|
||||
<!-- Settings screen, title for whether to show checkboxes or sender image or neither [CHAR LIMIT=150] -->
|
||||
<string name="preference_conversation_list_icon_title">Sender image</string>
|
||||
<!-- Options to select from for whether to show checkboxes or sender images [CHAR LIMIT=50] -->
|
||||
<string-array name="prefEntries_conversationListIconName">
|
||||
<item>Show image</item>
|
||||
<item>Show nothing</item>
|
||||
</string-array>
|
||||
<!-- Description of setting for whether to show checkboxes or sender images [CHAR LIMIT=200] -->
|
||||
<string name="preference_conversation_list_icon_summary">Choose whether to show sender images in conversation view</string>
|
||||
<string-array translatable="false" name="prefValues_conversationListIcon">
|
||||
<item>senderimage</item>
|
||||
<item>none</item>
|
||||
</string-array>
|
||||
<!-- Dialog title for the choosing whether to show checkboxes or sender image [CHAR LIMIT=200] -->
|
||||
<string name="prefDialogTitle_conversationListIcon">Sender image</string>
|
||||
|
||||
|
@ -45,13 +45,12 @@
|
||||
android:entryValues="@array/general_preference_text_zoom_values"
|
||||
android:dialogTitle="@string/general_preference_text_zoom_dialog_title" />
|
||||
|
||||
<ListPreference
|
||||
<CheckBoxPreference
|
||||
android:key="conversation_list_icon"
|
||||
android:title="@string/preference_conversation_list_icon_title"
|
||||
android:summary="@string/preference_conversation_list_icon_summary"
|
||||
android:entries="@array/prefEntries_conversationListIconName"
|
||||
android:entryValues="@array/prefValues_conversationListIcon"
|
||||
android:dialogTitle="@string/prefDialogTitle_conversationListIcon" />
|
||||
android:persistent="false"
|
||||
android:defaultValue="true"
|
||||
android:title="@string/preference_sender_image_title"
|
||||
android:summary="@string/preference_sender_image_description" />
|
||||
|
||||
<!-- This may be removed in GeneralPreferences.java -->
|
||||
<CheckBoxPreference
|
||||
|
@ -55,7 +55,6 @@ public class GeneralPreferences extends PreferenceFragment implements
|
||||
private ListPreference mTextZoom;
|
||||
private CheckBoxPreference mConfirmDelete;
|
||||
private CheckBoxPreference mConfirmSend;
|
||||
private ListPreference mConvListIcon;
|
||||
//private CheckBoxPreference mConvListAttachmentPreviews;
|
||||
private CheckBoxPreference mSwipeDelete;
|
||||
|
||||
@ -112,9 +111,7 @@ public class GeneralPreferences extends PreferenceFragment implements
|
||||
mMailPrefs.setDefaultReplyAll((Boolean) newValue);
|
||||
return true;
|
||||
} else if (PREFERENCE_KEY_CONV_LIST_ICON.equals(key)) {
|
||||
// TODO: Fix this to use a checkbox, instead of a list
|
||||
mMailPrefs.setShowSenderImages(
|
||||
TextUtils.equals((String)newValue, Preferences.CONV_LIST_ICON_SENDER_IMAGE));
|
||||
mMailPrefs.setShowSenderImages((Boolean) newValue);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@ -153,13 +150,12 @@ public class GeneralPreferences extends PreferenceFragment implements
|
||||
mTextZoom.setOnPreferenceChangeListener(this);
|
||||
}
|
||||
|
||||
mConvListIcon = (ListPreference) findPreference(PREFERENCE_KEY_CONV_LIST_ICON);
|
||||
if (mConvListIcon != null) {
|
||||
// TODO: Fix this to use a checkbox, instead of a list
|
||||
final CheckBoxPreference convListIcon =
|
||||
(CheckBoxPreference) findPreference(PREFERENCE_KEY_CONV_LIST_ICON);
|
||||
if (convListIcon != null) {
|
||||
final boolean showSenderImage = mMailPrefs.getShowSenderImages();
|
||||
mConvListIcon.setValue(showSenderImage ?
|
||||
Preferences.CONV_LIST_ICON_SENDER_IMAGE : Preferences.CONV_LIST_ICON_NONE);
|
||||
mConvListIcon.setOnPreferenceChangeListener(this);
|
||||
convListIcon.setChecked(showSenderImage);
|
||||
convListIcon.setOnPreferenceChangeListener(this);
|
||||
}
|
||||
|
||||
mConfirmDelete = (CheckBoxPreference) findPreference(PREFERENCE_KEY_CONFIRM_DELETE);
|
||||
|
Loading…
Reference in New Issue
Block a user