Activated text should be white. Shares resources with gmail.

part of b/5520533 activated text should be white

Change-Id: Ia6f79bed2277185eca100bd6c65884a2cd574e22
This commit is contained in:
Mindy Pereira 2011-11-08 16:09:32 -08:00
parent e813f73360
commit fde8089157
2 changed files with 7 additions and 15 deletions

View File

@ -35,7 +35,7 @@
android:layout_marginRight="@dimen/mailbox_list_padding_right"
android:singleLine="true"
android:textSize="14dip"
android:textColor="?android:attr/textColorSecondary"
android:textColor="@color/text_color_primary_invertible"
/>
<RelativeLayout
android:layout_alignParentLeft="true"
@ -61,7 +61,7 @@
android:ellipsize="end"
android:singleLine="true"
android:textSize="18dip"
android:textColor="?android:attr/textColorPrimary"
android:textColor="@color/text_color_primary_invertible"
/>
</RelativeLayout>
<!-- Color chips are shown only for account rows on combined view. -->

View File

@ -29,10 +29,7 @@ import android.widget.TextView;
public class MailboxListItem extends RelativeLayout {
// Colors used for drop targets
private static Integer sDropUnavailableFgColor;
private static Integer sDropAvailableBgColor;
private static Integer sTextPrimaryColor;
private static Integer sTextSecondaryColor;
private static Integer sDropTrashBgColor;
/**
@ -83,10 +80,7 @@ public class MailboxListItem extends RelativeLayout {
if (sDropAvailableBgColor == null) {
Resources res = getResources();
sDropAvailableBgColor = res.getColor(R.color.mailbox_drop_available_bg_color);
sDropUnavailableFgColor = res.getColor(R.color.mailbox_drop_unavailable_fg_color);
sDropTrashBgColor = res.getColor(R.color.mailbox_drop_destructive_bg_color);
sTextPrimaryColor = res.getColor(R.color.text_primary_color);
sTextSecondaryColor = res.getColor(R.color.text_secondary_color);
}
mLabelName = (TextView)findViewById(R.id.mailbox_name);
mLabelCount = (TextView)findViewById(R.id.message_count);
@ -142,24 +136,22 @@ public class MailboxListItem extends RelativeLayout {
}
public void setDropTargetBackground(boolean dragInProgress, long itemMailbox) {
int labelNameColor = sTextPrimaryColor;
int labelCountColor = sTextSecondaryColor;
boolean isBackgroundSet = false;
if (dragInProgress) {
if (isDropTarget(itemMailbox)) {
setBackgroundColor(sDropAvailableBgColor);
isBackgroundSet = true;
} else {
labelNameColor = sDropUnavailableFgColor;
labelCountColor = sDropUnavailableFgColor;
mLabelName.setEnabled(false);
mLabelCount.setEnabled(false);
}
} else {
mLabelName.setEnabled(true);
mLabelCount.setEnabled(true);
}
if (!isBackgroundSet) {
// Drag not in progress, or it's not a drop target.
setBackgroundDrawable(mBackground);
}
mLabelName.setTextColor(labelNameColor);
mLabelCount.setTextColor(labelCountColor);
}
}