mirror of
https://github.com/moparisthebest/k-9
synced 2024-12-24 16:48:50 -05:00
Use different background for selected messages in message list
This commit is contained in:
parent
04e1bf6976
commit
78dc5e5194
@ -37,6 +37,7 @@
|
|||||||
<attr name="textColorPrimaryRecipientDropdown" format="reference" />
|
<attr name="textColorPrimaryRecipientDropdown" format="reference" />
|
||||||
<attr name="textColorSecondaryRecipientDropdown" format="reference" />
|
<attr name="textColorSecondaryRecipientDropdown" format="reference" />
|
||||||
<attr name="backgroundColorChooseAccountHeader" format="color" />
|
<attr name="backgroundColorChooseAccountHeader" format="color" />
|
||||||
|
<attr name="messageListSelectedBackgroundColor" format="reference|color"/>
|
||||||
<attr name="messageListReadItemBackgroundColor" format="reference|color"/>
|
<attr name="messageListReadItemBackgroundColor" format="reference|color"/>
|
||||||
<attr name="messageListUnreadItemBackgroundColor" format="reference|color"/>
|
<attr name="messageListUnreadItemBackgroundColor" format="reference|color"/>
|
||||||
<attr name="messageListThreadCountForegroundColor" format="reference|color"/>
|
<attr name="messageListThreadCountForegroundColor" format="reference|color"/>
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
<item name="iconActionRequestReadReceipt">@drawable/ic_action_request_read_receipt_light</item>
|
<item name="iconActionRequestReadReceipt">@drawable/ic_action_request_read_receipt_light</item>
|
||||||
<item name="textColorPrimaryRecipientDropdown">@android:color/primary_text_light</item>
|
<item name="textColorPrimaryRecipientDropdown">@android:color/primary_text_light</item>
|
||||||
<item name="textColorSecondaryRecipientDropdown">@android:color/secondary_text_light</item>
|
<item name="textColorSecondaryRecipientDropdown">@android:color/secondary_text_light</item>
|
||||||
|
<item name="messageListSelectedBackgroundColor">#8038B8E2</item>
|
||||||
<item name="messageListReadItemBackgroundColor">#80cdcdcd</item>
|
<item name="messageListReadItemBackgroundColor">#80cdcdcd</item>
|
||||||
<item name="messageListUnreadItemBackgroundColor">#00ffffff</item>
|
<item name="messageListUnreadItemBackgroundColor">#00ffffff</item>
|
||||||
<item name="messageListThreadCountForegroundColor">?android:attr/colorBackground</item>
|
<item name="messageListThreadCountForegroundColor">?android:attr/colorBackground</item>
|
||||||
@ -81,6 +82,7 @@
|
|||||||
<item name="iconActionRequestReadReceipt">@drawable/ic_action_request_read_receipt_dark</item>
|
<item name="iconActionRequestReadReceipt">@drawable/ic_action_request_read_receipt_dark</item>
|
||||||
<item name="textColorPrimaryRecipientDropdown">@android:color/primary_text_dark</item>
|
<item name="textColorPrimaryRecipientDropdown">@android:color/primary_text_dark</item>
|
||||||
<item name="textColorSecondaryRecipientDropdown">@android:color/secondary_text_dark</item>
|
<item name="textColorSecondaryRecipientDropdown">@android:color/secondary_text_dark</item>
|
||||||
|
<item name="messageListSelectedBackgroundColor">#8038B8E2</item>
|
||||||
<item name="messageListReadItemBackgroundColor">#00000000</item>
|
<item name="messageListReadItemBackgroundColor">#00000000</item>
|
||||||
<item name="messageListUnreadItemBackgroundColor">#805a5a5a</item>
|
<item name="messageListUnreadItemBackgroundColor">#805a5a5a</item>
|
||||||
<item name="messageListThreadCountForegroundColor">?android:attr/colorBackground</item>
|
<item name="messageListThreadCountForegroundColor">?android:attr/colorBackground</item>
|
||||||
|
@ -1876,9 +1876,15 @@ public class MessageListFragment extends SherlockFragment implements OnItemClick
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Background indicator
|
// Background indicator
|
||||||
if (K9.useBackgroundAsUnreadIndicator()) {
|
if (selected || K9.useBackgroundAsUnreadIndicator()) {
|
||||||
int res = (read) ? R.attr.messageListReadItemBackgroundColor :
|
int res;
|
||||||
R.attr.messageListUnreadItemBackgroundColor;
|
if (selected) {
|
||||||
|
res = R.attr.messageListSelectedBackgroundColor;
|
||||||
|
} else if (read) {
|
||||||
|
res = R.attr.messageListReadItemBackgroundColor;
|
||||||
|
} else {
|
||||||
|
res = R.attr.messageListUnreadItemBackgroundColor;
|
||||||
|
}
|
||||||
|
|
||||||
TypedValue outValue = new TypedValue();
|
TypedValue outValue = new TypedValue();
|
||||||
getActivity().getTheme().resolveAttribute(res, outValue, true);
|
getActivity().getTheme().resolveAttribute(res, outValue, true);
|
||||||
|
Loading…
Reference in New Issue
Block a user