From 9b2e4c43a9d8da8f131aad0e827e2a28f533d003 Mon Sep 17 00:00:00 2001 From: Koji Arai Date: Tue, 26 Apr 2011 23:49:25 +0900 Subject: [PATCH] Fixed default sender color in the MessageList --- res/layout/message_list_item_touchable.xml | 2 +- src/com/fsck/k9/activity/MessageList.java | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/res/layout/message_list_item_touchable.xml b/res/layout/message_list_item_touchable.xml index 0cf1ad978..32d27ca07 100644 --- a/res/layout/message_list_item_touchable.xml +++ b/res/layout/message_list_item_touchable.xml @@ -83,7 +83,7 @@ android:layout_marginRight="0dip" android:singleLine="false" android:bufferType="spannable" - android:textColor="?android:attr/textColorTertiary" + android:textColor="?android:attr/textColorPrimary" android:textAppearance="?android:attr/textAppearanceSmall" /> diff --git a/src/com/fsck/k9/activity/MessageList.java b/src/com/fsck/k9/activity/MessageList.java index e48b7cf00..c99253795 100644 --- a/src/com/fsck/k9/activity/MessageList.java +++ b/src/com/fsck/k9/activity/MessageList.java @@ -12,12 +12,14 @@ import android.app.AlertDialog; import android.app.Dialog; import android.content.Context; import android.content.Intent; +import android.graphics.Color; import android.graphics.Typeface; import android.graphics.drawable.Drawable; import android.os.Bundle; import android.text.Spannable; import android.text.SpannableStringBuilder; import android.text.style.AbsoluteSizeSpan; +import android.text.style.ForegroundColorSpan; import android.text.style.StyleSpan; import android.util.Log; import android.util.TypedValue; @@ -2256,6 +2258,12 @@ public class MessageList 0, message.sender.length() + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); + + // set span for preview message. + str.setSpan(new ForegroundColorSpan(Color.rgb(128, 128, 128)), // How do I can specify the android.R.attr.textColorTertiary + message.sender.length() + 1, + str.length(), + Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); } else { holder.from.setText(new SpannableStringBuilder(recipientSigil(message)).append(message.sender));