Misc visual fixes to Email

- dropped in bigger assets for mailbox triangle
- dropped in bigger assets for checkbox for xhdpi
- dropped in proper star asset for message list
- fixed some padding issues for message list item
- remove the color label from "Combined view" in the account drop down

Bug: 5248125
Change-Id: Ic15d98013f2afb42bf55c327654009ef8baa1b78
diff --git a/res/drawable-hdpi/btn_star_off_normal_email_holo_light.png b/res/drawable-hdpi/btn_star_off_normal_email_holo_light.png
new file mode 100644
index 0000000..5076fbf
--- /dev/null
+++ b/res/drawable-hdpi/btn_star_off_normal_email_holo_light.png
Binary files differ
diff --git a/res/drawable-hdpi/btn_star_on_normal_email_holo_light.png b/res/drawable-hdpi/btn_star_on_normal_email_holo_light.png
new file mode 100644
index 0000000..3042cb7
--- /dev/null
+++ b/res/drawable-hdpi/btn_star_on_normal_email_holo_light.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_mailbox_collapsed_holo_light.png b/res/drawable-hdpi/ic_mailbox_collapsed_holo_light.png
index 3d2c2ca..2c395b8 100644
--- a/res/drawable-hdpi/ic_mailbox_collapsed_holo_light.png
+++ b/res/drawable-hdpi/ic_mailbox_collapsed_holo_light.png
Binary files differ
diff --git a/res/drawable-mdpi/btn_star_off_normal_email_holo_light.png b/res/drawable-mdpi/btn_star_off_normal_email_holo_light.png
new file mode 100644
index 0000000..7c0d5ad
--- /dev/null
+++ b/res/drawable-mdpi/btn_star_off_normal_email_holo_light.png
Binary files differ
diff --git a/res/drawable-mdpi/btn_star_on_normal_email_holo_light.png b/res/drawable-mdpi/btn_star_on_normal_email_holo_light.png
new file mode 100644
index 0000000..23a63b4
--- /dev/null
+++ b/res/drawable-mdpi/btn_star_on_normal_email_holo_light.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_mailbox_collapsed_holo_light.png b/res/drawable-mdpi/ic_mailbox_collapsed_holo_light.png
index f96d5b3..5b1a815 100644
--- a/res/drawable-mdpi/ic_mailbox_collapsed_holo_light.png
+++ b/res/drawable-mdpi/ic_mailbox_collapsed_holo_light.png
Binary files differ
diff --git a/res/drawable-sw600dp-hdpi/btn_star_on_normal_email_holo_light.png b/res/drawable-sw600dp-hdpi/btn_star_on_normal_email_holo_light.png
new file mode 100644
index 0000000..f500c67
--- /dev/null
+++ b/res/drawable-sw600dp-hdpi/btn_star_on_normal_email_holo_light.png
Binary files differ
diff --git a/res/drawable-sw600dp-mdpi/btn_star_off_normal_email_holo_light.png b/res/drawable-sw600dp-mdpi/btn_star_off_normal_email_holo_light.png
new file mode 100644
index 0000000..a4d4140
--- /dev/null
+++ b/res/drawable-sw600dp-mdpi/btn_star_off_normal_email_holo_light.png
Binary files differ
diff --git a/res/drawable-sw600dp-mdpi/btn_star_on_normal_email_holo_light.png b/res/drawable-sw600dp-mdpi/btn_star_on_normal_email_holo_light.png
new file mode 100644
index 0000000..fb93247
--- /dev/null
+++ b/res/drawable-sw600dp-mdpi/btn_star_on_normal_email_holo_light.png
Binary files differ
diff --git a/res/drawable-sw600dp-xhdpi/btn_star_off_normal_email_holo_light.png b/res/drawable-sw600dp-xhdpi/btn_star_off_normal_email_holo_light.png
new file mode 100644
index 0000000..e740d9b
--- /dev/null
+++ b/res/drawable-sw600dp-xhdpi/btn_star_off_normal_email_holo_light.png
Binary files differ
diff --git a/res/drawable-sw600dp-xhdpi/btn_star_on_normal_email_holo_light.png b/res/drawable-sw600dp-xhdpi/btn_star_on_normal_email_holo_light.png
new file mode 100644
index 0000000..c515417
--- /dev/null
+++ b/res/drawable-sw600dp-xhdpi/btn_star_on_normal_email_holo_light.png
Binary files differ
diff --git a/res/drawable-xhdpi/btn_check_off_normal_holo_light.png b/res/drawable-xhdpi/btn_check_off_normal_holo_light.png
index 6b4dc88..d3809fa 100644
--- a/res/drawable-xhdpi/btn_check_off_normal_holo_light.png
+++ b/res/drawable-xhdpi/btn_check_off_normal_holo_light.png
Binary files differ
diff --git a/res/drawable-xhdpi/btn_check_on_normal_holo_light.png b/res/drawable-xhdpi/btn_check_on_normal_holo_light.png
index e5f34af..7e1bc8c 100644
--- a/res/drawable-xhdpi/btn_check_on_normal_holo_light.png
+++ b/res/drawable-xhdpi/btn_check_on_normal_holo_light.png
Binary files differ
diff --git a/res/drawable-xhdpi/btn_star_off_normal_email_holo_light.png b/res/drawable-xhdpi/btn_star_off_normal_email_holo_light.png
new file mode 100644
index 0000000..7129d00
--- /dev/null
+++ b/res/drawable-xhdpi/btn_star_off_normal_email_holo_light.png
Binary files differ
diff --git a/res/drawable-xhdpi/btn_star_on_normal_email_holo_light.png b/res/drawable-xhdpi/btn_star_on_normal_email_holo_light.png
new file mode 100644
index 0000000..d91c8bc
--- /dev/null
+++ b/res/drawable-xhdpi/btn_star_on_normal_email_holo_light.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_mailbox_collapsed_holo_light.png b/res/drawable-xhdpi/ic_mailbox_collapsed_holo_light.png
index bfdad2a..132282e 100644
--- a/res/drawable-xhdpi/ic_mailbox_collapsed_holo_light.png
+++ b/res/drawable-xhdpi/ic_mailbox_collapsed_holo_light.png
Binary files differ
diff --git a/res/layout/message_list_item_normal.xml b/res/layout/message_list_item_normal.xml
index cd35ea1..016e581 100644
--- a/res/layout/message_list_item_normal.xml
+++ b/res/layout/message_list_item_normal.xml
@@ -35,7 +35,6 @@
             android:id="@+id/checkmark"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:layout_marginTop="3dip"
             android:layout_centerVertical="true"
             android:layout_centerHorizontal="true"
             android:src="@drawable/btn_check_on_normal_holo_light"
@@ -44,6 +43,7 @@
             android:id="@+id/reply_state"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
+            android:layout_marginBottom="@dimen/message_list_icon_padding_compensation"
             android:layout_centerHorizontal="true"
             android:layout_above="@+id/checkmark"
             android:src="@drawable/ic_badge_reply_holo_light"
@@ -72,7 +72,7 @@
             android:layout_height="wrap_content"
             android:layout_alignParentRight="true"
             android:layout_centerVertical="true"
-            android:src="@drawable/btn_star_off_normal_holo_light" />
+            android:src="@drawable/btn_star_off_normal_email_holo_light" />
 
         <LinearLayout
             android:id="@+id/date_container"
@@ -80,6 +80,7 @@
             android:layout_height="wrap_content"
             android:layout_alignParentRight="true"
             android:layout_above="@+id/star"
+            android:layout_marginBottom="@dimen/message_list_icon_padding_compensation"
             android:orientation="horizontal"
             >
             <!-- reserve enough vertical space for two icons -->
diff --git a/res/layout/message_list_item_wide.xml b/res/layout/message_list_item_wide.xml
index b388318..01c06d7 100644
--- a/res/layout/message_list_item_wide.xml
+++ b/res/layout/message_list_item_wide.xml
@@ -98,5 +98,5 @@
         android:layout_marginLeft="16dip"
         android:layout_marginRight="16dip"
         android:layout_gravity="center_vertical"
-        android:src="@drawable/btn_star_off_normal_holo_light" />
+        android:src="@drawable/btn_star_off_normal_email_holo_light" />
 </LinearLayout>
diff --git a/res/values-sw600dp/dimensions.xml b/res/values-sw600dp/dimensions.xml
index b6ac882..093318d 100644
--- a/res/values-sw600dp/dimensions.xml
+++ b/res/values-sw600dp/dimensions.xml
@@ -23,6 +23,10 @@
     <dimen name="message_header_badge_width">64dip</dimen>
     <dimen name="message_header_name_margin">16dip</dimen>
 
+    <!-- hack around the fact that the checkbox below the reply state has a lot
+         of padding built into the asset -->
+    <dimen name="message_list_icon_padding_compensation">-6dip</dimen>
+
     <!-- Account Setup Activities -->
     <!-- inset distance for setup/settings buttons -->
     <dimen name="setup_buttons_padding_left">16dip</dimen>
diff --git a/res/values/dimensions.xml b/res/values/dimensions.xml
index e633f0a..a4ac8f7 100644
--- a/res/values/dimensions.xml
+++ b/res/values/dimensions.xml
@@ -22,6 +22,8 @@
     <dimen name="message_list_item_height_normal">70dip</dimen>
     <dimen name="message_list_item_color_tip_width">35dip</dimen>
     <dimen name="message_list_item_color_tip_height">6dip</dimen>
+    <dimen name="message_list_badge_margin">4dip</dimen>
+    <dimen name="message_list_icon_padding_compensation">3dip</dimen>
 
     <dimen name="message_header_height">48dip</dimen>
     <dimen name="message_header_badge_width">48dip</dimen>
diff --git a/src/com/android/email/activity/AccountSelectorAdapter.java b/src/com/android/email/activity/AccountSelectorAdapter.java
index 177a5a1..2ce13f6 100644
--- a/src/com/android/email/activity/AccountSelectorAdapter.java
+++ b/src/com/android/email/activity/AccountSelectorAdapter.java
@@ -170,7 +170,12 @@
                 unreadCountView.setText(UiUtilities.getMessageCountForUi(mContext,
                         getAccountUnreadCount(c), true));
 
-                if (((CursorWithExtras) c).getAccountId() == Account.ACCOUNT_ID_COMBINED_VIEW) {
+                // If we're on a combined account, show the color chip indicators for all real
+                // accounts so it can be used as a legend.
+                boolean isCombinedActive =
+                        ((CursorWithExtras) c).getAccountId() == Account.ACCOUNT_ID_COMBINED_VIEW;
+
+                if (isCombinedActive && Account.isNormalAccount(id)) {
                     chipView.setBackgroundColor(mResourceHelper.getAccountColor(id));
                     chipView.setVisibility(View.VISIBLE);
                 } else {
diff --git a/src/com/android/email/activity/MessageListItem.java b/src/com/android/email/activity/MessageListItem.java
index 408c6ed..b0459f7 100644
--- a/src/com/android/email/activity/MessageListItem.java
+++ b/src/com/android/email/activity/MessageListItem.java
@@ -93,6 +93,7 @@
     private static final TextPaint sHighlightPaint = new TextPaint();
     private static Bitmap sAttachmentIcon;
     private static Bitmap sInviteIcon;
+    private static int sBadgeMargin;
     private static Bitmap sFavoriteIconOff;
     private static Bitmap sFavoriteIconOn;
     private static Bitmap sSelectedIconOn;
@@ -157,10 +158,11 @@
             sHighlightPaint.setColor(TextUtilities.HIGHLIGHT_COLOR_INT);
             sAttachmentIcon = BitmapFactory.decodeResource(r, R.drawable.ic_badge_attachment);
             sInviteIcon = BitmapFactory.decodeResource(r, R.drawable.ic_badge_invite_holo_light);
+            sBadgeMargin = r.getDimensionPixelSize(R.dimen.message_list_badge_margin);
             sFavoriteIconOff =
-                BitmapFactory.decodeResource(r, R.drawable.btn_star_off_normal_holo_light);
+                BitmapFactory.decodeResource(r, R.drawable.btn_star_off_normal_email_holo_light);
             sFavoriteIconOn =
-                BitmapFactory.decodeResource(r, R.drawable.btn_star_on_normal_holo_light);
+                BitmapFactory.decodeResource(r, R.drawable.btn_star_on_normal_email_holo_light);
             sSelectedIconOff =
                 BitmapFactory.decodeResource(r, R.drawable.btn_check_off_normal_holo_light);
             sSelectedIconOn =
@@ -423,7 +425,7 @@
         // TODO: deal with the icon layouts better from the coordinate class so that this logic
         // doesn't have to exist.
         // Draw the attachment and invite icons, if necessary.
-        int iconsLeft = dateX;
+        int iconsLeft = dateX - sBadgeMargin;
         if (mHasAttachment) {
             iconsLeft = iconsLeft - sAttachmentIcon.getWidth();
             canvas.drawBitmap(sAttachmentIcon, iconsLeft, mCoordinates.paperclipY, null);