mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-16 06:25:06 -05:00
Tweaked background colors for (un)read messages in the message list
This commit is contained in:
parent
78cf804aca
commit
0b977c9e9b
@ -2241,8 +2241,15 @@ public class MessageList extends K9ListActivity implements OnItemClickListener,
|
||||
|
||||
|
||||
holder.chip.setBackgroundDrawable(message.message.getFolder().getAccount().generateColorChip().drawable());
|
||||
|
||||
view.getBackground().setAlpha(message.read ? 100 : 0);
|
||||
// TODO: Make these colors part of the theme
|
||||
if (K9.getK9Theme() == K9.THEME_LIGHT) {
|
||||
// Light theme: light grey background for read messages
|
||||
view.setBackgroundColor(message.read ?
|
||||
Color.rgb(229, 229, 229) : Color.rgb(255, 255, 255));
|
||||
} else {
|
||||
// Dark theme: dark grey background for unread messages
|
||||
view.setBackgroundColor(message.read ? 0 : Color.rgb(45, 45, 45));
|
||||
}
|
||||
|
||||
if ((message.message.getSubject() == null) || message.message.getSubject().equals("")) {
|
||||
holder.subject.setText(getText(R.string.general_no_subject));
|
||||
@ -2275,8 +2282,13 @@ public class MessageList extends K9ListActivity implements OnItemClickListener,
|
||||
message.sender.length() + 1,
|
||||
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
|
||||
// TODO: Make these colors part of the theme
|
||||
int color = (K9.getK9Theme() == K9.THEME_LIGHT) ?
|
||||
Color.rgb(105, 105, 105) :
|
||||
Color.rgb(160, 160, 160);
|
||||
|
||||
// set span for preview message.
|
||||
str.setSpan(new ForegroundColorSpan(Color.rgb(128, 128, 128)), // How do I can specify the android.R.attr.textColorTertiary
|
||||
str.setSpan(new ForegroundColorSpan(color), // How do I can specify the android.R.attr.textColorTertiary
|
||||
message.sender.length() + 1,
|
||||
str.length(),
|
||||
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
|
Loading…
Reference in New Issue
Block a user