Merge "Activated text should be white. Shares resources with gmail." into ics-mr1
This commit is contained in:
commit
aff4bdac07
@ -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. -->
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user