diff options
author | James Lemieux <jplemieux@google.com> | 2014-07-01 18:01:31 -0700 |
---|---|---|
committer | James Lemieux <jplemieux@google.com> | 2014-07-02 16:28:01 -0700 |
commit | 928308d6b10d353493492ad05e0227f960ddaa7e (patch) | |
tree | 31a9f3d5ab922674df2eeed18a2fad4212307251 /res | |
parent | 679a2bab428e75697c4453105ad4f535aac3285f (diff) | |
download | android_packages_apps_UnifiedEmail-928308d6b10d353493492ad05e0227f960ddaa7e.tar.gz android_packages_apps_UnifiedEmail-928308d6b10d353493492ad05e0227f960ddaa7e.tar.bz2 android_packages_apps_UnifiedEmail-928308d6b10d353493492ad05e0227f960ddaa7e.zip |
Implement general layout and colors for Thread List items.
This includes:
- separating the subject and snippet lines
- RTL support
- new layout sizing (common to phone and tablet)
- new font sizing
- new colors
- mirroring these changes in the widget version of Thread List
Change-Id: I92fda7ca9936a8d7f96bc5f584a7a11e0e0fe72e
Diffstat (limited to 'res')
-rw-r--r-- | res/drawable-hdpi/list_read_holo.9.png | bin | 220 -> 212 bytes | |||
-rw-r--r-- | res/drawable-mdpi/list_read_holo.9.png | bin | 183 -> 181 bytes | |||
-rw-r--r-- | res/drawable-xhdpi/list_read_holo.9.png | bin | 239 -> 232 bytes | |||
-rw-r--r-- | res/drawable-xxhdpi/list_read_holo.9.png | bin | 1157 -> 1153 bytes | |||
-rw-r--r-- | res/layout/conversation_item_view.xml (renamed from res/layout/conversation_item_view_normal.xml) | 77 | ||||
-rw-r--r-- | res/layout/conversation_item_view_normal_spacious.xml | 192 | ||||
-rw-r--r-- | res/layout/conversation_item_view_wide.xml | 199 | ||||
-rw-r--r-- | res/layout/conversation_message_upper_header.xml | 8 | ||||
-rw-r--r-- | res/layout/widget.xml | 2 | ||||
-rw-r--r-- | res/layout/widget_conversation_list_item.xml | 35 | ||||
-rw-r--r-- | res/values-ldrtl/styles-ldrtl.xml | 19 | ||||
-rw-r--r-- | res/values-sw600dp/dimen.xml | 2 | ||||
-rw-r--r-- | res/values/colors.xml | 9 | ||||
-rw-r--r-- | res/values/dimen.xml | 9 | ||||
-rw-r--r-- | res/values/strings.xml | 6 | ||||
-rw-r--r-- | res/values/styles.xml | 27 |
16 files changed, 120 insertions, 465 deletions
diff --git a/res/drawable-hdpi/list_read_holo.9.png b/res/drawable-hdpi/list_read_holo.9.png Binary files differindex a04c062f1..47e3a8b2d 100644 --- a/res/drawable-hdpi/list_read_holo.9.png +++ b/res/drawable-hdpi/list_read_holo.9.png diff --git a/res/drawable-mdpi/list_read_holo.9.png b/res/drawable-mdpi/list_read_holo.9.png Binary files differindex fc9bb9dab..5865b73ab 100644 --- a/res/drawable-mdpi/list_read_holo.9.png +++ b/res/drawable-mdpi/list_read_holo.9.png diff --git a/res/drawable-xhdpi/list_read_holo.9.png b/res/drawable-xhdpi/list_read_holo.9.png Binary files differindex 0f14404c3..ff8cd6d17 100644 --- a/res/drawable-xhdpi/list_read_holo.9.png +++ b/res/drawable-xhdpi/list_read_holo.9.png diff --git a/res/drawable-xxhdpi/list_read_holo.9.png b/res/drawable-xxhdpi/list_read_holo.9.png Binary files differindex c4f471523..20cfb22a3 100644 --- a/res/drawable-xxhdpi/list_read_holo.9.png +++ b/res/drawable-xxhdpi/list_read_holo.9.png diff --git a/res/layout/conversation_item_view_normal.xml b/res/layout/conversation_item_view.xml index afd8df0e7..582929675 100644 --- a/res/layout/conversation_item_view_normal.xml +++ b/res/layout/conversation_item_view.xml @@ -25,7 +25,7 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" - android:paddingBottom="1dp" + android:minHeight="88dp" android:orientation="vertical"> <LinearLayout @@ -38,10 +38,9 @@ <View android:id="@+id/contact_image" - android:layout_width="48dp" - android:layout_height="48dp" - android:layout_marginTop="12dp" - android:layout_marginBottom="12dp" + android:layout_width="@dimen/contact_image_width" + android:layout_height="@dimen/contact_image_height" + android:layout_marginTop="@dimen/conv_list_padding" style="@style/ConversationListContactImageStyle" /> <LinearLayout @@ -70,7 +69,7 @@ android:id="@+id/reply_state" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginTop="10dp" + android:layout_marginTop="@dimen/conv_list_padding" android:src="@drawable/ic_badge_reply_holo_light" style="@style/ConversationListReplyStateStyle" /> @@ -79,7 +78,7 @@ android:id="@+id/personal_indicator" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginTop="11dp" + android:layout_marginTop="@dimen/conv_list_padding" android:src="@drawable/ic_email_caret_single" style="@style/ConversationListPersonalIndicatorStyle" /> @@ -89,8 +88,8 @@ android:id="@+id/senders" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginTop="12dp" - android:textSize="18sp" + android:layout_marginTop="@dimen/conv_list_padding" + android:textSize="16sp" android:lines="1" android:includeFontPadding="false" android:text="@string/long_string" @@ -100,63 +99,75 @@ android:id="@+id/info_icon" android:layout_width="14dp" android:layout_height="14dp" - android:layout_marginTop="10dp" + android:layout_marginTop="@dimen/conv_list_padding" style="@style/ConversationListInfoIconStyle" /> <TextView android:id="@+id/date" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginTop="12dp" + android:layout_marginTop="@dimen/conv_list_padding" + android:layout_alignBaseline="@id/senders" android:textSize="12sp" android:lines="1" android:includeFontPadding="false" android:text="@string/long_string" style="@style/ConversationListDateStyle" /> - <!-- top margin should be 12dp, but the asset has 8dp built-in padding --> - <!-- left padding should be 8dp, but the asset has 2dp built-in padding --> <ImageView android:id="@+id/paperclip" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginTop="4dp" + android:layout_marginTop="17dp" android:src="@drawable/ic_attach_file_20dp" style="@style/ConversationListPaperclipStyle" /> <!-- for Email --> <View android:id="@+id/color_block" - android:layout_width="@dimen/color_block_width" - android:layout_height="@dimen/color_block_height" - style="@style/ConversationListColorBlockStyle" /> + android:layout_width="@dimen/color_block_width" + android:layout_height="@dimen/color_block_height" + style="@style/ConversationListColorBlockStyle" /> </RelativeLayout> - <LinearLayout + <RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginBottom="12dp" - android:orientation="horizontal" > + android:layout_marginBottom="@dimen/conv_list_padding"> + + <ImageView + android:id="@+id/star" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:paddingBottom="3dp" + android:src="@drawable/ic_star_outline_20dp" + style="@style/ConversationListStarStyle"/> <TextView - android:id="@id/subject" + android:id="@+id/subject" android:layout_width="0dip" android:layout_height="wrap_content" - android:layout_weight="1" - android:lines="2" - android:textSize="13sp" + android:layout_marginTop="2dp" + android:background="@color/mail_app_blue" android:includeFontPadding="false" - android:text="@string/long_string" /> + android:lines="1" + android:text="@string/long_string" + android:textSize="14sp" + style="@style/ConversationListSubjectStyle"/> - <ImageView - android:id="@+id/star" - android:layout_width="wrap_content" + <TextView + android:id="@+id/snippet" + android:layout_width="0dip" android:layout_height="wrap_content" - android:layout_marginTop="-1dp" - android:src="@drawable/ic_star_outline_20dp" - style="@style/ConversationListStarStyle" /> + android:layout_marginTop="2dp" + android:background="@color/dark_gray_text_color" + android:includeFontPadding="false" + android:lines="1" + android:text="@string/long_string" + android:textSize="14sp" + style="@style/ConversationListSnippetStyle"/> - </LinearLayout> + </RelativeLayout> </LinearLayout> @@ -185,6 +196,6 @@ android:text="@string/long_string" android:textSize="11sp" android:lines="1" - android:minHeight="16dp" /> + android:minHeight="@dimen/conv_list_padding" /> </LinearLayout> diff --git a/res/layout/conversation_item_view_normal_spacious.xml b/res/layout/conversation_item_view_normal_spacious.xml deleted file mode 100644 index b37eda0e3..000000000 --- a/res/layout/conversation_item_view_normal_spacious.xml +++ /dev/null @@ -1,192 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - Copyright (C) 2013 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. ---> - -<!-- This layout is used as a template to create custom view CanvasConversationHeaderView - in normal mode. To be able to get the correct measurements, every source field should - be populated with data here. E.g: - - Text View should set text to a random long string (android:text="@string/long_string") - - Image View should set source to a specific asset --> -<LinearLayout - xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:paddingBottom="1dp" - android:orientation="vertical"> - - <LinearLayout - android:id="@+id/conversation_item_frame" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="horizontal" - style="@style/ConversationListSpaciousStyle" > - - <View - android:id="@+id/contact_image" - android:layout_width="48dp" - android:layout_height="48dp" - android:layout_marginTop="16dp" - android:layout_marginBottom="16dp" - style="@style/ConversationListSpaciousContactImageStyle" /> - - <LinearLayout - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_weight="1" - android:orientation="vertical"> - - <RelativeLayout - android:layout_width="match_parent" - android:layout_height="wrap_content"> - - <!-- these views overlap horizontally, that's okay. --> - <!-- we are only interested in the left edge of senders and the right edge --> - <!-- of the date. --> - <!-- sendersWidth, clipX, and dateX are dynamically determined later. --> - - <FrameLayout - android:id="@+id/senders_decoration" - android:layout_width="wrap_content" - android:layout_height="wrap_content"> - - <!-- for Email --> - <!-- top margin should be 16dp, but the asset has 2dp built-in padding --> - <ImageView - android:id="@+id/reply_state" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginTop="14dp" - android:src="@drawable/ic_badge_reply_holo_light" - style="@style/ConversationListReplyStateStyle" /> - - <!-- for Gmail --> - <ImageView - android:id="@+id/personal_indicator" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginTop="15dp" - android:src="@drawable/ic_email_caret_single" - style="@style/ConversationListPersonalIndicatorStyle" /> - - </FrameLayout> - - <TextView - android:id="@+id/senders" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginTop="16dp" - android:textSize="18sp" - android:lines="1" - android:includeFontPadding="false" - android:text="@string/long_string" - style="@style/ConversationListSendersStyle" /> - - <ImageView - android:id="@+id/info_icon" - android:layout_width="14dp" - android:layout_height="14dp" - android:layout_marginTop="14dp" - style="@style/ConversationListInfoIconStyle" /> - - <TextView - android:id="@+id/date" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginTop="16dp" - android:textSize="12sp" - android:lines="1" - android:includeFontPadding="false" - android:text="@string/long_string" - style="@style/ConversationListDateStyle" /> - - <!-- top margin should be 16dp, but the asset has 8dp built-in padding --> - <!-- left padding should be 8dp, but the asset has 2dp built-in padding --> - <ImageView - android:id="@+id/paperclip" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginTop="8dp" - android:src="@drawable/ic_attach_file_20dp" - style="@style/ConversationListPaperclipStyle" /> - - <!-- for Email --> - <View android:id="@+id/color_block" - android:layout_width="@dimen/color_block_width" - android:layout_height="@dimen/color_block_height" - style="@style/ConversationListColorBlockStyle" /> - - </RelativeLayout> - - <LinearLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginBottom="16dp" - android:orientation="horizontal" > - - <TextView - android:id="@+id/subject" - android:layout_width="0dip" - android:layout_height="wrap_content" - android:layout_weight="1" - android:lines="2" - android:textSize="13sp" - android:includeFontPadding="false" - android:text="@string/long_string" /> - - <ImageView - android:id="@+id/star" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginTop="-1dp" - android:src="@drawable/ic_star_outline_20dp" - style="@style/ConversationListSpaciousStarStyle"/> - - </LinearLayout> - - </LinearLayout> - - </LinearLayout> - <!-- There are 16dp bottom margins here for when there are no labels --> - - <include - layout="@layout/conversation_attachment_previews" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginTop="@dimen/attachment_preview_margin_top_spacious"/> - - <!-- Margin between attachment previews and folders. 16dp bottom margins match above --> - <View - android:id="@+id/attachment_previews_bottom_margin" - android:layout_width="0dp" - android:layout_height="@dimen/attachment_preview_margin_bottom" - android:layout_marginBottom="16dp" - android:visibility="gone" /> - - <!-- Labels should be ~5dp below the subject *baseline*, so we cancel out part of the 16dp bottom margin --> - <TextView - android:id="@+id/folders" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginTop="-14dp" - android:fontFamily="sans-serif-light" - android:includeFontPadding="false" - android:text="@string/long_string" - android:textSize="11sp" - android:lines="1" - android:minHeight="16dp" /> - -</LinearLayout> diff --git a/res/layout/conversation_item_view_wide.xml b/res/layout/conversation_item_view_wide.xml deleted file mode 100644 index 5560e9fe7..000000000 --- a/res/layout/conversation_item_view_wide.xml +++ /dev/null @@ -1,199 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - Copyright (C) 2013 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. ---> - -<!-- This layout is used as a template to create custom view CanvasConversationHeaderView - in normal mode. To be able to get the correct measurements, every source field should - be populated with data here. E.g: - - Text View should set text to a random long string (android:text="@string/long_string") - - Image View should set source to a specific asset --> -<LinearLayout - xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:paddingBottom="1dp" - android:orientation="vertical"> - - <FrameLayout - android:id="@+id/conversation_item_frame" - android:layout_width="match_parent" - android:layout_height="wrap_content" - style="@style/ConversationListWideStyle" > - - <!-- minHeight here is to ensure more consistent item heights across gadget choices --> - <!-- and between 'normal' vs. 'wide' layouts (which is important during 2-pane --> - <!-- transitions) --> - <LinearLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="horizontal" - android:minHeight="66dp" - android:gravity="center_vertical"> - - <View - android:id="@+id/contact_image" - android:layout_width="46dp" - android:layout_height="46dp" - android:layout_marginTop="10dp" - android:layout_marginBottom="10dp" - style="@style/ConversationListWideContactImageStyle" /> - - <LinearLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginTop="10dp" - android:layout_marginBottom="10dp" - android:baselineAligned="false" - android:gravity="top" - android:orientation="horizontal"> - - <!-- for Email --> - <!-- cancel out the asset's 2dp built-in padding --> - <ImageView - android:id="@+id/reply_state" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginTop="-2dp" - android:src="@drawable/ic_badge_reply_holo_light" - style="@style/ConversationListReplyStateStyle" /> - - <LinearLayout - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_weight="1" - android:orientation="vertical" > - <TextView - android:id="@+id/senders" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:textSize="18sp" - android:lines="1" - android:includeFontPadding="false" - android:text="@string/long_string" /> - <TextView - android:id="@+id/badge" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:lines="1" - android:includeFontPadding="false" - android:text="@string/long_string" /> - </LinearLayout> - - <FrameLayout - android:layout_width="54dp" - android:layout_height="wrap_content" - android:layout_gravity="center_vertical"> - - <!-- for Gmail --> - <ImageView - android:id="@+id/personal_indicator" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:src="@drawable/ic_email_caret_single" - style="@style/ConversationListWidePersonalIndicatorStyle" /> - - </FrameLayout> - - <TextView - android:id="@+id/subject" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_weight="2" - android:lines="2" - android:textSize="14sp" - android:includeFontPadding="false" - android:text="@string/long_string" /> - - <!-- cancel out the asset's 8dp built-in top padding --> - <!-- left padding should be 8dp, but the asset has 2dp built-in padding --> - <ImageView - android:id="@+id/paperclip" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginTop="-8dp" - android:src="@drawable/ic_attach_file_20dp" - style="@style/ConversationListWidePaperclipStyle" /> - - <!-- The date should never appear truncated. --> - <TextView - android:id="@+id/date" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:textSize="12sp" - android:lines="1" - android:includeFontPadding="false" - android:text="@string/date" - style="@style/ConversationListWideDateStyle" /> - - <ImageView - android:id="@+id/info_icon" - android:layout_width="14dp" - android:layout_height="14dp" - android:layout_marginTop="-3dp" - style="@style/ConversationListWideInfoIconStyle" /> - - <!-- align to bottom of subject text --> - <ImageView - android:id="@+id/star" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginTop="2dp" - android:src="@drawable/ic_star_outline_20dp" - style="@style/ConversationListWideStarStyle"/> - - </LinearLayout> - - </LinearLayout> - - <!-- for Email --> - <!-- aligned to be above the date (32dp(star asset) + 32dp(star left margin) = 64dp) --> - <View android:id="@+id/color_block" - android:layout_width="@dimen/color_block_width" - android:layout_height="@dimen/color_block_height" - style="@style/ConversationListWideColorBlockStyle" /> - - </FrameLayout> - <!-- There are 10dp bottom margins here for when there are no folders --> - - <include - layout="@layout/conversation_attachment_previews" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginTop="@dimen/attachment_preview_margin_top_wide"/> - - <!-- Margin between attachment previews and folders. 10dp bottom margins match above --> - <View - android:id="@+id/attachment_previews_bottom_margin" - android:layout_width="0dp" - android:layout_height="@dimen/attachment_preview_margin_bottom_wide" - android:layout_marginBottom="10dp" - android:visibility="gone" /> - - <!-- Folders should be 0dp below the subject, so we cancel out the 10dp bottom margin above --> - <TextView - android:id="@+id/folders" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginTop="-10dp" - android:fontFamily="sans-serif-light" - android:includeFontPadding="false" - android:text="@string/long_string" - android:textSize="12sp" - android:lines="1" - android:minHeight="16dp" /> - -</LinearLayout> diff --git a/res/layout/conversation_message_upper_header.xml b/res/layout/conversation_message_upper_header.xml index 44b61356a..a57b8188d 100644 --- a/res/layout/conversation_message_upper_header.xml +++ b/res/layout/conversation_message_upper_header.xml @@ -23,8 +23,8 @@ <com.android.mail.browse.MessageHeaderContactBadge android:id="@+id/photo" - android:layout_width="@dimen/message_header_contact_photo_width" - android:layout_height="@dimen/message_header_contact_photo_height" + android:layout_width="@dimen/contact_image_width" + android:layout_height="@dimen/contact_image_height" android:layout_marginTop="@dimen/message_header_contact_photo_margin" android:layout_marginBottom="@dimen/message_header_contact_photo_margin" android:background="?android:attr/selectableItemBackground" @@ -42,8 +42,8 @@ <!-- draft should match photo in dimensions --> <ImageView android:id="@+id/draft" - android:layout_width="@dimen/message_header_contact_photo_width" - android:layout_height="@dimen/message_header_contact_photo_height" + android:layout_width="@dimen/contact_image_width" + android:layout_height="@dimen/contact_image_height" android:layout_marginTop="@dimen/message_header_contact_photo_margin" android:layout_marginBottom="@dimen/message_header_contact_photo_margin" android:visibility="gone" diff --git a/res/layout/widget.xml b/res/layout/widget.xml index 425eae166..678a90ac4 100644 --- a/res/layout/widget.xml +++ b/res/layout/widget.xml @@ -28,7 +28,7 @@ <LinearLayout android:id="@+id/widget_header" android:layout_width="match_parent" - android:layout_height="48dp" + android:layout_height="48sp" android:orientation="horizontal" android:paddingLeft="8dip" android:paddingRight="8dip" diff --git a/res/layout/widget_conversation_list_item.xml b/res/layout/widget_conversation_list_item.xml index 891db59a2..8d6cbb239 100644 --- a/res/layout/widget_conversation_list_item.xml +++ b/res/layout/widget_conversation_list_item.xml @@ -44,27 +44,26 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="10sp" - android:layout_marginLeft="16dip" - android:layout_marginRight="16dip" + android:layout_marginLeft="16dp" + android:layout_marginRight="16dp" android:gravity="top" android:orientation="horizontal" > <TextView android:id="@+id/widget_senders" - android:layout_width="0dip" + android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:singleLine="true" android:ellipsize="end" android:textSize="@dimen/senders_font_size" - android:textColor="#58585b" android:includeFontPadding="false" style="@style/WidgetSendersStyle" /> - <!-- Use negative margins to align attachment icon with text --> <ImageView android:id="@+id/widget_attachment" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginTop="-4sp"/> + android:layout_marginTop="4sp" + style="@style/WidgetAttachStyle"/> <TextView android:id="@+id/widget_date" android:layout_width="wrap_content" @@ -76,30 +75,40 @@ android:id="@+id/widget_subject" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginLeft="16dip" - android:layout_marginRight="16dip" - android:maxLines="2" + android:layout_marginLeft="16dp" + android:layout_marginRight="16dp" + android:maxLines="1" android:includeFontPadding="false" /> + + <TextView + android:id="@+id/widget_snippet" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginLeft="16dp" + android:layout_marginRight="16dp" + android:includeFontPadding="false" + android:maxLines="1"/> + <LinearLayout android:id="@+id/labels" android:layout_width="wrap_content" - android:layout_height="0dip" + android:layout_height="0dp" android:layout_weight="1" android:layout_gravity="right|end" android:gravity="bottom" > <ImageView android:id="@+id/widget_folder_0" - android:layout_width="32dip" + android:layout_width="32dp" android:layout_height="6sp" android:scaleType="fitXY" /> <ImageView android:id="@+id/widget_folder_1" - android:layout_width="32dip" + android:layout_width="32dp" android:layout_height="6sp" android:scaleType="fitXY" /> <ImageView android:id="@+id/widget_folder_2" - android:layout_width="32dip" + android:layout_width="32dp" android:layout_height="6sp" android:scaleType="fitXY" /> </LinearLayout> diff --git a/res/values-ldrtl/styles-ldrtl.xml b/res/values-ldrtl/styles-ldrtl.xml index 0196f29e8..818730e4e 100644 --- a/res/values-ldrtl/styles-ldrtl.xml +++ b/res/values-ldrtl/styles-ldrtl.xml @@ -244,6 +244,10 @@ <item name="android:paddingEnd">@dimen/widget_senders_padding_end</item> </style> + <style name="WidgetAttachStyle"> + <item name="android:paddingEnd">@dimen/widget_attachment_padding_end</item> + </style> + <style name="SearchStatusStyle"> <item name="android:paddingStart">@dimen/search_results_padding</item> </style> @@ -291,8 +295,21 @@ <item name="android:layout_alignParentEnd">true</item> </style> + <style name="ConversationListSubjectStyle"> + <item name="android:layout_alignParentTop">true</item> + <item name="android:layout_alignParentStart">true</item> + <item name="android:layout_toStartOf">@id/star</item> + </style> + + <style name="ConversationListSnippetStyle"> + <item name="android:layout_below">@id/subject</item> + <item name="android:layout_alignParentStart">true</item> + <item name="android:layout_toStartOf">@id/star</item> + </style> + <style name="ConversationListStarStyle"> - <item name="android:layout_marginEnd">@dimen/conv_list_star_padding_end</item> + <item name="android:layout_alignParentBottom">true</item> + <item name="android:layout_alignParentEnd">true</item> </style> <style name="AttachmentPreviewOverflowStyle"> diff --git a/res/values-sw600dp/dimen.xml b/res/values-sw600dp/dimen.xml index e8724e78a..855e5e6bc 100644 --- a/res/values-sw600dp/dimen.xml +++ b/res/values-sw600dp/dimen.xml @@ -22,8 +22,6 @@ <dimen name="conversation_header_padding_side">24dp</dimen> <dimen name="conversation_page_gutter">0dip</dimen> <dimen name="message_header_inner_side_padding">16dp</dimen> - <dimen name="message_header_contact_photo_width">64dp</dimen> - <dimen name="message_header_contact_photo_height">64dp</dimen> <dimen name="message_header_action_button_width">56dp</dimen> <dimen name="message_header_action_button_height">56dp</dimen> <dimen name="message_details_header_padding_start_expanded">104dip</dimen> diff --git a/res/values/colors.xml b/res/values/colors.xml index 99e2c64ed..7bcf3bb5c 100644 --- a/res/values/colors.xml +++ b/res/values/colors.xml @@ -22,12 +22,9 @@ <!-- if you want to make something blue, please try to use THIS blue --> <color name="mail_app_blue">@android:color/holo_blue_light</color> <!-- Conversation List Item Colors --> - <color name="subject_text_color_unread">@color/dark_gray_text_color</color> - <color name="snippet_text_color_unread">#777777</color> - <color name="senders_text_color_unread">@color/dark_gray_text_color</color> - <color name="subject_text_color_read">@color/subject_text_color_unread</color> - <color name="snippet_text_color_read">@color/snippet_text_color_unread</color> - <color name="senders_text_color_read">@color/senders_text_color_unread</color> + <color name="senders_text_color">#212121</color> + <color name="subject_text_color">#212121</color> + <color name="snippet_text_color">#757575</color> <color name="date_text_color_unread">#4285F4</color> <color name="date_text_color_read">#757575</color> <color name="message_info_text_color">@color/gray_text_color</color> diff --git a/res/values/dimen.xml b/res/values/dimen.xml index 394c8cfbe..5378d8222 100644 --- a/res/values/dimen.xml +++ b/res/values/dimen.xml @@ -62,8 +62,8 @@ <dimen name="super_collapsed_height">30sp</dimen> <dimen name="super_collapsed_text_size">14sp</dimen> <dimen name="notification_view_height">36dip</dimen> - <dimen name="message_header_contact_photo_width">40dp</dimen> - <dimen name="message_header_contact_photo_height">40dp</dimen> + <dimen name="contact_image_width">40dp</dimen> + <dimen name="contact_image_height">40dp</dimen> <dimen name="message_header_contact_photo_margin">16dp</dimen> <dimen name="message_header_inner_side_padding">16dp</dimen> <dimen name="attachment_toast_yoffset">-100dip</dimen> @@ -100,7 +100,6 @@ <dimen name="tile_divider_width">1dp</dimen> <dimen name="attachment_preview_height_tall">124dip</dimen> - <dimen name="attachment_preview_height_tall_wide">168dip</dimen> <dimen name="attachment_preview_height_short">28dip</dimen> <!-- Margin of 8dp with 12dp cancelled out --> <dimen name="attachment_preview_margin_top">-4dip</dimen> @@ -156,6 +155,7 @@ <dimen name="compose_recipient_heading_margin_end">4dip</dimen> <dimen name="widget_senders_padding_end">16dip</dimen> + <dimen name="widget_attachment_padding_end">8dp</dimen> <dimen name="search_results_padding">8dip</dimen> @@ -163,14 +163,13 @@ <dimen name="conv_list_padding">16dip</dimen> <dimen name="conv_list_card_border_padding">8dip</dimen> <dimen name="conv_list_no_border_padding">0dip</dimen> - <dimen name="conv_list_contact_image_padding_end">12dip</dimen> + <dimen name="conv_list_contact_image_padding_end">16dp</dimen> <dimen name="conv_list_reply_state_padding_end">8dip</dimen> <dimen name="conv_list_personal_indicator_padding_start">-2dip</dimen> <dimen name="conv_list_personal_indicator_padding_end">2dip</dimen> <dimen name="conv_list_info_icon_padding_start">4dip</dimen> <dimen name="conv_list_date_padding_start">8dip</dimen> <dimen name="conv_list_paperclip_padding_start">6dip</dimen> - <dimen name="conv_list_star_padding_end">-9dip</dimen> <dimen name="conv_list_wide_padding_start">20dip</dimen> <dimen name="conv_list_wide_padding_end">32dip</dimen> diff --git a/res/values/strings.xml b/res/values/strings.xml index bd19b07df..b1a5abf47 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -306,10 +306,8 @@ <!-- Formatting string. If the subject contains the tag of a mailing-list (text surrounded with return the subject with that tag ellipsized, e.g. "[android-gmail-team] Hello" -> "[andr...] Hello" [CHAR LIMIT=100] --> <string name="filtered_tag"> [<xliff:g id="tag">%1$s</xliff:g>]<xliff:g id="subject">%2$s</xliff:g></string> - <!-- Displayed in conversation list item in the form of "subject - snippet" [CHAR LIMIT=5] --> - <string name="subject_and_snippet"><xliff:g>%s</xliff:g> \u2014 <xliff:g>%s</xliff:g></string> - <!-- Displayed in conversation list item in the form of "badge subject - snippet" [CHAR LIMIT=7] --> - <string name="badge_subject_and_snippet"><xliff:g>%1$s</xliff:g> <xliff:g>%2$s</xliff:g> \u2014 <xliff:g>%3$s</xliff:g></string> + <!-- Displayed in conversation list item in the form of "badge subject" [CHAR LIMIT=7] --> + <string name="badge_and_subject"><xliff:g>%1$s</xliff:g> <xliff:g>%2$s</xliff:g></string> <!-- Displayed in browse list item when the list item is a draft message instead of showing the subject [CHAR LIMIT=100] --> <plurals name="draft"> <!-- Title of the screen when there is exactly one draft --> diff --git a/res/values/styles.xml b/res/values/styles.xml index cca2ad727..7e07d2608 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -477,21 +477,21 @@ </style> <style name="SubjectAppearanceUnreadStyle"> - <item name="android:textColor">@color/subject_text_color_unread</item> + <item name="android:textColor">@color/subject_text_color</item> <item name="android:textStyle">bold</item> </style> <style name="SubjectAppearanceReadStyle"> - <item name="android:textColor">@color/subject_text_color_read</item> + <item name="android:textColor">@color/subject_text_color</item> </style> <style name="SendersUnreadTextAppearance"> - <item name="android:textColor">@color/senders_text_color_unread</item> + <item name="android:textColor">@color/senders_text_color</item> <item name="android:textStyle">bold</item> </style> <style name="SendersReadTextAppearance"> - <item name="android:textColor">@color/senders_text_color_read</item> + <item name="android:textColor">@color/senders_text_color</item> </style> <style name="NotificationSendersUnreadTextAppearance"> @@ -793,6 +793,10 @@ <item name="android:paddingRight">@dimen/widget_senders_padding_end</item> </style> + <style name="WidgetAttachStyle"> + <item name="android:paddingRight">@dimen/widget_attachment_padding_end</item> + </style> + <style name="SearchStatusStyle"> <item name="android:paddingLeft">@dimen/search_results_padding</item> </style> @@ -840,8 +844,21 @@ <item name="android:layout_alignParentRight">true</item> </style> + <style name="ConversationListSubjectStyle"> + <item name="android:layout_alignParentTop">true</item> + <item name="android:layout_alignParentLeft">true</item> + <item name="android:layout_toLeftOf">@id/star</item> + </style> + + <style name="ConversationListSnippetStyle"> + <item name="android:layout_below">@id/subject</item> + <item name="android:layout_alignParentLeft">true</item> + <item name="android:layout_toLeftOf">@id/star</item> + </style> + <style name="ConversationListStarStyle"> - <item name="android:layout_marginRight">@dimen/conv_list_star_padding_end</item> + <item name="android:layout_alignParentBottom">true</item> + <item name="android:layout_alignParentRight">true</item> </style> <style name="AttachmentPreviewOverflowStyle"> |