From bd663153755cca1df792edd8b9fe610e0be578d9 Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Mon, 17 Jan 2011 17:25:00 +0000 Subject: [PATCH] Visual cleanup of messageview. Clean up of icon display codepaths --- ..._small.png => ic_email_answered_small.png} | Bin res/drawable-hdpi/ic_mms_attachment_small.png | Bin 1905 -> 0 bytes ..._small.png => ic_email_answered_small.png} | Bin res/drawable/ic_mms_attachment_small.png | Bin 1113 -> 0 bytes res/layout/message_view_header.xml | 27 +++++++++++++----- src/com/fsck/k9/activity/MessageList.java | 4 +-- src/com/fsck/k9/view/MessageHeader.java | 15 +++------- 7 files changed, 26 insertions(+), 20 deletions(-) rename res/drawable-hdpi/{ic_mms_answered_small.png => ic_email_answered_small.png} (100%) delete mode 100644 res/drawable-hdpi/ic_mms_attachment_small.png rename res/drawable/{ic_mms_answered_small.png => ic_email_answered_small.png} (100%) delete mode 100644 res/drawable/ic_mms_attachment_small.png diff --git a/res/drawable-hdpi/ic_mms_answered_small.png b/res/drawable-hdpi/ic_email_answered_small.png similarity index 100% rename from res/drawable-hdpi/ic_mms_answered_small.png rename to res/drawable-hdpi/ic_email_answered_small.png diff --git a/res/drawable-hdpi/ic_mms_attachment_small.png b/res/drawable-hdpi/ic_mms_attachment_small.png deleted file mode 100644 index 491095114d985a93b8e048a418c098634823545b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1905 zcmV-%2afoOP)REC-9InQ}^9JMTds5iM`a+!DU@BYvFMoK6Y!v8%u@EMHH0z&GC-Mc?&gI|su zd2<^X87Z-gN&EZxSt%+iTJZ&fE&-qaFd;FqS}-~)c;|3wY38rYCrkO}aE@p%#jk^d zBb1eux9aHVXz1$d!r#?t zZg+BWvRdx!4AZ7fd*{22O-)X@xw%f^VPVk-{-ZdE%p?zIZ!e2eIe7c_NIgA0e-C$e zFg7-Z?&r_pk9+sv@#DuJjgsr@>4CMiHRy(fK>VpwyTf+v>cZ!aPueHM0OWD11O*1h zSXx?c_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gJ-Gd4Il`1^*2hG0KGKc{nP zX^9V5guC0fl z0yr`>JK|)%U;|3@6!Gh* - + android:paddingTop="4dip" + > + + diff --git a/src/com/fsck/k9/activity/MessageList.java b/src/com/fsck/k9/activity/MessageList.java index 440f972d4..1266ac5d9 100644 --- a/src/com/fsck/k9/activity/MessageList.java +++ b/src/com/fsck/k9/activity/MessageList.java @@ -2331,8 +2331,8 @@ public class MessageList MessageListAdapter() { - mAttachmentIcon = getResources().getDrawable(R.drawable.ic_mms_attachment_small); - mAnsweredIcon = getResources().getDrawable(R.drawable.ic_mms_answered_small); + mAttachmentIcon = getResources().getDrawable(R.drawable.ic_email_attachment_small); + mAnsweredIcon = getResources().getDrawable(R.drawable.ic_email_answered_small); } public void markAllMessagesAsDirty() diff --git a/src/com/fsck/k9/view/MessageHeader.java b/src/com/fsck/k9/view/MessageHeader.java index a13523636..984c41155 100644 --- a/src/com/fsck/k9/view/MessageHeader.java +++ b/src/com/fsck/k9/view/MessageHeader.java @@ -51,7 +51,7 @@ public class MessageHeader extends LinearLayout private LinearLayout mCcContainerView; private TextView mAdditionalHeadersView; private View mAttachmentIcon; - private static Drawable answeredIcon; + private View mAnsweredIcon; private Message mMessage; private Account mAccount; private FontSizes mFontSizes = K9.getFontSizes(); @@ -85,6 +85,7 @@ public class MessageHeader extends LinearLayout private void initializeLayout() { mAttachmentIcon = findViewById(R.id.attachment); + mAnsweredIcon = findViewById(R.id.answered); mFromView = (TextView) findViewById(R.id.from); mToView = (TextView) findViewById(R.id.to); mCcView = (TextView) findViewById(R.id.cc); @@ -98,13 +99,13 @@ public class MessageHeader extends LinearLayout mFlagged = (CheckBox) findViewById(R.id.flagged); defaultSubjectColor = mSubjectView.getCurrentTextColor(); - answeredIcon = getResources().getDrawable(R.drawable.ic_mms_answered_small); mSubjectView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, mFontSizes.getMessageViewSubject()); mTimeView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, mFontSizes.getMessageViewTime()); mDateView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, mFontSizes.getMessageViewDate()); mAdditionalHeadersView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, mFontSizes.getMessageViewAdditionalHeaders()); mAdditionalHeadersView.setVisibility(View.GONE); mAttachmentIcon.setVisibility(View.GONE); + mAnsweredIcon.setVisibility(View.GONE); mFromView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, mFontSizes.getMessageViewSender()); mToView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, mFontSizes.getMessageViewTo()); mCcView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, mFontSizes.getMessageViewCC()); @@ -263,18 +264,10 @@ public class MessageHeader extends LinearLayout mCcContainerView.setVisibility((cc != null && cc.length() > 0) ? View.VISIBLE : View.GONE); mCcView.setText(cc); mAttachmentIcon.setVisibility(((LocalStore.LocalMessage) message).hasAttachments() ? View.VISIBLE : View.GONE); + mAnsweredIcon.setVisibility(message.isSet(Flag.ANSWERED) ? View.VISIBLE : View.GONE); mFlagged.setChecked(message.isSet(Flag.FLAGGED)); mChip.setBackgroundDrawable(mAccount.generateColorChip().drawable()); mChip.getBackground().setAlpha(!message.isSet(Flag.SEEN) ? 255 : 127); - - if (message.isSet(Flag.ANSWERED)) - { - mSubjectView.setCompoundDrawablesWithIntrinsicBounds(answeredIcon, null, null, null); - } - else - { - mSubjectView.setCompoundDrawablesWithIntrinsicBounds(null, null, null, null); - } setVisibility(View.VISIBLE); if (mAdditionalHeadersView.getVisibility() == View.VISIBLE) {