diff --git a/res/values/attrs.xml b/res/values/attrs.xml index ad77ada74..a89956faf 100644 --- a/res/values/attrs.xml +++ b/res/values/attrs.xml @@ -37,6 +37,7 @@ + diff --git a/res/values/themes.xml b/res/values/themes.xml index 0b17bf8ab..dda884e68 100644 --- a/res/values/themes.xml +++ b/res/values/themes.xml @@ -36,6 +36,7 @@ @drawable/ic_action_request_read_receipt_light @android:color/primary_text_light @android:color/secondary_text_light + #8038B8E2 #80cdcdcd #00ffffff ?android:attr/colorBackground @@ -81,6 +82,7 @@ @drawable/ic_action_request_read_receipt_dark @android:color/primary_text_dark @android:color/secondary_text_dark + #8038B8E2 #00000000 #805a5a5a ?android:attr/colorBackground diff --git a/src/com/fsck/k9/fragment/MessageListFragment.java b/src/com/fsck/k9/fragment/MessageListFragment.java index 72ac618c6..c7334e5c4 100644 --- a/src/com/fsck/k9/fragment/MessageListFragment.java +++ b/src/com/fsck/k9/fragment/MessageListFragment.java @@ -1876,9 +1876,15 @@ public class MessageListFragment extends SherlockFragment implements OnItemClick } // Background indicator - if (K9.useBackgroundAsUnreadIndicator()) { - int res = (read) ? R.attr.messageListReadItemBackgroundColor : - R.attr.messageListUnreadItemBackgroundColor; + if (selected || K9.useBackgroundAsUnreadIndicator()) { + int res; + if (selected) { + res = R.attr.messageListSelectedBackgroundColor; + } else if (read) { + res = R.attr.messageListReadItemBackgroundColor; + } else { + res = R.attr.messageListUnreadItemBackgroundColor; + } TypedValue outValue = new TypedValue(); getActivity().getTheme().resolveAttribute(res, outValue, true);