From db0a601714a311ccbf7b6e780b80d8e5318df848 Mon Sep 17 00:00:00 2001 From: Todd Kennedy Date: Thu, 27 Jan 2011 10:33:37 -0800 Subject: [PATCH] DO NOT MERGE Ensure foreground colour is set during drag At any time, it's possible for the framework to recycle views. Normally it's not an issue, however, during drag-n-drop a view with "unavailable drop target" foreground colour may be reused. We need to ensure that the foreground color is always set. bug 3398330 Change-Id: I7be9bf8487e0062cf2335476fd971592f33baa09 --- src/com/android/email/activity/MailboxListItem.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/com/android/email/activity/MailboxListItem.java b/src/com/android/email/activity/MailboxListItem.java index df656507d..83c41db70 100644 --- a/src/com/android/email/activity/MailboxListItem.java +++ b/src/com/android/email/activity/MailboxListItem.java @@ -77,17 +77,19 @@ public class MailboxListItem extends RelativeLayout { } public void setDropTargetBackground(boolean dragInProgress, long itemMailbox) { + int labelNameColor = sTextPrimaryColor; + int labelCountColor = sTextSecondaryColor; if (dragInProgress) { if (isDropTarget(itemMailbox)) { setBackgroundColor(sDropAvailableBgColor); } else { - mLabelName.setTextColor(sDropUnavailableFgColor); - mLabelCount.setTextColor(sDropUnavailableFgColor); + labelNameColor = sDropUnavailableFgColor; + labelCountColor = sDropUnavailableFgColor; } } else { - mLabelName.setTextColor(sTextPrimaryColor); - mLabelCount.setTextColor(sTextSecondaryColor); setBackgroundDrawable(mBackground); } + mLabelName.setTextColor(labelNameColor); + mLabelCount.setTextColor(labelCountColor); } }