summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--res/drawable-hdpi/list_activated_holo.9.pngbin223 -> 0 bytes
-rw-r--r--res/drawable-hdpi/list_checked_holo.9.pngbin222 -> 0 bytes
-rw-r--r--res/drawable-mdpi/list_activated_holo.9.pngbin188 -> 0 bytes
-rw-r--r--res/drawable-mdpi/list_checked_holo.9.pngbin188 -> 0 bytes
-rw-r--r--res/drawable-v19/conversation_unread_selector.xml28
-rw-r--r--res/drawable-xhdpi/list_activated_holo.9.pngbin240 -> 0 bytes
-rw-r--r--res/drawable-xhdpi/list_checked_holo.9.pngbin237 -> 0 bytes
-rw-r--r--res/drawable-xxhdpi/list_activated_holo.9.pngbin1161 -> 0 bytes
-rw-r--r--res/drawable-xxhdpi/list_checked_holo.9.pngbin1158 -> 0 bytes
-rw-r--r--res/drawable/conversation_item_background_selector.xml (renamed from res/drawable-v19/conversation_read_selector.xml)10
-rw-r--r--res/drawable/conversation_read_selector.xml28
-rw-r--r--res/drawable/conversation_unread_selector.xml28
-rw-r--r--res/drawable/widget_conversation_read_selector.xml26
-rw-r--r--res/drawable/widget_conversation_unread_selector.xml26
-rw-r--r--res/layout/conversation_long_press_to_select_tip_view.xml2
-rw-r--r--res/layout/conversation_outbox_tip_view.xml2
-rw-r--r--res/layout/conversation_photo_teaser_view.xml2
-rw-r--r--res/layout/conversation_sync_disabled_tip_view.xml2
-rw-r--r--res/layout/nested_folder_teaser_view.xml2
-rw-r--r--res/layout/widget_conversation_list_item.xml4
-rw-r--r--res/layout/widget_loading.xml2
-rw-r--r--res/values/colors.xml3
-rw-r--r--res/values/dimen.xml1
-rw-r--r--res/values/styles.xml3
-rw-r--r--src/com/android/mail/browse/ConversationItemView.java18
-rw-r--r--src/com/android/mail/browse/ConversationListFooterView.java2
26 files changed, 34 insertions, 155 deletions
diff --git a/res/drawable-hdpi/list_activated_holo.9.png b/res/drawable-hdpi/list_activated_holo.9.png
deleted file mode 100644
index 2d0348653..000000000
--- a/res/drawable-hdpi/list_activated_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/list_checked_holo.9.png b/res/drawable-hdpi/list_checked_holo.9.png
deleted file mode 100644
index 705f97c1e..000000000
--- a/res/drawable-hdpi/list_checked_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/list_activated_holo.9.png b/res/drawable-mdpi/list_activated_holo.9.png
deleted file mode 100644
index c253d9415..000000000
--- a/res/drawable-mdpi/list_activated_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/list_checked_holo.9.png b/res/drawable-mdpi/list_checked_holo.9.png
deleted file mode 100644
index 63c7a63e7..000000000
--- a/res/drawable-mdpi/list_checked_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-v19/conversation_unread_selector.xml b/res/drawable-v19/conversation_unread_selector.xml
deleted file mode 100644
index a454f8a62..000000000
--- a/res/drawable-v19/conversation_unread_selector.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2011 Google Inc.
- Licensed to The Android Open Source Project.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_pressed="true"
- android:drawable="@drawable/list_pressed_holo" />
- <item android:state_selected="true"
- android:drawable="@drawable/list_checked_holo" />
- <item android:state_activated="true"
- android:drawable="@drawable/list_activated_holo" />
- <item android:state_focused="true"
- android:drawable="@drawable/list_focused_holo" />
- <item android:drawable="@drawable/list_unread_holo" />
-</selector>
diff --git a/res/drawable-xhdpi/list_activated_holo.9.png b/res/drawable-xhdpi/list_activated_holo.9.png
deleted file mode 100644
index c67e6759d..000000000
--- a/res/drawable-xhdpi/list_activated_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/list_checked_holo.9.png b/res/drawable-xhdpi/list_checked_holo.9.png
deleted file mode 100644
index 455bf2a18..000000000
--- a/res/drawable-xhdpi/list_checked_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxhdpi/list_activated_holo.9.png b/res/drawable-xxhdpi/list_activated_holo.9.png
deleted file mode 100644
index 40cdfd682..000000000
--- a/res/drawable-xxhdpi/list_activated_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxhdpi/list_checked_holo.9.png b/res/drawable-xxhdpi/list_checked_holo.9.png
deleted file mode 100644
index 615e8c081..000000000
--- a/res/drawable-xxhdpi/list_checked_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-v19/conversation_read_selector.xml b/res/drawable/conversation_item_background_selector.xml
index 3fcf5e63d..2765ae535 100644
--- a/res/drawable-v19/conversation_read_selector.xml
+++ b/res/drawable/conversation_item_background_selector.xml
@@ -17,12 +17,12 @@
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true"
- android:drawable="@drawable/list_pressed_holo" />
+ android:drawable="@color/conversation_item_blue_background" />
<item android:state_selected="true"
- android:drawable="@drawable/list_checked_holo" />
+ android:drawable="@color/conversation_item_blue_background" />
<item android:state_activated="true"
- android:drawable="@drawable/list_activated_holo" />
+ android:drawable="@color/conversation_item_blue_background" />
<item android:state_focused="true"
- android:drawable="@drawable/list_focused_holo" />
- <item android:drawable="@drawable/list_read_holo" />
+ android:drawable="@android:color/white" />
+ <item android:drawable="@android:color/white" />
</selector>
diff --git a/res/drawable/conversation_read_selector.xml b/res/drawable/conversation_read_selector.xml
deleted file mode 100644
index a1ca64a30..000000000
--- a/res/drawable/conversation_read_selector.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2011 Google Inc.
- Licensed to The Android Open Source Project.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_pressed="true"
- android:drawable="@drawable/list_activated_holo" />
- <item android:state_selected="true"
- android:drawable="@drawable/list_checked_holo" />
- <item android:state_activated="true"
- android:drawable="@drawable/list_activated_holo" />
- <item android:state_focused="true"
- android:drawable="@drawable/list_focused_holo" />
- <item android:drawable="@drawable/list_read_holo" />
-</selector>
diff --git a/res/drawable/conversation_unread_selector.xml b/res/drawable/conversation_unread_selector.xml
deleted file mode 100644
index e69b57c4e..000000000
--- a/res/drawable/conversation_unread_selector.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2011 Google Inc.
- Licensed to The Android Open Source Project.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_pressed="true"
- android:drawable="@drawable/list_activated_holo" />
- <item android:state_selected="true"
- android:drawable="@drawable/list_checked_holo" />
- <item android:state_activated="true"
- android:drawable="@drawable/list_activated_holo" />
- <item android:state_focused="true"
- android:drawable="@drawable/list_focused_holo" />
- <item android:drawable="@drawable/list_unread_holo" />
-</selector>
diff --git a/res/drawable/widget_conversation_read_selector.xml b/res/drawable/widget_conversation_read_selector.xml
deleted file mode 100644
index 78eb9c7b8..000000000
--- a/res/drawable/widget_conversation_read_selector.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2012 Google Inc.
- Licensed to The Android Open Source Project.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_pressed="true"
- android:drawable="@drawable/list_pressed_holo" />
- <item android:state_focused="true"
- android:drawable="@drawable/list_focused_holo" />
- <item android:state_selected="true"
- android:drawable="@drawable/list_focused_holo" />
- <item android:drawable="@drawable/list_read_holo" />
-</selector>
diff --git a/res/drawable/widget_conversation_unread_selector.xml b/res/drawable/widget_conversation_unread_selector.xml
deleted file mode 100644
index 56f4d16cc..000000000
--- a/res/drawable/widget_conversation_unread_selector.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2012 Google Inc.
- Licensed to The Android Open Source Project.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_pressed="true"
- android:drawable="@drawable/list_pressed_holo" />
- <item android:state_focused="true"
- android:drawable="@drawable/list_focused_holo" />
- <item android:state_selected="true"
- android:drawable="@drawable/list_focused_holo" />
- <item android:drawable="@drawable/list_unread_holo" />
-</selector>
diff --git a/res/layout/conversation_long_press_to_select_tip_view.xml b/res/layout/conversation_long_press_to_select_tip_view.xml
index 4ee8fc603..59b17ff12 100644
--- a/res/layout/conversation_long_press_to_select_tip_view.xml
+++ b/res/layout/conversation_long_press_to_select_tip_view.xml
@@ -10,7 +10,7 @@
android:id="@+id/swipeable_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:background="@drawable/conversation_read_selector"
+ android:background="@drawable/conversation_item_background_selector"
android:orientation="horizontal" >
<TextView
diff --git a/res/layout/conversation_outbox_tip_view.xml b/res/layout/conversation_outbox_tip_view.xml
index 8e66409f6..6277c300f 100644
--- a/res/layout/conversation_outbox_tip_view.xml
+++ b/res/layout/conversation_outbox_tip_view.xml
@@ -10,7 +10,7 @@
android:id="@+id/swipeable_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:background="@drawable/conversation_read_selector"
+ android:background="@drawable/conversation_item_background_selector"
android:orientation="horizontal" >
<TextView
diff --git a/res/layout/conversation_photo_teaser_view.xml b/res/layout/conversation_photo_teaser_view.xml
index 0a38aba87..6aac4d8a4 100644
--- a/res/layout/conversation_photo_teaser_view.xml
+++ b/res/layout/conversation_photo_teaser_view.xml
@@ -10,7 +10,7 @@
android:id="@+id/swipeable_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:background="@drawable/conversation_read_selector"
+ android:background="@drawable/conversation_item_background_selector"
android:orientation="horizontal" >
<ImageView
diff --git a/res/layout/conversation_sync_disabled_tip_view.xml b/res/layout/conversation_sync_disabled_tip_view.xml
index 02de42cce..1ed63a739 100644
--- a/res/layout/conversation_sync_disabled_tip_view.xml
+++ b/res/layout/conversation_sync_disabled_tip_view.xml
@@ -10,7 +10,7 @@
android:id="@+id/swipeable_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:background="@drawable/conversation_read_selector"
+ android:background="@drawable/conversation_item_background_selector"
android:orientation="horizontal" >
<LinearLayout
diff --git a/res/layout/nested_folder_teaser_view.xml b/res/layout/nested_folder_teaser_view.xml
index c85ed0a05..9e71f61c0 100644
--- a/res/layout/nested_folder_teaser_view.xml
+++ b/res/layout/nested_folder_teaser_view.xml
@@ -24,7 +24,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
- android:background="@drawable/conversation_unread_selector"
+ android:background="@drawable/conversation_item_background_selector"
android:orientation="vertical" >
<LinearLayout
diff --git a/res/layout/widget_conversation_list_item.xml b/res/layout/widget_conversation_list_item.xml
index 8d6cbb239..92ebe50bf 100644
--- a/res/layout/widget_conversation_list_item.xml
+++ b/res/layout/widget_conversation_list_item.xml
@@ -29,12 +29,12 @@
android:id="@+id/widget_unread_background"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:background="@drawable/widget_conversation_unread_selector" />
+ android:background="@drawable/conversation_item_background_selector" />
<ImageView
android:id="@+id/widget_read_background"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:background="@drawable/widget_conversation_read_selector" />
+ android:background="@drawable/conversation_item_background_selector" />
<LinearLayout
android:id="@+id/content"
android:layout_width="match_parent"
diff --git a/res/layout/widget_loading.xml b/res/layout/widget_loading.xml
index c0f03e384..0d116a2f7 100644
--- a/res/layout/widget_loading.xml
+++ b/res/layout/widget_loading.xml
@@ -20,7 +20,7 @@
android:id="@+id/widget_loading"
android:layout_width="match_parent"
android:layout_height="64sp"
- android:background="@drawable/conversation_read_selector">
+ android:background="@drawable/conversation_item_background_selector">
<TextView
android:id="@+id/loading_text"
android:layout_height="match_parent"
diff --git a/res/values/colors.xml b/res/values/colors.xml
index fed191201..8b67dfbe3 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -174,4 +174,7 @@
<color name="snack_bar_background_color">#323232</color>
<color name="snack_bar_action_text_color">#f4b400</color>
+
+ <color name="conversation_item_blue_background">#e5f8fb</color>
+ <color name="conversation_list_divider_color">#b2b2b2</color>
</resources>
diff --git a/res/values/dimen.xml b/res/values/dimen.xml
index b6aefa1ce..d242daa00 100644
--- a/res/values/dimen.xml
+++ b/res/values/dimen.xml
@@ -170,6 +170,7 @@
<dimen name="conv_list_wide_personal_indicator_padding_end">8dip</dimen>
<dimen name="conv_list_wide_star_padding_start">32dip</dimen>
<dimen name="conv_list_wide_color_block_padding_end">64dip</dimen>
+ <dimen name="conv_list_divider_inset">72dp</dimen>
<dimen name="conv_list_spacious_padding_start">22dip</dimen>
<dimen name="conv_list_spacious_padding_end">16dip</dimen>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index dd0830a25..db1574f62 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -221,8 +221,7 @@
<!-- Browse list item styles -->
<style name="ConversationListFadeBase" parent="android:Widget.Holo.Light.ListView" />
<style name="ConversationListFade" parent="@style/ConversationListFadeBase">
- <item name="android:divider">@android:color/transparent</item>
- <item name="android:dividerHeight">0dip</item>
+ <item name="android:divider">@null</item>
</style>
<!-- End browse list item styles -->
diff --git a/src/com/android/mail/browse/ConversationItemView.java b/src/com/android/mail/browse/ConversationItemView.java
index effce31f6..f62c7dd12 100644
--- a/src/com/android/mail/browse/ConversationItemView.java
+++ b/src/com/android/mail/browse/ConversationItemView.java
@@ -147,11 +147,16 @@ public class ConversationItemView extends View
private static int sBadgePaddingExtraWidth;
private static int sBadgeRoundedCornerRadius;
private static int sFolderRoundedCornerRadius;
+ private static int sDividerColor;
// Static paints.
private static final TextPaint sPaint = new TextPaint();
private static final TextPaint sFoldersPaint = new TextPaint();
private static final Paint sCheckBackgroundPaint = new Paint();
+ private static final Paint sDividerPaint = new Paint();
+
+ private static int sDividerInset;
+ private static int sDividerHeight;
private static BroadcastReceiver sConfigurationChangedReceiver;
@@ -539,6 +544,9 @@ public class ConversationItemView extends View
res.getDimensionPixelSize(R.dimen.badge_rounded_corner_radius);
sFolderRoundedCornerRadius =
res.getDimensionPixelOffset(R.dimen.folder_rounded_corner_radius);
+ sDividerColor = res.getColor(R.color.conversation_list_divider_color);
+ sDividerInset = res.getDimensionPixelSize(R.dimen.conv_list_divider_inset);
+ sDividerHeight = res.getDimensionPixelSize(R.dimen.divider_height);
}
}
@@ -1358,6 +1366,12 @@ public class ConversationItemView extends View
VISIBLE_CONVERSATION_HIGHLIGHT.draw(canvas);
}
}
+
+ // draw the inset divider
+ sDividerPaint.setColor(sDividerColor);
+ final int dividerBottomY = getHeight();
+ final int dividerTopY = dividerBottomY - sDividerHeight;
+ canvas.drawRect(sDividerInset, dividerTopY, getWidth(), dividerBottomY, sDividerPaint);
Utils.traceEndSection();
}
@@ -1413,10 +1427,8 @@ public class ConversationItemView extends View
final int background;
if (mBackgroundOverrideResId > 0) {
background = mBackgroundOverrideResId;
- } else if (mHeader.unread) {
- background = R.drawable.conversation_unread_selector;
} else {
- background = R.drawable.conversation_read_selector;
+ background = R.drawable.conversation_item_background_selector;
}
setBackgroundResource(background);
}
diff --git a/src/com/android/mail/browse/ConversationListFooterView.java b/src/com/android/mail/browse/ConversationListFooterView.java
index 38ae225b9..53ec81c3d 100644
--- a/src/com/android/mail/browse/ConversationListFooterView.java
+++ b/src/com/android/mail/browse/ConversationListFooterView.java
@@ -200,7 +200,7 @@ public final class ConversationListFooterView extends LinearLayout implements Vi
private Drawable getNormalBackground() {
if (sNormalBackground == null) {
- sNormalBackground = getBackground(R.drawable.conversation_unread_selector);
+ sNormalBackground = getBackground(R.drawable.conversation_item_background_selector);
}
return sNormalBackground;
}