summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Lemieux <jplemieux@google.com>2014-07-18 16:06:34 -0700
committerJames Lemieux <jplemieux@google.com>2014-07-18 17:22:18 -0700
commitf75cf1157b7168cd4c501b1b34ad473e2ab724f0 (patch)
tree95e13eeb6c496a3a82f1b29936b2c8cecc2ff8ae
parent058d8b6e4b2b95c7de68885f1f0b91b2831ee246 (diff)
downloadandroid_packages_apps_UnifiedEmail-f75cf1157b7168cd4c501b1b34ad473e2ab724f0.tar.gz
android_packages_apps_UnifiedEmail-f75cf1157b7168cd4c501b1b34ad473e2ab724f0.tar.bz2
android_packages_apps_UnifiedEmail-f75cf1157b7168cd4c501b1b34ad473e2ab724f0.zip
Not enough difference between unread/read in TL
b/16131268 This reworks the colors, fonts and sizes used to distinguish read and unread entries in the conversation list. Change-Id: If807ea43a4011cb36b8d39cd5aba080fbb018016
-rw-r--r--res/layout/conversation_item_view.xml2
-rw-r--r--res/values/colors.xml2
-rw-r--r--res/values/styles.xml19
-rw-r--r--src/com/android/mail/browse/ConversationItemView.java21
-rw-r--r--src/com/android/mail/browse/SendersView.java4
5 files changed, 24 insertions, 24 deletions
diff --git a/res/layout/conversation_item_view.xml b/res/layout/conversation_item_view.xml
index e3e0bb0bd..e7ca548db 100644
--- a/res/layout/conversation_item_view.xml
+++ b/res/layout/conversation_item_view.xml
@@ -149,7 +149,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="3dp"
android:includeFontPadding="false"
- android:textSize="14sp"
+ android:textSize="16sp"
style="@style/ConversationListSubjectStyle"/>
<!-- snippet overlaps folders completely in the layout;
diff --git a/res/values/colors.xml b/res/values/colors.xml
index dbe87af9b..667e96793 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -33,7 +33,7 @@
<color name="subject_text_color_read">@color/light_gray_text_color</color>
<color name="snippet_text_color">@color/light_gray_text_color</color>
<color name="date_text_color_unread">#4285F4</color>
- <color name="date_text_color_read">@color/text_color_grey</color>
+ <color name="date_text_color_read">@color/light_gray_text_color</color>
<color name="message_info_text_color">@color/gray_text_color</color>
<color name="ap_background_color">#fff1f1f2</color>
<color name="ap_overflow_badge_color">#cceeeeee</color>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index ddb214219..0d816ef60 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -500,21 +500,24 @@
<item name="android:layout_column">1</item>
</style>
- <style name="SubjectAppearanceUnreadStyle">
- <item name="android:textColor">@color/subject_text_color_unread</item>
+ <style name="SendersAppearanceUnreadStyle">
+ <item name="android:textColor">@color/senders_text_color</item>
+ <item name="android:textStyle">bold</item>
</style>
- <style name="SubjectAppearanceReadStyle">
- <item name="android:textColor">@color/subject_text_color_read</item>
+ <style name="SendersAppearanceReadStyle">
+ <item name="android:fontFamily">sans-serif-light</item>
+ <item name="android:textColor">@color/senders_text_color</item>
</style>
- <style name="SendersUnreadTextAppearance">
- <item name="android:textColor">@color/senders_text_color</item>
+ <style name="SubjectAppearanceUnreadStyle">
+ <item name="android:textColor">@color/subject_text_color_unread</item>
<item name="android:textStyle">bold</item>
</style>
- <style name="SendersReadTextAppearance">
- <item name="android:textColor">@color/senders_text_color</item>
+ <style name="SubjectAppearanceReadStyle">
+ <item name="android:fontFamily">sans-serif-light</item>
+ <item name="android:textColor">@color/subject_text_color_read</item>
</style>
<style name="NotificationSendersUnreadTextAppearance">
diff --git a/src/com/android/mail/browse/ConversationItemView.java b/src/com/android/mail/browse/ConversationItemView.java
index 54208e42c..0d4ae2f63 100644
--- a/src/com/android/mail/browse/ConversationItemView.java
+++ b/src/com/android/mail/browse/ConversationItemView.java
@@ -114,6 +114,9 @@ public class ConversationItemView extends View
private static final String PERF_TAG_CALCULATE_COORDINATES = "CCHV.coordinates";
private static final String LOG_TAG = LogTag.getLogTag();
+ private static final Typeface SANS_SERIF_LIGHT = Typeface.create("sans-serif-light",
+ Typeface.NORMAL);
+
// Static bitmaps.
private static Bitmap STAR_OFF;
private static Bitmap STAR_ON;
@@ -205,7 +208,6 @@ public class ConversationItemView extends View
private static TextAppearanceSpan sSubjectTextReadSpan;
private static TextAppearanceSpan sBadgeTextSpan;
private static BackgroundColorSpan sBadgeBackgroundSpan;
- private static ForegroundColorSpan sSnippetTextSpan;
private static int sScrollSlop;
private static CharacterStyle sActivatedTextSpan;
@@ -405,6 +407,8 @@ public class ConversationItemView extends View
mSnippetTextView.setEllipsize(TextUtils.TruncateAt.END);
mSnippetTextView.setSingleLine(); // allow partial words to be elided
mSnippetTextView.setIncludeFontPadding(false);
+ mSnippetTextView.setTypeface(SANS_SERIF_LIGHT);
+ mSnippetTextView.setTextColor(getResources().getColor(R.color.snippet_text_color));
ViewCompat.setLayoutDirection(mSnippetTextView, layoutDir);
ViewUtils.setTextAlignment(mSnippetTextView, View.TEXT_ALIGNMENT_VIEW_START);
@@ -457,12 +461,12 @@ public class ConversationItemView extends View
sSendersTextColor = res.getColor(R.color.senders_text_color);
sSubjectTextUnreadSpan = new TextAppearanceSpan(context,
R.style.SubjectAppearanceUnreadStyle);
+ sSubjectTextReadSpan = new TextAppearanceSpan(
+ context, R.style.SubjectAppearanceReadStyle);
+
sBadgeTextSpan = new TextAppearanceSpan(context, R.style.BadgeTextStyle);
sBadgeBackgroundSpan = new BackgroundColorSpan(
res.getColor(R.color.badge_background_color));
- sSubjectTextReadSpan = new TextAppearanceSpan(
- context, R.style.SubjectAppearanceReadStyle);
- sSnippetTextSpan = new ForegroundColorSpan(res.getColor(R.color.snippet_text_color));
sDateTextColorRead = res.getColor(R.color.date_text_color_read);
sDateTextColorUnread = res.getColor(R.color.date_text_color_unread);
sStarTouchSlop = res.getDimensionPixelSize(R.dimen.star_touch_slop);
@@ -929,13 +933,6 @@ public class ConversationItemView extends View
final String snippet = mHeader.conversation.getSnippet();
final Spannable displayedStringBuilder = new SpannableString(snippet);
- if (!TextUtils.isEmpty(snippet)) {
- // Start after the end of the subject text; since the subject may be
- // "" or null, this could start at the 0th character in the subjectText string
- displayedStringBuilder.setSpan(ForegroundColorSpan.wrap(sSnippetTextSpan), 0,
- displayedStringBuilder.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
- }
-
// measure the width of the folders which overlap the snippet view
final int availableFolderSpace = mCoordinates.foldersRight - mCoordinates.foldersLeft;
final int folderWidth = mHeader.folderDisplayer.measureFolders(availableFolderSpace,
@@ -1277,7 +1274,7 @@ public class ConversationItemView extends View
// Date.
sPaint.setTextSize(mCoordinates.dateFontSize);
- sPaint.setTypeface(Typeface.DEFAULT);
+ sPaint.setTypeface(isUnread ? Typeface.SANS_SERIF : SANS_SERIF_LIGHT);
sPaint.setColor(isUnread ? sDateTextColorUnread : sDateTextColorRead);
drawText(canvas, mHeader.dateText, mDateX, mCoordinates.dateYBaseline, sPaint);
diff --git a/src/com/android/mail/browse/SendersView.java b/src/com/android/mail/browse/SendersView.java
index 4bbdb4f4a..ecb7c6794 100644
--- a/src/com/android/mail/browse/SendersView.java
+++ b/src/com/android/mail/browse/SendersView.java
@@ -123,11 +123,11 @@ public class SendersView {
sMessageInfoReadStyleSpan = new TextAppearanceSpan(context,
R.style.MessageInfoReadTextAppearance);
sDraftsStyleSpan = new TextAppearanceSpan(context, R.style.DraftTextAppearance);
- sUnreadStyleSpan = new TextAppearanceSpan(context, R.style.SendersUnreadTextAppearance);
+ sUnreadStyleSpan = new TextAppearanceSpan(context, R.style.SendersAppearanceUnreadStyle);
sSendingStyleSpan = new TextAppearanceSpan(context, R.style.SendingTextAppearance);
sRetryingStyleSpan = new TextAppearanceSpan(context, R.style.RetryingTextAppearance);
sFailedStyleSpan = new TextAppearanceSpan(context, R.style.FailedTextAppearance);
- sReadStyleSpan = new TextAppearanceSpan(context, R.style.SendersReadTextAppearance);
+ sReadStyleSpan = new TextAppearanceSpan(context, R.style.SendersAppearanceReadStyle);
sMessageCountSpacerString = res.getString(R.string.message_count_spacer);
sSendingString = res.getString(R.string.sending);
sRetryingString = res.getString(R.string.message_retrying);