From de39190bc18b3adb506c276486b8b49080a9d3eb Mon Sep 17 00:00:00 2001 From: Marc Blank Date: Tue, 14 Dec 2010 16:31:24 -0800 Subject: [PATCH] Fix placement of invite icon in narrow mode Bug: 3285416 Change-Id: I36a78eb486a45b780663a8fb24ee092b964ba1b0 --- src/com/android/email/activity/MessageListItem.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/com/android/email/activity/MessageListItem.java b/src/com/android/email/activity/MessageListItem.java index d69ab18b9..8d6eaea8d 100644 --- a/src/com/android/email/activity/MessageListItem.java +++ b/src/com/android/email/activity/MessageListItem.java @@ -413,9 +413,9 @@ public class MessageListItem extends View { int left = mViewWidth - datePaddingRight - (int)sDefaultPaint.measureText(mFormattedDate, 0, mFormattedDate.length()) - sPaddingMedium; + int iconTop; if (mHasAttachment) { left -= sAttachmentIcon.getWidth() + sPaddingSmall; - int iconTop; if (mMode == MODE_WIDE) { iconTop = (mViewHeight - sAttachmentIcon.getHeight()) / 2; } else { @@ -425,7 +425,11 @@ public class MessageListItem extends View { } if (mHasInvite) { left -= sInviteIcon.getWidth() + sPaddingSmall; - int iconTop = (mViewHeight - sInviteIcon.getHeight()) / 2; + if (mMode == MODE_WIDE) { + iconTop = (mViewHeight - sInviteIcon.getHeight()) / 2; + } else { + iconTop = senderY - sInviteIcon.getHeight(); + } canvas.drawBitmap(sInviteIcon, left, iconTop, sDefaultPaint); }