Merge "Eliminate redundant methods in Address class" into ub-mail-master
diff --git a/Android.mk b/Android.mk
index a6bfd64..96e2d22 100644
--- a/Android.mk
+++ b/Android.mk
@@ -50,6 +50,8 @@
LOCAL_PROGUARD_FLAG_FILES := proguard.flags
+LOCAL_EMMA_COVERAGE_FILTER := +com.android.mail.*, +com.android.emailcommon.*, +com.google.android.mail.*
+
include $(BUILD_PACKAGE)
diff --git a/assets/fonts/Roboto-Medium.ttf b/assets/fonts/Roboto-Medium.ttf
deleted file mode 100644
index 8798341..0000000
--- a/assets/fonts/Roboto-Medium.ttf
+++ /dev/null
Binary files differ
diff --git a/assets/fonts/Roboto-MediumItalic.ttf b/assets/fonts/Roboto-MediumItalic.ttf
deleted file mode 100644
index 5e86637..0000000
--- a/assets/fonts/Roboto-MediumItalic.ttf
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/toast_frame_focused.9.png b/res/drawable-xhdpi/toast_frame_focused.9.png
index 479ea6e..2bc8545 100644
--- a/res/drawable-xhdpi/toast_frame_focused.9.png
+++ b/res/drawable-xhdpi/toast_frame_focused.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/toast_frame_normal.9.png b/res/drawable-xhdpi/toast_frame_normal.9.png
index f696ec4..bfdcc6e 100644
--- a/res/drawable-xhdpi/toast_frame_normal.9.png
+++ b/res/drawable-xhdpi/toast_frame_normal.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/toast_frame_pressed.9.png b/res/drawable-xhdpi/toast_frame_pressed.9.png
index 79ad140..c6fa03c 100644
--- a/res/drawable-xhdpi/toast_frame_pressed.9.png
+++ b/res/drawable-xhdpi/toast_frame_pressed.9.png
Binary files differ
diff --git a/res/layout-sw600dp/compose.xml b/res/layout-sw600dp/compose.xml
index cf66774..44fa5cb 100644
--- a/res/layout-sw600dp/compose.xml
+++ b/res/layout-sw600dp/compose.xml
@@ -38,12 +38,11 @@
android:paddingTop="8dip"
android:background="@android:color/white"
android:layout_gravity="center_horizontal"
- android:paddingLeft="@dimen/compose_area_left_padding"
android:animateLayoutChanges="true">
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:paddingRight="@dimen/compose_area_right_padding">
+ style="@style/ComposeRowStyle" >
<FrameLayout
style="@style/FillRowStyle">
<include layout="@layout/compose_from"/>
@@ -77,16 +76,17 @@
<View style="@style/RecipientComposeFieldSpacer"/>
</LinearLayout>
<RelativeLayout
- android:layout_width="@dimen/compose_area_right_padding"
+ android:layout_width="@dimen/compose_area_end_padding"
android:layout_height="wrap_content"
android:layout_column="2"
- android:layout_gravity="bottom|left"
- android:gravity="bottom|left">
+ android:layout_gravity="bottom|left|start"
+ android:gravity="bottom|left|start">
<Button android:id="@+id/add_cc_bcc"
android:text="@string/add_cc_label"
style="@style/ComposeButton"
android:layout_marginBottom="6dip"
android:paddingLeft="8dip"
+ android:paddingRight="8dip"
android:focusable="true"
android:clickable="true"/>
</RelativeLayout>
@@ -94,7 +94,7 @@
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:paddingRight="@dimen/compose_area_right_padding">
+ style="@style/ComposeRowStyle" >
<com.android.mail.compose.CcBccView
android:id="@+id/cc_bcc_wrapper"
style="@style/FillRowStyle"/>
@@ -108,7 +108,8 @@
android:layout_column="1"
android:layout_weight="1"
android:layout_width="0dip">
- <!-- Subject: localization cannot control what field pressing tab will bring the user to. This is controlled at runtime. -->
+ <!-- Subject: localization cannot control what field
+ pressing tab will bring the user to. This is controlled at runtime. -->
<com.android.mail.compose.EnterSubject android:id="@+id/subject"
style="@style/ComposeSubjectView" />
</RelativeLayout>
@@ -123,13 +124,14 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="4dip"
+ android:paddingRight="4dip"
android:clickable="false"/>
</RelativeLayout>
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:paddingRight="@dimen/compose_area_right_padding">
+ style="@style/ComposeRowStyle" >
<!-- Compose Area -->
<FrameLayout
android:id="@+id/compose_wrapper"
@@ -140,7 +142,7 @@
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:paddingRight="@dimen/compose_area_right_padding">
+ style="@style/ComposeRowStyle" >
<!-- Attachments -->
<com.android.mail.compose.AttachmentsView android:id="@+id/attachments"
android:orientation="vertical"
@@ -148,7 +150,6 @@
android:animateLayoutChanges="true"
android:paddingTop="2dip"
android:paddingBottom="0dip"
- android:paddingLeft="0dip"
android:visibility="gone"
style="@style/FillRowStyle">
<include layout="@layout/compose_attachments" />
@@ -157,7 +158,7 @@
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:paddingRight="@dimen/compose_area_right_padding">
+ style="@style/ComposeRowStyle" >
<!-- Quoted text -->
<com.android.mail.compose.QuotedTextView android:id="@+id/quoted_text_view"
android:layout_height="wrap_content"
diff --git a/res/layout-ldrtl/folder_list_header.xml b/res/layout-v17/folder_list_header.xml
similarity index 100%
rename from res/layout-ldrtl/folder_list_header.xml
rename to res/layout-v17/folder_list_header.xml
diff --git a/res/layout/compose_attachment_tile.xml b/res/layout/compose_attachment_tile.xml
index 376d23c..14a68ce 100644
--- a/res/layout/compose_attachment_tile.xml
+++ b/res/layout/compose_attachment_tile.xml
@@ -26,23 +26,22 @@
<include layout="@layout/attachment_preview"/>
- <RelativeLayout
+ <LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/attachment_tile_shadow_box_color"
android:layout_alignParentBottom="true"
android:gravity="center_vertical"
- android:paddingLeft="8dip">
+ style="@style/AttachmentTextContainer" >
<LinearLayout
- android:layout_width="match_parent"
+ android:layout_width="0dip"
android:layout_height="wrap_content"
- android:layout_alignParentLeft="true"
- android:layout_toLeftOf="@+id/attachment_tile_close_button"
+ android:layout_weight="1"
android:orientation="vertical"
android:gravity="center_vertical"
- android:layout_centerVertical="true"
- android:paddingRight="4dip">
+ android:layout_gravity="center_vertical"
+ style="@style/ComposeAttachmentTileTextEndStyle">
<TextView
android:id="@+id/attachment_tile_title"
@@ -72,15 +71,15 @@
</LinearLayout>
<ImageButton
- android:id="@id/attachment_tile_close_button"
+ android:id="@+id/attachment_tile_close_button"
android:src="@drawable/ic_attach_cancel"
android:layout_width="44dip"
android:layout_height="44dip"
+ android:layout_gravity="center_vertical|end|right"
android:gravity="center"
android:focusable="true"
- android:background="?android:attr/selectableItemBackground"
- android:layout_alignParentRight="true" />
+ android:background="?android:attr/selectableItemBackground" />
- </RelativeLayout>
+ </LinearLayout>
</com.android.mail.compose.ComposeAttachmentTile>
diff --git a/res/layout/conversation_item_view_normal.xml b/res/layout/conversation_item_view_normal.xml
index b34a019..f1f24ae 100644
--- a/res/layout/conversation_item_view_normal.xml
+++ b/res/layout/conversation_item_view_normal.xml
@@ -29,10 +29,11 @@
android:orientation="vertical">
<LinearLayout
+ android:id="@+id/conversation_item_frame"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginLeft="16dp"
- android:layout_marginRight="16dp"
+ android:layout_marginLeft="@dimen/conv_list_padding"
+ android:layout_marginRight="@dimen/conv_list_padding"
android:orientation="horizontal">
<View
diff --git a/res/layout/conversation_item_view_normal_spacious.xml b/res/layout/conversation_item_view_normal_spacious.xml
index be76c11..c93d41d 100644
--- a/res/layout/conversation_item_view_normal_spacious.xml
+++ b/res/layout/conversation_item_view_normal_spacious.xml
@@ -29,10 +29,11 @@
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/ConversationListSpaciousLinearLayoutStyle" >
+ style="@style/ConversationListSpaciousStyle" >
<View
android:id="@+id/contact_image"
diff --git a/res/layout/conversation_item_view_wide.xml b/res/layout/conversation_item_view_wide.xml
index 3e36b52..adc6f4c 100644
--- a/res/layout/conversation_item_view_wide.xml
+++ b/res/layout/conversation_item_view_wide.xml
@@ -29,9 +29,10 @@
android:orientation="vertical">
<FrameLayout
+ android:id="@+id/conversation_item_frame"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- style="@style/ConversationListFrameStyle" >
+ 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 -->
@@ -70,15 +71,27 @@
android:src="@drawable/ic_badge_reply_holo_light"
style="@style/ConversationListReplyStateStyle" />
- <TextView
- android:id="@+id/senders"
+ <LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
- android:textSize="18sp"
- android:lines="1"
- android:includeFontPadding="false"
- android:text="@string/long_string" />
+ 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"
diff --git a/res/layout/custom_from_dropdown_item.xml b/res/layout/custom_from_dropdown_item.xml
index 684dadf..e13843f 100644
--- a/res/layout/custom_from_dropdown_item.xml
+++ b/res/layout/custom_from_dropdown_item.xml
@@ -21,6 +21,7 @@
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:paddingLeft="24dip"
+ android:paddingRight="24dip"
android:layout_gravity="center_vertical"
android:paddingTop="10dip"
android:paddingBottom="10dip">
diff --git a/res/layout/custom_from_item.xml b/res/layout/custom_from_item.xml
index ccffd48..e7dcd9d 100644
--- a/res/layout/custom_from_item.xml
+++ b/res/layout/custom_from_item.xml
@@ -17,14 +17,15 @@
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="horizontal"
android:layout_height="wrap_content"
- android:layout_width="match_parent">
+ android:layout_width="match_parent"
+ android:orientation="horizontal"
+ android:paddingLeft="6dip"
+ android:paddingRight="6dip">
<TextView android:id="@+id/spinner_account_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:paddingLeft="6dip"
android:singleLine="true"
android:ellipsize="end"
android:textAppearance="?android:attr/textAppearanceMedium"/>
@@ -32,8 +33,8 @@
<TextView android:id="@+id/spinner_account_address"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:paddingLeft="6dip"
android:singleLine="true"
- android:ellipsize="end"/>
+ android:ellipsize="end"
+ style="@style/SpinnerAccountAddressStyle" />
</LinearLayout>
diff --git a/res/layout/drawer_empty_view.xml b/res/layout/drawer_empty_view.xml
index 788debd..b81d1a5 100644
--- a/res/layout/drawer_empty_view.xml
+++ b/res/layout/drawer_empty_view.xml
@@ -18,7 +18,7 @@
<!--Empty view shown in the drawer when we are waiting for folders to initialize. -->
-<RelativeLayout
+<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/empty_view"
android:layout_width="match_parent"
@@ -29,16 +29,15 @@
android:id="@+id/progress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_centerVertical="true"/>
+ android:layout_gravity="center_vertical" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_toRightOf="@id/progress"
- android:layout_centerVertical="true"
+ android:layout_gravity="center_vertical"
android:text="@string/wait_for_sync_title"
android:textColor="@color/dark_gray_text_color"
android:textAppearance="?android:attr/textAppearanceMedium"/>
-</RelativeLayout>
+</LinearLayout>
diff --git a/res/layout/folder_teaser_item.xml b/res/layout/folder_teaser_item.xml
index 63c2abc..3e53301 100644
--- a/res/layout/folder_teaser_item.xml
+++ b/res/layout/folder_teaser_item.xml
@@ -13,40 +13,31 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:background="@drawable/folder_teaser_item_background"
- android:paddingTop="8dp" >
+ android:background="@drawable/folder_teaser_item_background" >
<ImageView
android:id="@+id/folder_imageView"
android:layout_width="48dp"
android:layout_height="wrap_content"
- android:layout_alignParentLeft="true"
- android:layout_centerVertical="true"
- android:layout_marginLeft="16dp"
- android:layout_marginRight="12dp"
- android:layout_marginBottom="8dp"
+ android:layout_gravity="center_vertical"
android:background="@color/folder_teaser_icon_background"
- android:baselineAlignBottom="true"
- android:duplicateParentState="true" />
-
- <View
- android:id="@+id/frame_height_spacer"
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:layout_below="@id/folder_imageView" />
+ android:duplicateParentState="true"
+ style="@style/FolderTeaserMarginStartStyle" />
<LinearLayout
android:id="@+id/text_layout"
- android:layout_width="match_parent"
+ android:layout_width="0dip"
android:layout_height="wrap_content"
- android:layout_centerVertical="true"
- android:layout_toLeftOf="@+id/count_textView"
- android:layout_toRightOf="@id/folder_imageView"
+ android:layout_weight="1"
+ android:layout_gravity="center_vertical"
+ android:layout_marginLeft="12dp"
+ android:layout_marginRight="12dp"
android:duplicateParentState="true"
- android:orientation="vertical" >
+ android:orientation="vertical"
+ style="@style/FolderTeaserVerticalMarginStyle" >
<TextView
android:id="@+id/folder_textView"
@@ -75,18 +66,16 @@
</LinearLayout>
<TextView
- android:id="@id/count_textView"
+ android:id="@+id/count_textView"
android:layout_width="wrap_content"
android:layout_height="24sp"
- android:layout_alignParentRight="true"
- android:layout_centerVertical="true"
- android:layout_marginLeft="12dp"
- android:layout_marginRight="16dp"
+ android:layout_gravity="center_vertical"
android:minWidth="@dimen/folder_teaser_count_textview_minwidth"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:gravity="center"
android:textColor="@color/folder_teaser_count_text"
- android:textSize="16sp" />
+ android:textSize="16sp"
+ style="@style/FolderTeaserMarginEndStyle" />
-</RelativeLayout>
\ No newline at end of file
+</LinearLayout>
diff --git a/res/layout/from_dropdown_item.xml b/res/layout/from_dropdown_item.xml
index 892ee14..f445127 100644
--- a/res/layout/from_dropdown_item.xml
+++ b/res/layout/from_dropdown_item.xml
@@ -29,6 +29,7 @@
android:layout_weight="1"
android:ellipsize="end"
android:paddingLeft="8dip"
+ android:paddingRight="8dip"
android:gravity="center_vertical" />
</LinearLayout>
diff --git a/res/layout/from_item.xml b/res/layout/from_item.xml
index 62ed7f4..9c90d14 100644
--- a/res/layout/from_item.xml
+++ b/res/layout/from_item.xml
@@ -23,4 +23,5 @@
android:ellipsize="end"
android:textAppearance="?android:attr/textAppearanceMedium"
android:paddingLeft="8dip"
- android:gravity="center_vertical"/>
\ No newline at end of file
+ android:paddingRight="8dip"
+ android:gravity="center_vertical"/>
diff --git a/res/layout/quoted_text.xml b/res/layout/quoted_text.xml
index 8a9f1b8..0accc29 100644
--- a/res/layout/quoted_text.xml
+++ b/res/layout/quoted_text.xml
@@ -15,54 +15,38 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/quoted_text_area"
android:layout_height="wrap_content"
- android:layout_width="match_parent">
+ android:layout_width="match_parent"
+ android:orientation="vertical">
- <View
+ <View android:id="@+id/upper_quotedtext_divider_bar"
android:layout_width="match_parent"
android:layout_height="2dip"
android:background="#babebe"
- android:id="@+id/upper_quotedtext_divider_bar"
android:visibility="gone" />
- <LinearLayout android:layout_width="match_parent"
- android:layout_height="48dip"
- android:id="@+id/quoted_text_button_bar"
- android:layout_below="@id/upper_quotedtext_divider_bar"
- android:layout_alignWithParentIfMissing="true"
- android:layout_alignParentTop="true">
+ <LinearLayout android:id="@+id/quoted_text_button_bar"
+ android:layout_width="match_parent"
+ android:layout_height="48dip" >
- <RelativeLayout android:layout_width="0dip"
- android:layout_weight="1"
+ <CheckBox android:id="@+id/hide_quoted_text"
+ android:layout_width="0dip"
android:layout_height="match_parent"
- android:id="@+id/quoted_text_row">
+ android:layout_weight="1"
+ android:contentDescription="@string/quoted_text"
+ android:drawablePadding="@dimen/quoted_text_header_padding"
+ android:ellipsize="end"
+ android:gravity="center_vertical"
+ android:text="@string/quoted_text_label"
+ android:textAllCaps="true"
+ android:textColor="@color/quoted_text_color"
+ android:textSize="12sp" />
- <CheckBox android:id="@+id/hide_quoted_text"
- android:layout_height="match_parent"
- android:layout_width="wrap_content"
- android:layout_alignParentLeft="true"
- android:gravity="center_vertical"
- android:contentDescription="@string/quoted_text"/>
-
- <TextView
- android:id="@+id/hide_quoted_text_label"
- android:text="@string/quoted_text_label"
- android:textAllCaps="true"
- android:layout_height="match_parent"
- android:layout_width="wrap_content"
- android:layout_marginLeft="8dip"
- style="@style/QuotedTextHeaderStyle"
- android:layout_toRightOf="@+id/hide_quoted_text"
- android:gravity="center_vertical|left"
- android:ellipsize="end"
- android:clickable="true" />
- </RelativeLayout>
-
- <View android:layout_height="match_parent"
+ <View
android:layout_width="2dip"
- android:layout_marginRight="16dip"
+ android:layout_height="match_parent"
android:background="#babebe"
android:layout_marginTop="12dip"
android:layout_marginBottom="12dip"
@@ -75,7 +59,7 @@
android:textAllCaps="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:background="@null"/>
+ android:background="?android:attr/selectableItemBackground"/>
</LinearLayout>
@@ -83,14 +67,12 @@
android:layout_width="match_parent"
android:layout_height="2dip"
android:background="#babebe"
- android:layout_below="@id/quoted_text_button_bar"
android:id="@+id/divider_bar" />
<WebView android:id="@+id/quoted_text_web_view"
android:layout_height="wrap_content"
android:layout_width="match_parent"
- android:layout_below="@id/divider_bar"
android:focusableInTouchMode="false"
android:focusable="false" />
-</RelativeLayout>
+</LinearLayout>
diff --git a/res/values-af/strings.xml b/res/values-af/strings.xml
index a5ee6ad..fb8365d 100644
--- a/res/values-af/strings.xml
+++ b/res/values-af/strings.xml
@@ -140,6 +140,7 @@
<string name="unread_string" msgid="588180203444398297">"gesprek ongelees"</string>
<string name="filtered_tag" msgid="6470627954465675488">"[<xliff:g id="TAG">%1$s</xliff:g>]<xliff:g id="SUBJECT">%2$s</xliff:g>"</string>
<string name="subject_and_snippet" msgid="7884124651812798896">"<xliff:g id="ID_1">%s</xliff:g> — <xliff:g id="ID_2">%s</xliff:g>"</string>
+ <string name="badge_subject_and_snippet" msgid="1261901365444812399">"<xliff:g id="ID_1">%1$s</xliff:g> <xliff:g id="ID_2">%2$s</xliff:g> — <xliff:g id="ID_3">%3$s</xliff:g>"</string>
<plurals name="draft">
<item quantity="one" msgid="333591132893648383">"Konsep"</item>
<item quantity="other" msgid="6961049507579977505">"Konsepte"</item>
diff --git a/res/values-am/strings.xml b/res/values-am/strings.xml
index be5e014..f67abdc 100644
--- a/res/values-am/strings.xml
+++ b/res/values-am/strings.xml
@@ -140,6 +140,7 @@
<string name="unread_string" msgid="588180203444398297">"ያልተነበበ ውይይት"</string>
<string name="filtered_tag" msgid="6470627954465675488">"[<xliff:g id="TAG">%1$s</xliff:g>]<xliff:g id="SUBJECT">%2$s</xliff:g>"</string>
<string name="subject_and_snippet" msgid="7884124651812798896">"<xliff:g id="ID_1">%s</xliff:g> — <xliff:g id="ID_2">%s</xliff:g>"</string>
+ <string name="badge_subject_and_snippet" msgid="1261901365444812399">"<xliff:g id="ID_1">%1$s</xliff:g> <xliff:g id="ID_2">%2$s</xliff:g> — <xliff:g id="ID_3">%3$s</xliff:g>"</string>
<plurals name="draft">
<item quantity="one" msgid="333591132893648383">"ረቂቅ"</item>
<item quantity="other" msgid="6961049507579977505">"ረቂቆች"</item>
diff --git a/res/values-ar/strings.xml b/res/values-ar/strings.xml
index fc0cc99..2c45dd2 100644
--- a/res/values-ar/strings.xml
+++ b/res/values-ar/strings.xml
@@ -26,7 +26,7 @@
<string name="add_file_attachment" msgid="2203398371671979481">"إرفاق ملف"</string>
<string name="add_photo_attachment" msgid="3738882100645552858">"إرفاق صورة"</string>
<string name="save_draft" msgid="5555744208032445632">"حفظ كمسودة"</string>
- <string name="discard" msgid="1714960202994370243">"إلغاء"</string>
+ <string name="discard" msgid="1714960202994370243">"تجاهل"</string>
<string name="compose" msgid="1473559896062432878">"إنشاء"</string>
<string-array name="compose_modes">
<item msgid="8631190144210933782">"رد"</item>
@@ -140,6 +140,7 @@
<string name="unread_string" msgid="588180203444398297">"لم تتم قراءة المحادثة"</string>
<string name="filtered_tag" msgid="6470627954465675488">"[<xliff:g id="TAG">%1$s</xliff:g>]<xliff:g id="SUBJECT">%2$s</xliff:g>"</string>
<string name="subject_and_snippet" msgid="7884124651812798896">"<xliff:g id="ID_1">%s</xliff:g> — <xliff:g id="ID_2">%s</xliff:g>"</string>
+ <string name="badge_subject_and_snippet" msgid="1261901365444812399">"<xliff:g id="ID_1">%1$s</xliff:g> <xliff:g id="ID_2">%2$s</xliff:g> — <xliff:g id="ID_3">%3$s</xliff:g>"</string>
<plurals name="draft">
<item quantity="one" msgid="333591132893648383">"مسودة"</item>
<item quantity="other" msgid="6961049507579977505">"مسودات"</item>
diff --git a/res/values-bg/strings.xml b/res/values-bg/strings.xml
index 16712eb..3aad645 100644
--- a/res/values-bg/strings.xml
+++ b/res/values-bg/strings.xml
@@ -140,6 +140,7 @@
<string name="unread_string" msgid="588180203444398297">"кореспонденцията не е прочетена"</string>
<string name="filtered_tag" msgid="6470627954465675488">"[<xliff:g id="TAG">%1$s</xliff:g>]<xliff:g id="SUBJECT">%2$s</xliff:g>"</string>
<string name="subject_and_snippet" msgid="7884124651812798896">"<xliff:g id="ID_1">%s</xliff:g> – <xliff:g id="ID_2">%s</xliff:g>"</string>
+ <string name="badge_subject_and_snippet" msgid="1261901365444812399">"<xliff:g id="ID_1">%1$s</xliff:g> <xliff:g id="ID_2">%2$s</xliff:g> – <xliff:g id="ID_3">%3$s</xliff:g>"</string>
<plurals name="draft">
<item quantity="one" msgid="333591132893648383">"Чернова"</item>
<item quantity="other" msgid="6961049507579977505">"Чернови"</item>
diff --git a/res/values-ca/strings.xml b/res/values-ca/strings.xml
index 2712935..24d5ec5 100644
--- a/res/values-ca/strings.xml
+++ b/res/values-ca/strings.xml
@@ -140,6 +140,7 @@
<string name="unread_string" msgid="588180203444398297">"conversa per llegir"</string>
<string name="filtered_tag" msgid="6470627954465675488">"[<xliff:g id="TAG">%1$s</xliff:g>]<xliff:g id="SUBJECT">%2$s</xliff:g>"</string>
<string name="subject_and_snippet" msgid="7884124651812798896">"<xliff:g id="ID_1">%s</xliff:g> — <xliff:g id="ID_2">%s</xliff:g>"</string>
+ <string name="badge_subject_and_snippet" msgid="1261901365444812399">"<xliff:g id="ID_1">%1$s</xliff:g> <xliff:g id="ID_2">%2$s</xliff:g> — <xliff:g id="ID_3">%3$s</xliff:g>"</string>
<plurals name="draft">
<item quantity="one" msgid="333591132893648383">"Esborrany"</item>
<item quantity="other" msgid="6961049507579977505">"Esborranys"</item>
diff --git a/res/values-cs/strings.xml b/res/values-cs/strings.xml
index 3a843ae..fcce3e9 100644
--- a/res/values-cs/strings.xml
+++ b/res/values-cs/strings.xml
@@ -140,6 +140,7 @@
<string name="unread_string" msgid="588180203444398297">"Konverzace nebyla přečtena."</string>
<string name="filtered_tag" msgid="6470627954465675488">"[<xliff:g id="TAG">%1$s</xliff:g>]<xliff:g id="SUBJECT">%2$s</xliff:g>"</string>
<string name="subject_and_snippet" msgid="7884124651812798896">"<xliff:g id="ID_1">%s</xliff:g> – <xliff:g id="ID_2">%s</xliff:g>"</string>
+ <string name="badge_subject_and_snippet" msgid="1261901365444812399">"<xliff:g id="ID_1">%1$s</xliff:g> <xliff:g id="ID_2">%2$s</xliff:g> – <xliff:g id="ID_3">%3$s</xliff:g>"</string>
<plurals name="draft">
<item quantity="one" msgid="333591132893648383">"Koncept"</item>
<item quantity="other" msgid="6961049507579977505">"Koncepty"</item>
diff --git a/res/values-da/strings.xml b/res/values-da/strings.xml
index 2500d8e..d56595a 100644
--- a/res/values-da/strings.xml
+++ b/res/values-da/strings.xml
@@ -140,6 +140,7 @@
<string name="unread_string" msgid="588180203444398297">"samtalen er ulæst"</string>
<string name="filtered_tag" msgid="6470627954465675488">"[<xliff:g id="TAG">%1$s</xliff:g>]<xliff:g id="SUBJECT">%2$s</xliff:g>"</string>
<string name="subject_and_snippet" msgid="7884124651812798896">"<xliff:g id="ID_1">%s</xliff:g> – <xliff:g id="ID_2">%s</xliff:g>"</string>
+ <string name="badge_subject_and_snippet" msgid="1261901365444812399">"<xliff:g id="ID_1">%1$s</xliff:g> <xliff:g id="ID_2">%2$s</xliff:g> – <xliff:g id="ID_3">%3$s</xliff:g>"</string>
<plurals name="draft">
<item quantity="one" msgid="333591132893648383">"Kladde"</item>
<item quantity="other" msgid="6961049507579977505">"Kladder"</item>
diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml
index 6724f76..dd6d143 100644
--- a/res/values-de/strings.xml
+++ b/res/values-de/strings.xml
@@ -60,7 +60,7 @@
<string name="remove_folder" msgid="4906542720439865413">"Aus <xliff:g id="FOLDERNAME">%1$s</xliff:g> entfernen"</string>
<string name="archive" msgid="847250094775910499">"Archivieren"</string>
<string name="report_spam" msgid="6467567747975393907">"Spam melden"</string>
- <string name="mark_not_spam" msgid="694891665407228160">"Nicht als Spam melden"</string>
+ <string name="mark_not_spam" msgid="694891665407228160">"Kein Spam"</string>
<string name="report_phishing" msgid="5714205737453138338">"Phishing melden"</string>
<string name="delete" msgid="844871204175957681">"Löschen"</string>
<string name="discard_drafts" msgid="6862272443470085375">"Entwürfe löschen"</string>
@@ -140,6 +140,7 @@
<string name="unread_string" msgid="588180203444398297">"Konversation ungelesen"</string>
<string name="filtered_tag" msgid="6470627954465675488">"[<xliff:g id="TAG">%1$s</xliff:g>]<xliff:g id="SUBJECT">%2$s</xliff:g>"</string>
<string name="subject_and_snippet" msgid="7884124651812798896">"<xliff:g id="ID_1">%s</xliff:g> – <xliff:g id="ID_2">%s</xliff:g>"</string>
+ <string name="badge_subject_and_snippet" msgid="1261901365444812399">"<xliff:g id="ID_1">%1$s</xliff:g> <xliff:g id="ID_2">%2$s</xliff:g> – <xliff:g id="ID_3">%3$s</xliff:g>"</string>
<plurals name="draft">
<item quantity="one" msgid="333591132893648383">"Entwurf"</item>
<item quantity="other" msgid="6961049507579977505">"Entwürfe"</item>
diff --git a/res/values-el/strings.xml b/res/values-el/strings.xml
index 6b8f70b..9001796 100644
--- a/res/values-el/strings.xml
+++ b/res/values-el/strings.xml
@@ -140,6 +140,7 @@
<string name="unread_string" msgid="588180203444398297">"μη αναγνωσμένη συνομιλία"</string>
<string name="filtered_tag" msgid="6470627954465675488">"[<xliff:g id="TAG">%1$s</xliff:g>]<xliff:g id="SUBJECT">%2$s</xliff:g>"</string>
<string name="subject_and_snippet" msgid="7884124651812798896">"<xliff:g id="ID_1">%s</xliff:g> — <xliff:g id="ID_2">%s</xliff:g>"</string>
+ <string name="badge_subject_and_snippet" msgid="1261901365444812399">"<xliff:g id="ID_1">%1$s</xliff:g> <xliff:g id="ID_2">%2$s</xliff:g> — <xliff:g id="ID_3">%3$s</xliff:g>"</string>
<plurals name="draft">
<item quantity="one" msgid="333591132893648383">"Πρόχειρο"</item>
<item quantity="other" msgid="6961049507579977505">"Πρόχειρα"</item>
diff --git a/res/values-en-rGB/strings.xml b/res/values-en-rGB/strings.xml
index 66df3e4..346b1ab 100644
--- a/res/values-en-rGB/strings.xml
+++ b/res/values-en-rGB/strings.xml
@@ -140,6 +140,7 @@
<string name="unread_string" msgid="588180203444398297">"conversation unread"</string>
<string name="filtered_tag" msgid="6470627954465675488">"[<xliff:g id="TAG">%1$s</xliff:g>]<xliff:g id="SUBJECT">%2$s</xliff:g>"</string>
<string name="subject_and_snippet" msgid="7884124651812798896">"<xliff:g id="ID_1">%s</xliff:g> — <xliff:g id="ID_2">%s</xliff:g>"</string>
+ <string name="badge_subject_and_snippet" msgid="1261901365444812399">"<xliff:g id="ID_1">%1$s</xliff:g> <xliff:g id="ID_2">%2$s</xliff:g> – <xliff:g id="ID_3">%3$s</xliff:g>"</string>
<plurals name="draft">
<item quantity="one" msgid="333591132893648383">"Draft"</item>
<item quantity="other" msgid="6961049507579977505">"Drafts"</item>
diff --git a/res/values-en-rIN/strings.xml b/res/values-en-rIN/strings.xml
index 66df3e4..346b1ab 100644
--- a/res/values-en-rIN/strings.xml
+++ b/res/values-en-rIN/strings.xml
@@ -140,6 +140,7 @@
<string name="unread_string" msgid="588180203444398297">"conversation unread"</string>
<string name="filtered_tag" msgid="6470627954465675488">"[<xliff:g id="TAG">%1$s</xliff:g>]<xliff:g id="SUBJECT">%2$s</xliff:g>"</string>
<string name="subject_and_snippet" msgid="7884124651812798896">"<xliff:g id="ID_1">%s</xliff:g> — <xliff:g id="ID_2">%s</xliff:g>"</string>
+ <string name="badge_subject_and_snippet" msgid="1261901365444812399">"<xliff:g id="ID_1">%1$s</xliff:g> <xliff:g id="ID_2">%2$s</xliff:g> – <xliff:g id="ID_3">%3$s</xliff:g>"</string>
<plurals name="draft">
<item quantity="one" msgid="333591132893648383">"Draft"</item>
<item quantity="other" msgid="6961049507579977505">"Drafts"</item>
diff --git a/res/values-es-rUS/strings.xml b/res/values-es-rUS/strings.xml
index 6be45e7..211bf2e 100644
--- a/res/values-es-rUS/strings.xml
+++ b/res/values-es-rUS/strings.xml
@@ -140,6 +140,7 @@
<string name="unread_string" msgid="588180203444398297">"conversación no leída"</string>
<string name="filtered_tag" msgid="6470627954465675488">"[<xliff:g id="TAG">%1$s</xliff:g>]<xliff:g id="SUBJECT">%2$s</xliff:g>"</string>
<string name="subject_and_snippet" msgid="7884124651812798896">"<xliff:g id="ID_1">%s</xliff:g> — <xliff:g id="ID_2">%s</xliff:g>"</string>
+ <string name="badge_subject_and_snippet" msgid="1261901365444812399">"<xliff:g id="ID_1">%1$s</xliff:g> <xliff:g id="ID_2">%2$s</xliff:g>: <xliff:g id="ID_3">%3$s</xliff:g>"</string>
<plurals name="draft">
<item quantity="one" msgid="333591132893648383">"Borrador"</item>
<item quantity="other" msgid="6961049507579977505">"Borradores"</item>
diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml
index 24e2066..bab3841 100644
--- a/res/values-es/strings.xml
+++ b/res/values-es/strings.xml
@@ -140,6 +140,7 @@
<string name="unread_string" msgid="588180203444398297">"conversación no leída"</string>
<string name="filtered_tag" msgid="6470627954465675488">"[<xliff:g id="TAG">%1$s</xliff:g>]<xliff:g id="SUBJECT">%2$s</xliff:g>"</string>
<string name="subject_and_snippet" msgid="7884124651812798896">"<xliff:g id="ID_1">%s</xliff:g> - <xliff:g id="ID_2">%s</xliff:g>"</string>
+ <string name="badge_subject_and_snippet" msgid="1261901365444812399">"<xliff:g id="ID_1">%1$s</xliff:g> <xliff:g id="ID_2">%2$s</xliff:g> — <xliff:g id="ID_3">%3$s</xliff:g>"</string>
<plurals name="draft">
<item quantity="one" msgid="333591132893648383">"Borrador"</item>
<item quantity="other" msgid="6961049507579977505">"Borradores"</item>
diff --git a/res/values-et-rEE/strings.xml b/res/values-et-rEE/strings.xml
index 7fc8599..0ab72e7 100644
--- a/res/values-et-rEE/strings.xml
+++ b/res/values-et-rEE/strings.xml
@@ -140,6 +140,7 @@
<string name="unread_string" msgid="588180203444398297">"lugemata vestlus"</string>
<string name="filtered_tag" msgid="6470627954465675488">"[<xliff:g id="TAG">%1$s</xliff:g>] <xliff:g id="SUBJECT">%2$s</xliff:g>"</string>
<string name="subject_and_snippet" msgid="7884124651812798896">"<xliff:g id="ID_1">%s</xliff:g> – <xliff:g id="ID_2">%s</xliff:g>"</string>
+ <string name="badge_subject_and_snippet" msgid="1261901365444812399">"<xliff:g id="ID_1">%1$s</xliff:g> <xliff:g id="ID_2">%2$s</xliff:g> – <xliff:g id="ID_3">%3$s</xliff:g>"</string>
<plurals name="draft">
<item quantity="one" msgid="333591132893648383">"Mustand"</item>
<item quantity="other" msgid="6961049507579977505">"Mustandid"</item>
diff --git a/res/values-fa/strings.xml b/res/values-fa/strings.xml
index bbf8afd..70c0b8e 100644
--- a/res/values-fa/strings.xml
+++ b/res/values-fa/strings.xml
@@ -140,6 +140,7 @@
<string name="unread_string" msgid="588180203444398297">"مکالمه خوانده نشده است"</string>
<string name="filtered_tag" msgid="6470627954465675488">"[<xliff:g id="TAG">%1$s</xliff:g>]<xliff:g id="SUBJECT">%2$s</xliff:g>"</string>
<string name="subject_and_snippet" msgid="7884124651812798896">"<xliff:g id="ID_1">%s</xliff:g> — <xliff:g id="ID_2">%s</xliff:g>"</string>
+ <string name="badge_subject_and_snippet" msgid="1261901365444812399">"<xliff:g id="ID_1">%1$s</xliff:g> <xliff:g id="ID_2">%2$s</xliff:g> — <xliff:g id="ID_3">%3$s</xliff:g>"</string>
<plurals name="draft">
<item quantity="one" msgid="333591132893648383">"پیشنویس"</item>
<item quantity="other" msgid="6961049507579977505">"پیشنویسها"</item>
diff --git a/res/values-fi/strings.xml b/res/values-fi/strings.xml
index c9d1ddf..1f8d95e 100644
--- a/res/values-fi/strings.xml
+++ b/res/values-fi/strings.xml
@@ -140,6 +140,7 @@
<string name="unread_string" msgid="588180203444398297">"keskustelua ei ole luettu"</string>
<string name="filtered_tag" msgid="6470627954465675488">"[<xliff:g id="TAG">%1$s</xliff:g>]<xliff:g id="SUBJECT">%2$s</xliff:g>"</string>
<string name="subject_and_snippet" msgid="7884124651812798896">"<xliff:g id="ID_1">%s</xliff:g>–<xliff:g id="ID_2">%s</xliff:g>"</string>
+ <string name="badge_subject_and_snippet" msgid="1261901365444812399">"<xliff:g id="ID_1">%1$s</xliff:g> <xliff:g id="ID_2">%2$s</xliff:g> – <xliff:g id="ID_3">%3$s</xliff:g>"</string>
<plurals name="draft">
<item quantity="one" msgid="333591132893648383">"Luonnos"</item>
<item quantity="other" msgid="6961049507579977505">"Luonnokset"</item>
diff --git a/res/values-fr-rCA/strings.xml b/res/values-fr-rCA/strings.xml
index 90fe776..8e64683 100644
--- a/res/values-fr-rCA/strings.xml
+++ b/res/values-fr-rCA/strings.xml
@@ -140,6 +140,7 @@
<string name="unread_string" msgid="588180203444398297">"conversation non lue"</string>
<string name="filtered_tag" msgid="6470627954465675488">"[<xliff:g id="TAG">%1$s</xliff:g>]<xliff:g id="SUBJECT">%2$s</xliff:g>"</string>
<string name="subject_and_snippet" msgid="7884124651812798896">"<xliff:g id="ID_1">%s</xliff:g> – <xliff:g id="ID_2">%s</xliff:g>"</string>
+ <string name="badge_subject_and_snippet" msgid="1261901365444812399">"<xliff:g id="ID_1">%1$s</xliff:g> <xliff:g id="ID_2">%2$s</xliff:g> – <xliff:g id="ID_3">%3$s</xliff:g>"</string>
<plurals name="draft">
<item quantity="one" msgid="333591132893648383">"Version préliminaire"</item>
<item quantity="other" msgid="6961049507579977505">"Brouillons"</item>
diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml
index f780fd1..e0420bf 100644
--- a/res/values-fr/strings.xml
+++ b/res/values-fr/strings.xml
@@ -140,6 +140,7 @@
<string name="unread_string" msgid="588180203444398297">"conversation non lue"</string>
<string name="filtered_tag" msgid="6470627954465675488">"[<xliff:g id="TAG">%1$s</xliff:g>]<xliff:g id="SUBJECT">%2$s</xliff:g>"</string>
<string name="subject_and_snippet" msgid="7884124651812798896">"<xliff:g id="ID_1">%s</xliff:g> – <xliff:g id="ID_2">%s</xliff:g>"</string>
+ <string name="badge_subject_and_snippet" msgid="1261901365444812399">"<xliff:g id="ID_1">%1$s</xliff:g> <xliff:g id="ID_2">%2$s</xliff:g> – <xliff:g id="ID_3">%3$s</xliff:g>"</string>
<plurals name="draft">
<item quantity="one" msgid="333591132893648383">"Brouillon"</item>
<item quantity="other" msgid="6961049507579977505">"Brouillons"</item>
diff --git a/res/values-hi/strings.xml b/res/values-hi/strings.xml
index 1035a87..f193421 100644
--- a/res/values-hi/strings.xml
+++ b/res/values-hi/strings.xml
@@ -140,6 +140,7 @@
<string name="unread_string" msgid="588180203444398297">"वार्तालाप नहीं पढ़ा गया"</string>
<string name="filtered_tag" msgid="6470627954465675488">"[<xliff:g id="TAG">%1$s</xliff:g>]<xliff:g id="SUBJECT">%2$s</xliff:g>"</string>
<string name="subject_and_snippet" msgid="7884124651812798896">"<xliff:g id="ID_1">%s</xliff:g> — <xliff:g id="ID_2">%s</xliff:g>"</string>
+ <string name="badge_subject_and_snippet" msgid="1261901365444812399">"<xliff:g id="ID_1">%1$s</xliff:g> <xliff:g id="ID_2">%2$s</xliff:g> — <xliff:g id="ID_3">%3$s</xliff:g>"</string>
<plurals name="draft">
<item quantity="one" msgid="333591132893648383">"ड्रॉफ़्ट"</item>
<item quantity="other" msgid="6961049507579977505">"अधूरा ईमेल"</item>
diff --git a/res/values-hr/strings.xml b/res/values-hr/strings.xml
index 63f66ca..5c2cb8e 100644
--- a/res/values-hr/strings.xml
+++ b/res/values-hr/strings.xml
@@ -140,6 +140,7 @@
<string name="unread_string" msgid="588180203444398297">"razgovor nije pročitan"</string>
<string name="filtered_tag" msgid="6470627954465675488">"[<xliff:g id="TAG">%1$s</xliff:g>]<xliff:g id="SUBJECT">%2$s</xliff:g>"</string>
<string name="subject_and_snippet" msgid="7884124651812798896">"<xliff:g id="ID_1">%s</xliff:g> — <xliff:g id="ID_2">%s</xliff:g>"</string>
+ <string name="badge_subject_and_snippet" msgid="1261901365444812399">"<xliff:g id="ID_1">%1$s</xliff:g> <xliff:g id="ID_2">%2$s</xliff:g> – <xliff:g id="ID_3">%3$s</xliff:g>"</string>
<plurals name="draft">
<item quantity="one" msgid="333591132893648383">"Skica"</item>
<item quantity="other" msgid="6961049507579977505">"Skice"</item>
diff --git a/res/values-hu/strings.xml b/res/values-hu/strings.xml
index 891d713..e51730a 100644
--- a/res/values-hu/strings.xml
+++ b/res/values-hu/strings.xml
@@ -140,6 +140,7 @@
<string name="unread_string" msgid="588180203444398297">"a beszélgetés nincs elolvasva"</string>
<string name="filtered_tag" msgid="6470627954465675488">"[<xliff:g id="TAG">%1$s</xliff:g>]<xliff:g id="SUBJECT">%2$s</xliff:g>"</string>
<string name="subject_and_snippet" msgid="7884124651812798896">"<xliff:g id="ID_1">%s</xliff:g> -- <xliff:g id="ID_2">%s</xliff:g>"</string>
+ <string name="badge_subject_and_snippet" msgid="1261901365444812399">"<xliff:g id="ID_1">%1$s</xliff:g> <xliff:g id="ID_2">%2$s</xliff:g> – <xliff:g id="ID_3">%3$s</xliff:g>"</string>
<plurals name="draft">
<item quantity="one" msgid="333591132893648383">"Piszkozat"</item>
<item quantity="other" msgid="6961049507579977505">"Piszkozatok"</item>
diff --git a/res/values-hy-rAM/strings.xml b/res/values-hy-rAM/strings.xml
index f46da78..2defac7 100644
--- a/res/values-hy-rAM/strings.xml
+++ b/res/values-hy-rAM/strings.xml
@@ -140,6 +140,7 @@
<string name="unread_string" msgid="588180203444398297">"զրույցը չընթերցված է"</string>
<string name="filtered_tag" msgid="6470627954465675488">"[<xliff:g id="TAG">%1$s</xliff:g>]<xliff:g id="SUBJECT">%2$s</xliff:g>"</string>
<string name="subject_and_snippet" msgid="7884124651812798896">"<xliff:g id="ID_1">%s</xliff:g> — <xliff:g id="ID_2">%s</xliff:g>"</string>
+ <string name="badge_subject_and_snippet" msgid="1261901365444812399">"<xliff:g id="ID_1">%1$s</xliff:g> <xliff:g id="ID_2">%2$s</xliff:g> — <xliff:g id="ID_3">%3$s</xliff:g>"</string>
<plurals name="draft">
<item quantity="one" msgid="333591132893648383">"Սևագիր"</item>
<item quantity="other" msgid="6961049507579977505">"Սևագրություններ"</item>
diff --git a/res/values-in/strings.xml b/res/values-in/strings.xml
index 2d5134e..9cb8102 100644
--- a/res/values-in/strings.xml
+++ b/res/values-in/strings.xml
@@ -140,6 +140,7 @@
<string name="unread_string" msgid="588180203444398297">"percakapan belum dibaca"</string>
<string name="filtered_tag" msgid="6470627954465675488">"[<xliff:g id="TAG">%1$s</xliff:g>]<xliff:g id="SUBJECT">%2$s</xliff:g>"</string>
<string name="subject_and_snippet" msgid="7884124651812798896">"<xliff:g id="ID_1">%s</xliff:g> — <xliff:g id="ID_2">%s</xliff:g>"</string>
+ <string name="badge_subject_and_snippet" msgid="1261901365444812399">"<xliff:g id="ID_1">%1$s</xliff:g> <xliff:g id="ID_2">%2$s</xliff:g> — <xliff:g id="ID_3">%3$s</xliff:g>"</string>
<plurals name="draft">
<item quantity="one" msgid="333591132893648383">"Draf"</item>
<item quantity="other" msgid="6961049507579977505">"Draf"</item>
diff --git a/res/values-it/strings.xml b/res/values-it/strings.xml
index f0b5afc..b2cf467 100644
--- a/res/values-it/strings.xml
+++ b/res/values-it/strings.xml
@@ -140,6 +140,7 @@
<string name="unread_string" msgid="588180203444398297">"conversazione da leggere"</string>
<string name="filtered_tag" msgid="6470627954465675488">"[<xliff:g id="TAG">%1$s</xliff:g>]<xliff:g id="SUBJECT">%2$s</xliff:g>"</string>
<string name="subject_and_snippet" msgid="7884124651812798896">"<xliff:g id="ID_1">%s</xliff:g> - <xliff:g id="ID_2">%s</xliff:g>"</string>
+ <string name="badge_subject_and_snippet" msgid="1261901365444812399">"<xliff:g id="ID_1">%1$s</xliff:g> <xliff:g id="ID_2">%2$s</xliff:g> — <xliff:g id="ID_3">%3$s</xliff:g>"</string>
<plurals name="draft">
<item quantity="one" msgid="333591132893648383">"Bozza"</item>
<item quantity="other" msgid="6961049507579977505">"Bozze"</item>
diff --git a/res/values-iw/strings.xml b/res/values-iw/strings.xml
index d740a25..e76f6a1 100644
--- a/res/values-iw/strings.xml
+++ b/res/values-iw/strings.xml
@@ -140,6 +140,7 @@
<string name="unread_string" msgid="588180203444398297">"השיחה לא נקראה"</string>
<string name="filtered_tag" msgid="6470627954465675488">"[<xliff:g id="TAG">%1$s</xliff:g>]<xliff:g id="SUBJECT">%2$s</xliff:g>"</string>
<string name="subject_and_snippet" msgid="7884124651812798896">"<xliff:g id="ID_1">%s</xliff:g> — <xliff:g id="ID_2">%s</xliff:g>"</string>
+ <string name="badge_subject_and_snippet" msgid="1261901365444812399">"<xliff:g id="ID_1">%1$s</xliff:g> <xliff:g id="ID_2">%2$s</xliff:g> — <xliff:g id="ID_3">%3$s</xliff:g>"</string>
<plurals name="draft">
<item quantity="one" msgid="333591132893648383">"טיוטה"</item>
<item quantity="other" msgid="6961049507579977505">"טיוטות"</item>
diff --git a/res/values-ja/strings.xml b/res/values-ja/strings.xml
index d55a889..5d39f31 100644
--- a/res/values-ja/strings.xml
+++ b/res/values-ja/strings.xml
@@ -140,6 +140,7 @@
<string name="unread_string" msgid="588180203444398297">"未読のスレッド"</string>
<string name="filtered_tag" msgid="6470627954465675488">"[<xliff:g id="TAG">%1$s</xliff:g>]<xliff:g id="SUBJECT">%2$s</xliff:g>"</string>
<string name="subject_and_snippet" msgid="7884124651812798896">"<xliff:g id="ID_1">%s</xliff:g> — <xliff:g id="ID_2">%s</xliff:g>"</string>
+ <string name="badge_subject_and_snippet" msgid="1261901365444812399">"<xliff:g id="ID_1">%1$s</xliff:g><xliff:g id="ID_2">%2$s</xliff:g> - <xliff:g id="ID_3">%3$s</xliff:g>"</string>
<plurals name="draft">
<item quantity="one" msgid="333591132893648383">"下書き"</item>
<item quantity="other" msgid="6961049507579977505">"下書き"</item>
diff --git a/res/values-ka-rGE/strings.xml b/res/values-ka-rGE/strings.xml
index 957126c..8e2a1b2 100644
--- a/res/values-ka-rGE/strings.xml
+++ b/res/values-ka-rGE/strings.xml
@@ -140,6 +140,7 @@
<string name="unread_string" msgid="588180203444398297">"წასაკითხი მიმოწერა"</string>
<string name="filtered_tag" msgid="6470627954465675488">"[<xliff:g id="TAG">%1$s</xliff:g>]<xliff:g id="SUBJECT">%2$s</xliff:g>"</string>
<string name="subject_and_snippet" msgid="7884124651812798896">"<xliff:g id="ID_1">%s</xliff:g> — <xliff:g id="ID_2">%s</xliff:g>"</string>
+ <string name="badge_subject_and_snippet" msgid="1261901365444812399">"<xliff:g id="ID_1">%1$s</xliff:g> <xliff:g id="ID_2">%2$s</xliff:g> — <xliff:g id="ID_3">%3$s</xliff:g>"</string>
<plurals name="draft">
<item quantity="one" msgid="333591132893648383">"მონახაზი"</item>
<item quantity="other" msgid="6961049507579977505">"მონახაზები"</item>
diff --git a/res/values-km-rKH/strings.xml b/res/values-km-rKH/strings.xml
index d0cd47e..ead1857 100644
--- a/res/values-km-rKH/strings.xml
+++ b/res/values-km-rKH/strings.xml
@@ -140,6 +140,7 @@
<string name="unread_string" msgid="588180203444398297">"ការសន្ទនាមិនទាន់អាន"</string>
<string name="filtered_tag" msgid="6470627954465675488">"[<xliff:g id="TAG">%1$s</xliff:g>]<xliff:g id="SUBJECT">%2$s</xliff:g>"</string>
<string name="subject_and_snippet" msgid="7884124651812798896">"<xliff:g id="ID_1">%s</xliff:g> — <xliff:g id="ID_2">%s</xliff:g>"</string>
+ <string name="badge_subject_and_snippet" msgid="1261901365444812399">"<xliff:g id="ID_1">%1$s</xliff:g> <xliff:g id="ID_2">%2$s</xliff:g> — <xliff:g id="ID_3">%3$s</xliff:g>"</string>
<plurals name="draft">
<item quantity="one" msgid="333591132893648383">"សេចក្ដីព្រាង"</item>
<item quantity="other" msgid="6961049507579977505">"សេចក្ដីព្រាង"</item>
diff --git a/res/values-ko/strings.xml b/res/values-ko/strings.xml
index d47c8bc..c8ed3bf 100644
--- a/res/values-ko/strings.xml
+++ b/res/values-ko/strings.xml
@@ -140,6 +140,7 @@
<string name="unread_string" msgid="588180203444398297">"대화 읽지 않음"</string>
<string name="filtered_tag" msgid="6470627954465675488">"[<xliff:g id="TAG">%1$s</xliff:g>]<xliff:g id="SUBJECT">%2$s</xliff:g>"</string>
<string name="subject_and_snippet" msgid="7884124651812798896">"<xliff:g id="ID_1">%s</xliff:g> — <xliff:g id="ID_2">%s</xliff:g>"</string>
+ <string name="badge_subject_and_snippet" msgid="1261901365444812399">"<xliff:g id="ID_1">%1$s</xliff:g> <xliff:g id="ID_2">%2$s</xliff:g> — <xliff:g id="ID_3">%3$s</xliff:g>"</string>
<plurals name="draft">
<item quantity="one" msgid="333591132893648383">"임시보관"</item>
<item quantity="other" msgid="6961049507579977505">"임시보관함"</item>
diff --git a/res/values-ldrtl/styles-ldrtl.xml b/res/values-ldrtl/styles-ldrtl.xml
index 0f350b5..b6f9af5 100644
--- a/res/values-ldrtl/styles-ldrtl.xml
+++ b/res/values-ldrtl/styles-ldrtl.xml
@@ -246,6 +246,7 @@
</style>
<style name="FolderListIconStyle">
+ <item name="android:layout_marginStart">@dimen/folder_list_item_start_margin</item>
<item name="android:layout_alignParentStart">true</item>
</style>
@@ -262,6 +263,7 @@
</style>
<style name="RecipientComposeHeading" parent="@style/AbstractRecipientComposeHeading">
+ <item name="android:paddingStart">0dip</item>
<item name="android:layout_marginEnd">@dimen/compose_recipient_heading_margin_end</item>
</style>
@@ -324,9 +326,9 @@
<item name="android:layout_marginEnd">@dimen/ap_margin_side</item>
</style>
- <style name="ConversationListFrameStyle">
- <item name="android:layout_marginStart">@dimen/conv_list_frame_padding_start</item>
- <item name="android:layout_marginEnd">@dimen/conv_list_frame_padding_end</item>
+ <style name="ConversationListWideStyle">
+ <item name="android:layout_marginStart">@dimen/conv_list_wide_padding_start</item>
+ <item name="android:layout_marginEnd">@dimen/conv_list_wide_padding_end</item>
</style>
<style name="ConversationListWideContactImageStyle">
@@ -361,11 +363,9 @@
<item name="android:layout_gravity">top|end</item>
</style>
- <style name="ConversationListSpaciousLinearLayoutStyle">
- <item name="android:layout_marginStart">
- @dimen/conv_list_spacious_linearlayout_padding_start</item>
- <item name="android:layout_marginEnd">
- @dimen/conv_list_spacious_linearlayout_padding_end</item>
+ <style name="ConversationListSpaciousStyle">
+ <item name="android:layout_marginStart">@dimen/conv_list_spacious_padding_start</item>
+ <item name="android:layout_marginEnd">@dimen/conv_list_spacious_padding_end</item>
</style>
<style name="ConversationListSpaciousContactImageStyle">
@@ -378,4 +378,27 @@
</style>
<!-- END Conversation list styles -->
+ <style name="SpinnerAccountAddressStyle">
+ <item name="android:paddingStart">@dimen/custom_from_inner_padding</item>
+ </style>
+
+ <style name="AbstractComposeArea">
+ <item name="android:paddingStart">@dimen/compose_area_start_padding</item>
+ </style>
+
+ <style name="ComposeRowStyle">
+ <item name="android:paddingEnd">@dimen/compose_area_end_padding</item>
+ </style>
+
+ <style name="ComposeAttachmentTileTextEndStyle">
+ <item name="android:paddingEnd">@dimen/compose_attachment_tile_text_end_padding</item>
+ </style>
+
+ <style name="FolderTeaserMarginStartStyle" parent="FolderTeaserVerticalMarginStyle">
+ <item name="android:layout_marginStart">@dimen/folder_teaser_horizontal_padding</item>
+ </style>
+
+ <style name="FolderTeaserMarginEndStyle" parent="FolderTeaserVerticalMarginStyle">
+ <item name="android:layout_marginEnd">@dimen/folder_teaser_horizontal_padding</item>
+ </style>
</resources>
diff --git a/res/values-lo-rLA/strings.xml b/res/values-lo-rLA/strings.xml
index 358bb1a..e8c9340 100644
--- a/res/values-lo-rLA/strings.xml
+++ b/res/values-lo-rLA/strings.xml
@@ -140,6 +140,7 @@
<string name="unread_string" msgid="588180203444398297">"ການສົນທະນາທີ່ຍັງບໍ່ໄດ້ອ່ານ"</string>
<string name="filtered_tag" msgid="6470627954465675488">"[<xliff:g id="TAG">%1$s</xliff:g>]<xliff:g id="SUBJECT">%2$s</xliff:g>"</string>
<string name="subject_and_snippet" msgid="7884124651812798896">"<xliff:g id="ID_1">%s</xliff:g> — <xliff:g id="ID_2">%s</xliff:g>"</string>
+ <string name="badge_subject_and_snippet" msgid="1261901365444812399">"<xliff:g id="ID_1">%1$s</xliff:g> <xliff:g id="ID_2">%2$s</xliff:g> — <xliff:g id="ID_3">%3$s</xliff:g>"</string>
<plurals name="draft">
<item quantity="one" msgid="333591132893648383">"ສະບັບຮ່າງ"</item>
<item quantity="other" msgid="6961049507579977505">"ສະບັບຮ່າງ"</item>
diff --git a/res/values-lt/strings.xml b/res/values-lt/strings.xml
index 7a33305..65f2b31 100644
--- a/res/values-lt/strings.xml
+++ b/res/values-lt/strings.xml
@@ -140,6 +140,7 @@
<string name="unread_string" msgid="588180203444398297">"pokalbis neskaitytas"</string>
<string name="filtered_tag" msgid="6470627954465675488">"[<xliff:g id="TAG">%1$s</xliff:g>]<xliff:g id="SUBJECT">%2$s</xliff:g>"</string>
<string name="subject_and_snippet" msgid="7884124651812798896">"<xliff:g id="ID_1">%s</xliff:g>–<xliff:g id="ID_2">%s</xliff:g>"</string>
+ <string name="badge_subject_and_snippet" msgid="1261901365444812399">"<xliff:g id="ID_1">%1$s</xliff:g> <xliff:g id="ID_2">%2$s</xliff:g> – <xliff:g id="ID_3">%3$s</xliff:g>"</string>
<plurals name="draft">
<item quantity="one" msgid="333591132893648383">"Juodraštis"</item>
<item quantity="other" msgid="6961049507579977505">"Juodrašč."</item>
diff --git a/res/values-lv/strings.xml b/res/values-lv/strings.xml
index 6c9aebe..dd0313c 100644
--- a/res/values-lv/strings.xml
+++ b/res/values-lv/strings.xml
@@ -140,6 +140,7 @@
<string name="unread_string" msgid="588180203444398297">"saruna nav izlasīta"</string>
<string name="filtered_tag" msgid="6470627954465675488">"[<xliff:g id="TAG">%1$s</xliff:g>]<xliff:g id="SUBJECT">%2$s</xliff:g>"</string>
<string name="subject_and_snippet" msgid="7884124651812798896">"<xliff:g id="ID_1">%s</xliff:g> — <xliff:g id="ID_2">%s</xliff:g>"</string>
+ <string name="badge_subject_and_snippet" msgid="1261901365444812399">"<xliff:g id="ID_1">%1$s</xliff:g> <xliff:g id="ID_2">%2$s</xliff:g> — <xliff:g id="ID_3">%3$s</xliff:g>"</string>
<plurals name="draft">
<item quantity="one" msgid="333591132893648383">"Melnraksts"</item>
<item quantity="other" msgid="6961049507579977505">"Melnraksti"</item>
diff --git a/res/values-mn-rMN/strings.xml b/res/values-mn-rMN/strings.xml
index ad33bbf..b0557da 100644
--- a/res/values-mn-rMN/strings.xml
+++ b/res/values-mn-rMN/strings.xml
@@ -140,6 +140,7 @@
<string name="unread_string" msgid="588180203444398297">"харилцаа уншигдаагүй"</string>
<string name="filtered_tag" msgid="6470627954465675488">"[<xliff:g id="TAG">%1$s</xliff:g>]<xliff:g id="SUBJECT">%2$s</xliff:g>"</string>
<string name="subject_and_snippet" msgid="7884124651812798896">"<xliff:g id="ID_1">%s</xliff:g> — <xliff:g id="ID_2">%s</xliff:g>"</string>
+ <string name="badge_subject_and_snippet" msgid="1261901365444812399">"<xliff:g id="ID_1">%1$s</xliff:g> <xliff:g id="ID_2">%2$s</xliff:g> — <xliff:g id="ID_3">%3$s</xliff:g>"</string>
<plurals name="draft">
<item quantity="one" msgid="333591132893648383">"Ноорог"</item>
<item quantity="other" msgid="6961049507579977505">"Ноорог"</item>
diff --git a/res/values-ms-rMY/strings.xml b/res/values-ms-rMY/strings.xml
index e2a5ceb..7b07500 100644
--- a/res/values-ms-rMY/strings.xml
+++ b/res/values-ms-rMY/strings.xml
@@ -140,6 +140,7 @@
<string name="unread_string" msgid="588180203444398297">"perbualan belum dibaca"</string>
<string name="filtered_tag" msgid="6470627954465675488">"[<xliff:g id="TAG">%1$s</xliff:g>]<xliff:g id="SUBJECT">%2$s</xliff:g>"</string>
<string name="subject_and_snippet" msgid="7884124651812798896">"<xliff:g id="ID_1">%s</xliff:g> — <xliff:g id="ID_2">%s</xliff:g>"</string>
+ <string name="badge_subject_and_snippet" msgid="1261901365444812399">"<xliff:g id="ID_1">%1$s</xliff:g> <xliff:g id="ID_2">%2$s</xliff:g> — <xliff:g id="ID_3">%3$s</xliff:g>"</string>
<plurals name="draft">
<item quantity="one" msgid="333591132893648383">"Draf"</item>
<item quantity="other" msgid="6961049507579977505">"Draf"</item>
diff --git a/res/values-nb/strings.xml b/res/values-nb/strings.xml
index 617e084..b91f86a 100644
--- a/res/values-nb/strings.xml
+++ b/res/values-nb/strings.xml
@@ -140,6 +140,7 @@
<string name="unread_string" msgid="588180203444398297">"samtalen er ulest"</string>
<string name="filtered_tag" msgid="6470627954465675488">"[<xliff:g id="TAG">%1$s</xliff:g>]<xliff:g id="SUBJECT">%2$s</xliff:g>"</string>
<string name="subject_and_snippet" msgid="7884124651812798896">"<xliff:g id="ID_1">%s</xliff:g> – <xliff:g id="ID_2">%s</xliff:g>"</string>
+ <string name="badge_subject_and_snippet" msgid="1261901365444812399">"<xliff:g id="ID_1">%1$s</xliff:g> <xliff:g id="ID_2">%2$s</xliff:g> – <xliff:g id="ID_3">%3$s</xliff:g>"</string>
<plurals name="draft">
<item quantity="one" msgid="333591132893648383">"Utkast"</item>
<item quantity="other" msgid="6961049507579977505">"Utkast"</item>
diff --git a/res/values-nl/strings.xml b/res/values-nl/strings.xml
index 4e0d07f..99cfdc7 100644
--- a/res/values-nl/strings.xml
+++ b/res/values-nl/strings.xml
@@ -140,6 +140,7 @@
<string name="unread_string" msgid="588180203444398297">"conversatie ongelezen"</string>
<string name="filtered_tag" msgid="6470627954465675488">"[<xliff:g id="TAG">%1$s</xliff:g>]<xliff:g id="SUBJECT">%2$s</xliff:g>"</string>
<string name="subject_and_snippet" msgid="7884124651812798896">"<xliff:g id="ID_1">%s</xliff:g> — <xliff:g id="ID_2">%s</xliff:g>"</string>
+ <string name="badge_subject_and_snippet" msgid="1261901365444812399">"<xliff:g id="ID_1">%1$s</xliff:g> <xliff:g id="ID_2">%2$s</xliff:g> — <xliff:g id="ID_3">%3$s</xliff:g>"</string>
<plurals name="draft">
<item quantity="one" msgid="333591132893648383">"Concept"</item>
<item quantity="other" msgid="6961049507579977505">"Concepten"</item>
diff --git a/res/values-pl/strings.xml b/res/values-pl/strings.xml
index 1e43578..d362bae 100644
--- a/res/values-pl/strings.xml
+++ b/res/values-pl/strings.xml
@@ -140,6 +140,7 @@
<string name="unread_string" msgid="588180203444398297">"wątek nie został przeczytany"</string>
<string name="filtered_tag" msgid="6470627954465675488">"[<xliff:g id="TAG">%1$s</xliff:g>]<xliff:g id="SUBJECT">%2$s</xliff:g>"</string>
<string name="subject_and_snippet" msgid="7884124651812798896">"<xliff:g id="ID_1">%s</xliff:g> – <xliff:g id="ID_2">%s</xliff:g>"</string>
+ <string name="badge_subject_and_snippet" msgid="1261901365444812399">"<xliff:g id="ID_1">%1$s</xliff:g> <xliff:g id="ID_2">%2$s</xliff:g> – <xliff:g id="ID_3">%3$s</xliff:g>"</string>
<plurals name="draft">
<item quantity="one" msgid="333591132893648383">"Wersja robocza"</item>
<item quantity="other" msgid="6961049507579977505">"Wersje robocze"</item>
diff --git a/res/values-pt-rPT/strings.xml b/res/values-pt-rPT/strings.xml
index 88d8375..3e2e09f 100644
--- a/res/values-pt-rPT/strings.xml
+++ b/res/values-pt-rPT/strings.xml
@@ -140,6 +140,7 @@
<string name="unread_string" msgid="588180203444398297">"conversa não lida"</string>
<string name="filtered_tag" msgid="6470627954465675488">"[<xliff:g id="TAG">%1$s</xliff:g>]<xliff:g id="SUBJECT">%2$s</xliff:g>"</string>
<string name="subject_and_snippet" msgid="7884124651812798896">"<xliff:g id="ID_1">%s</xliff:g> — <xliff:g id="ID_2">%s</xliff:g>"</string>
+ <string name="badge_subject_and_snippet" msgid="1261901365444812399">"<xliff:g id="ID_1">%1$s</xliff:g> <xliff:g id="ID_2">%2$s</xliff:g> — <xliff:g id="ID_3">%3$s</xliff:g>"</string>
<plurals name="draft">
<item quantity="one" msgid="333591132893648383">"Rascunho"</item>
<item quantity="other" msgid="6961049507579977505">"Rascunhos"</item>
diff --git a/res/values-pt/strings.xml b/res/values-pt/strings.xml
index 04ca48e..b5f7552 100644
--- a/res/values-pt/strings.xml
+++ b/res/values-pt/strings.xml
@@ -140,6 +140,7 @@
<string name="unread_string" msgid="588180203444398297">"conversa não lida"</string>
<string name="filtered_tag" msgid="6470627954465675488">"[<xliff:g id="TAG">%1$s</xliff:g>]<xliff:g id="SUBJECT">%2$s</xliff:g>"</string>
<string name="subject_and_snippet" msgid="7884124651812798896">"<xliff:g id="ID_1">%s</xliff:g> — <xliff:g id="ID_2">%s</xliff:g>"</string>
+ <string name="badge_subject_and_snippet" msgid="1261901365444812399">"<xliff:g id="ID_1">%1$s</xliff:g> <xliff:g id="ID_2">%2$s</xliff:g> — <xliff:g id="ID_3">%3$s</xliff:g>"</string>
<plurals name="draft">
<item quantity="one" msgid="333591132893648383">"Rascunho"</item>
<item quantity="other" msgid="6961049507579977505">"Rascunhos"</item>
diff --git a/res/values-rm/strings.xml b/res/values-rm/strings.xml
index 1922546..1d83acd 100644
--- a/res/values-rm/strings.xml
+++ b/res/values-rm/strings.xml
@@ -247,6 +247,8 @@
<skip />
<!-- no translation found for subject_and_snippet (7884124651812798896) -->
<skip />
+ <!-- no translation found for badge_subject_and_snippet (1261901365444812399) -->
+ <skip />
<!-- no translation found for draft:one (333591132893648383) -->
<!-- no translation found for draft:other (6961049507579977505) -->
<!-- no translation found for sending (8214361929125649771) -->
diff --git a/res/values-ro/strings.xml b/res/values-ro/strings.xml
index 715cb58..2c93e38 100644
--- a/res/values-ro/strings.xml
+++ b/res/values-ro/strings.xml
@@ -140,6 +140,7 @@
<string name="unread_string" msgid="588180203444398297">"conversație necitită"</string>
<string name="filtered_tag" msgid="6470627954465675488">"[<xliff:g id="TAG">%1$s</xliff:g>] <xliff:g id="SUBJECT">%2$s</xliff:g>"</string>
<string name="subject_and_snippet" msgid="7884124651812798896">"<xliff:g id="ID_1">%s</xliff:g> – <xliff:g id="ID_2">%s</xliff:g>"</string>
+ <string name="badge_subject_and_snippet" msgid="1261901365444812399">"<xliff:g id="ID_1">%1$s</xliff:g> <xliff:g id="ID_2">%2$s</xliff:g> — <xliff:g id="ID_3">%3$s</xliff:g>"</string>
<plurals name="draft">
<item quantity="one" msgid="333591132893648383">"Mesaj nefinalizat"</item>
<item quantity="other" msgid="6961049507579977505">"Mesaje nefinalizate"</item>
diff --git a/res/values-ru/strings.xml b/res/values-ru/strings.xml
index a45ab14..8c991c4 100644
--- a/res/values-ru/strings.xml
+++ b/res/values-ru/strings.xml
@@ -140,6 +140,7 @@
<string name="unread_string" msgid="588180203444398297">"не прочитано"</string>
<string name="filtered_tag" msgid="6470627954465675488">"[<xliff:g id="TAG">%1$s</xliff:g>]<xliff:g id="SUBJECT">%2$s</xliff:g>"</string>
<string name="subject_and_snippet" msgid="7884124651812798896">"<xliff:g id="ID_1">%s</xliff:g> – <xliff:g id="ID_2">%s</xliff:g>"</string>
+ <string name="badge_subject_and_snippet" msgid="1261901365444812399">"<xliff:g id="ID_1">%1$s</xliff:g> <xliff:g id="ID_2">%2$s</xliff:g> – <xliff:g id="ID_3">%3$s</xliff:g>"</string>
<plurals name="draft">
<item quantity="one" msgid="333591132893648383">"Черновик"</item>
<item quantity="other" msgid="6961049507579977505">"Черновики"</item>
diff --git a/res/values-sk/strings.xml b/res/values-sk/strings.xml
index 8764004..53b8227 100644
--- a/res/values-sk/strings.xml
+++ b/res/values-sk/strings.xml
@@ -140,6 +140,7 @@
<string name="unread_string" msgid="588180203444398297">"konverzácia nebola prečítaná"</string>
<string name="filtered_tag" msgid="6470627954465675488">"[<xliff:g id="TAG">%1$s</xliff:g>]<xliff:g id="SUBJECT">%2$s</xliff:g>"</string>
<string name="subject_and_snippet" msgid="7884124651812798896">"<xliff:g id="ID_1">%s</xliff:g> — <xliff:g id="ID_2">%s</xliff:g>"</string>
+ <string name="badge_subject_and_snippet" msgid="1261901365444812399">"<xliff:g id="ID_1">%1$s</xliff:g> <xliff:g id="ID_2">%2$s</xliff:g> – <xliff:g id="ID_3">%3$s</xliff:g>"</string>
<plurals name="draft">
<item quantity="one" msgid="333591132893648383">"Koncept"</item>
<item quantity="other" msgid="6961049507579977505">"Koncepty"</item>
diff --git a/res/values-sl/strings.xml b/res/values-sl/strings.xml
index 8ccc326..1a0e0d6 100644
--- a/res/values-sl/strings.xml
+++ b/res/values-sl/strings.xml
@@ -140,6 +140,7 @@
<string name="unread_string" msgid="588180203444398297">"pogovor ni bil prebran"</string>
<string name="filtered_tag" msgid="6470627954465675488">"[<xliff:g id="TAG">%1$s</xliff:g>]<xliff:g id="SUBJECT">%2$s</xliff:g>"</string>
<string name="subject_and_snippet" msgid="7884124651812798896">"<xliff:g id="ID_1">%s</xliff:g> – <xliff:g id="ID_2">%s</xliff:g>"</string>
+ <string name="badge_subject_and_snippet" msgid="1261901365444812399">"<xliff:g id="ID_1">%1$s</xliff:g> <xliff:g id="ID_2">%2$s</xliff:g> – <xliff:g id="ID_3">%3$s</xliff:g>"</string>
<plurals name="draft">
<item quantity="one" msgid="333591132893648383">"Osnutek"</item>
<item quantity="other" msgid="6961049507579977505">"Osnutki"</item>
diff --git a/res/values-sr/strings.xml b/res/values-sr/strings.xml
index 260a2c0..92ab916 100644
--- a/res/values-sr/strings.xml
+++ b/res/values-sr/strings.xml
@@ -140,6 +140,7 @@
<string name="unread_string" msgid="588180203444398297">"преписка није прочитана"</string>
<string name="filtered_tag" msgid="6470627954465675488">"[<xliff:g id="TAG">%1$s</xliff:g>] <xliff:g id="SUBJECT">%2$s</xliff:g>"</string>
<string name="subject_and_snippet" msgid="7884124651812798896">"<xliff:g id="ID_1">%s</xliff:g> — <xliff:g id="ID_2">%s</xliff:g>"</string>
+ <string name="badge_subject_and_snippet" msgid="1261901365444812399">"<xliff:g id="ID_1">%1$s</xliff:g> <xliff:g id="ID_2">%2$s</xliff:g> – <xliff:g id="ID_3">%3$s</xliff:g>"</string>
<plurals name="draft">
<item quantity="one" msgid="333591132893648383">"Недовршена порука"</item>
<item quantity="other" msgid="6961049507579977505">"Недовршене поруке"</item>
diff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml
index f06c60f..1e03c0b 100644
--- a/res/values-sv/strings.xml
+++ b/res/values-sv/strings.xml
@@ -140,6 +140,7 @@
<string name="unread_string" msgid="588180203444398297">"konversationen är oläst"</string>
<string name="filtered_tag" msgid="6470627954465675488">"[<xliff:g id="TAG">%1$s</xliff:g>]<xliff:g id="SUBJECT">%2$s</xliff:g>"</string>
<string name="subject_and_snippet" msgid="7884124651812798896">"<xliff:g id="ID_1">%s</xliff:g> — <xliff:g id="ID_2">%s</xliff:g>"</string>
+ <string name="badge_subject_and_snippet" msgid="1261901365444812399">"<xliff:g id="ID_1">%1$s</xliff:g> <xliff:g id="ID_2">%2$s</xliff:g> – <xliff:g id="ID_3">%3$s</xliff:g>"</string>
<plurals name="draft">
<item quantity="one" msgid="333591132893648383">"Utkast"</item>
<item quantity="other" msgid="6961049507579977505">"Utkast"</item>
diff --git a/res/values-sw/strings.xml b/res/values-sw/strings.xml
index 2aef28b..8d1ff0a 100644
--- a/res/values-sw/strings.xml
+++ b/res/values-sw/strings.xml
@@ -140,6 +140,7 @@
<string name="unread_string" msgid="588180203444398297">"mazungumzo hayajasomwa"</string>
<string name="filtered_tag" msgid="6470627954465675488">"[<xliff:g id="TAG">%1$s</xliff:g>]<xliff:g id="SUBJECT">%2$s</xliff:g>"</string>
<string name="subject_and_snippet" msgid="7884124651812798896">"<xliff:g id="ID_1">%s</xliff:g> - <xliff:g id="ID_2">%s</xliff:g>"</string>
+ <string name="badge_subject_and_snippet" msgid="1261901365444812399">"<xliff:g id="ID_1">%1$s</xliff:g> <xliff:g id="ID_2">%2$s</xliff:g> — <xliff:g id="ID_3">%3$s</xliff:g>"</string>
<plurals name="draft">
<item quantity="one" msgid="333591132893648383">"Rasimu"</item>
<item quantity="other" msgid="6961049507579977505">"Rasimu"</item>
diff --git a/res/values-sw600dp-land/dimen.xml b/res/values-sw600dp-land/dimen.xml
index 6471b1c..6e4a066 100644
--- a/res/values-sw600dp-land/dimen.xml
+++ b/res/values-sw600dp-land/dimen.xml
@@ -17,8 +17,8 @@
-->
<resources>
<dimen name="compose_scrollview_width">800dip</dimen>
- <dimen name="compose_area_left_padding">100dip</dimen>
- <dimen name="compose_area_right_padding">100dip</dimen>
+ <dimen name="compose_area_start_padding">100dip</dimen>
+ <dimen name="compose_area_end_padding">100dip</dimen>
<dimen name="search_view_width">500dip</dimen>
<dimen name="spinner_frame_width">196dp</dimen>
</resources>
diff --git a/res/values-sw600dp-land/styles.xml b/res/values-sw600dp-land/styles.xml
index 14958c0..a3574db 100644
--- a/res/values-sw600dp-land/styles.xml
+++ b/res/values-sw600dp-land/styles.xml
@@ -16,7 +16,7 @@
limitations under the License.
-->
<resources>
- <style name="ComposeArea">
+ <style name="ComposeArea" parent="AbstractComposeArea">
<item name="android:layout_width">@dimen/compose_scrollview_width</item>
</style>
</resources>
diff --git a/res/values-sw600dp/dimen.xml b/res/values-sw600dp/dimen.xml
index 3e316bc..024e700 100644
--- a/res/values-sw600dp/dimen.xml
+++ b/res/values-sw600dp/dimen.xml
@@ -40,8 +40,8 @@
<dimen name="attachment_tile_max_size">254dp</dimen>
<dimen name="wait_padding">32dp</dimen>
- <dimen name="compose_area_left_padding">80dip</dimen>
- <dimen name="compose_area_right_padding">80dip</dimen>
+ <dimen name="compose_area_start_padding">80dip</dimen>
+ <dimen name="compose_area_end_padding">80dip</dimen>
<dimen name="search_view_width">400dip</dimen>
<dimen name="spinner_frame_width">170dp</dimen>
</resources>
diff --git a/res/values-sw600dp/styles.xml b/res/values-sw600dp/styles.xml
index 2ff5eb3..c0bc401 100644
--- a/res/values-sw600dp/styles.xml
+++ b/res/values-sw600dp/styles.xml
@@ -23,7 +23,7 @@
<item name="android:layout_width">@dimen/spinner_frame_width</item>
</style>
- <style name="ComposeArea">
+ <style name="ComposeArea" parent="AbstractComposeArea">
<item name="android:layout_width">match_parent</item>
</style>
diff --git a/res/values-sw800dp-land/dimen.xml b/res/values-sw800dp-land/dimen.xml
index 749da16..29544f9 100644
--- a/res/values-sw800dp-land/dimen.xml
+++ b/res/values-sw800dp-land/dimen.xml
@@ -18,6 +18,6 @@
<resources>
<!--Manta b/7382467-->
<dimen name="compose_scrollview_width">848dip</dimen>
- <dimen name="compose_area_left_padding">104dip</dimen>
- <dimen name="compose_area_right_padding">104dip</dimen>
+ <dimen name="compose_area_start_padding">104dip</dimen>
+ <dimen name="compose_area_end_padding">104dip</dimen>
</resources>
\ No newline at end of file
diff --git a/res/values-th/strings.xml b/res/values-th/strings.xml
index f01d376..d28de90 100644
--- a/res/values-th/strings.xml
+++ b/res/values-th/strings.xml
@@ -140,6 +140,7 @@
<string name="unread_string" msgid="588180203444398297">"ยังไม่ได้อ่านการสนทนา"</string>
<string name="filtered_tag" msgid="6470627954465675488">"[<xliff:g id="TAG">%1$s</xliff:g>]<xliff:g id="SUBJECT">%2$s</xliff:g>"</string>
<string name="subject_and_snippet" msgid="7884124651812798896">"<xliff:g id="ID_1">%s</xliff:g> — <xliff:g id="ID_2">%s</xliff:g>"</string>
+ <string name="badge_subject_and_snippet" msgid="1261901365444812399">"<xliff:g id="ID_1">%1$s</xliff:g> <xliff:g id="ID_2">%2$s</xliff:g> — <xliff:g id="ID_3">%3$s</xliff:g>"</string>
<plurals name="draft">
<item quantity="one" msgid="333591132893648383">"ร่างจดหมาย"</item>
<item quantity="other" msgid="6961049507579977505">"ร่างจดหมาย"</item>
diff --git a/res/values-tl/strings.xml b/res/values-tl/strings.xml
index 6d20b81..664e882 100644
--- a/res/values-tl/strings.xml
+++ b/res/values-tl/strings.xml
@@ -140,6 +140,7 @@
<string name="unread_string" msgid="588180203444398297">"hindi pa nababasang pag-uusap"</string>
<string name="filtered_tag" msgid="6470627954465675488">"[<xliff:g id="TAG">%1$s</xliff:g>]<xliff:g id="SUBJECT">%2$s</xliff:g>"</string>
<string name="subject_and_snippet" msgid="7884124651812798896">"<xliff:g id="ID_1">%s</xliff:g> — <xliff:g id="ID_2">%s</xliff:g>"</string>
+ <string name="badge_subject_and_snippet" msgid="1261901365444812399">"<xliff:g id="ID_1">%1$s</xliff:g> <xliff:g id="ID_2">%2$s</xliff:g> — <xliff:g id="ID_3">%3$s</xliff:g>"</string>
<plurals name="draft">
<item quantity="one" msgid="333591132893648383">"Draft"</item>
<item quantity="other" msgid="6961049507579977505">"Mga Draft"</item>
diff --git a/res/values-tr/strings.xml b/res/values-tr/strings.xml
index 71e901a..039a9ce 100644
--- a/res/values-tr/strings.xml
+++ b/res/values-tr/strings.xml
@@ -140,6 +140,7 @@
<string name="unread_string" msgid="588180203444398297">"ileti dizisi okunmadı"</string>
<string name="filtered_tag" msgid="6470627954465675488">"[<xliff:g id="TAG">%1$s</xliff:g>]<xliff:g id="SUBJECT">%2$s</xliff:g>"</string>
<string name="subject_and_snippet" msgid="7884124651812798896">"<xliff:g id="ID_1">%s</xliff:g> — <xliff:g id="ID_2">%s</xliff:g>"</string>
+ <string name="badge_subject_and_snippet" msgid="1261901365444812399">"<xliff:g id="ID_1">%1$s</xliff:g> <xliff:g id="ID_2">%2$s</xliff:g> — <xliff:g id="ID_3">%3$s</xliff:g>"</string>
<plurals name="draft">
<item quantity="one" msgid="333591132893648383">"Taslak"</item>
<item quantity="other" msgid="6961049507579977505">"Taslaklar"</item>
diff --git a/res/values-uk/strings.xml b/res/values-uk/strings.xml
index 179b954..7b49c4a 100644
--- a/res/values-uk/strings.xml
+++ b/res/values-uk/strings.xml
@@ -140,6 +140,7 @@
<string name="unread_string" msgid="588180203444398297">"бесіду не прочитано"</string>
<string name="filtered_tag" msgid="6470627954465675488">"[<xliff:g id="TAG">%1$s</xliff:g>]<xliff:g id="SUBJECT">%2$s</xliff:g>"</string>
<string name="subject_and_snippet" msgid="7884124651812798896">"<xliff:g id="ID_1">%s</xliff:g> – <xliff:g id="ID_2">%s</xliff:g>"</string>
+ <string name="badge_subject_and_snippet" msgid="1261901365444812399">"<xliff:g id="ID_1">%1$s</xliff:g> <xliff:g id="ID_2">%2$s</xliff:g> – <xliff:g id="ID_3">%3$s</xliff:g>"</string>
<plurals name="draft">
<item quantity="one" msgid="333591132893648383">"Чернетка"</item>
<item quantity="other" msgid="6961049507579977505">"Чернетки"</item>
diff --git a/res/values-v19/styles.xml b/res/values-v19/styles.xml
index f34a004..793a1d4 100644
--- a/res/values-v19/styles.xml
+++ b/res/values-v19/styles.xml
@@ -25,4 +25,22 @@
<style name="ToastButtonStyle">
<item name="android:background">@drawable/toast_button_background</item>
</style>
-</resources>
\ No newline at end of file
+
+ <style name="NewMessageButtonStyle" parent="AbstractNewMessageButtonStyle">
+ <item name="android:layout_marginStart">@dimen/toast_bar_margin</item>
+ <item name="android:layout_marginEnd">@dimen/toast_bar_margin</item>
+ <item name="android:fontFamily">sans-serif-condensed</item>
+ <item name="android:textSize">16sp</item>
+ </style>
+
+ <style name="ToastBarDescriptionTextStyle">
+ <item name="android:paddingStart">@dimen/toast_bar_description_text_padding_start</item>
+ <item name="android:fontFamily">sans-serif-condensed</item>
+ </style>
+
+ <style name="ToastBarActionTextStyle" parent="AbstractUndoTextStyle">
+ <item name="android:layout_marginStart">@dimen/toast_bar_action_margin</item>
+ <item name="android:paddingEnd">@dimen/toast_bar_undo_text_padding</item>
+ <item name="android:fontFamily">sans-serif-condensed</item>
+ </style>
+</resources>
diff --git a/res/values-vi/strings.xml b/res/values-vi/strings.xml
index 74075be..671a20e 100644
--- a/res/values-vi/strings.xml
+++ b/res/values-vi/strings.xml
@@ -140,6 +140,7 @@
<string name="unread_string" msgid="588180203444398297">"cuộc trò chuyện chưa đọc"</string>
<string name="filtered_tag" msgid="6470627954465675488">"[<xliff:g id="TAG">%1$s</xliff:g>]<xliff:g id="SUBJECT">%2$s</xliff:g>"</string>
<string name="subject_and_snippet" msgid="7884124651812798896">"<xliff:g id="ID_1">%s</xliff:g> — <xliff:g id="ID_2">%s</xliff:g>"</string>
+ <string name="badge_subject_and_snippet" msgid="1261901365444812399">"<xliff:g id="ID_1">%1$s</xliff:g> <xliff:g id="ID_2">%2$s</xliff:g> — <xliff:g id="ID_3">%3$s</xliff:g>"</string>
<plurals name="draft">
<item quantity="one" msgid="333591132893648383">"Bản nháp"</item>
<item quantity="other" msgid="6961049507579977505">"Bản nháp"</item>
diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml
index 88ad0fa..f5de4cf 100644
--- a/res/values-zh-rCN/strings.xml
+++ b/res/values-zh-rCN/strings.xml
@@ -140,6 +140,7 @@
<string name="unread_string" msgid="588180203444398297">"未读会话"</string>
<string name="filtered_tag" msgid="6470627954465675488">"[<xliff:g id="TAG">%1$s</xliff:g>] <xliff:g id="SUBJECT">%2$s</xliff:g>"</string>
<string name="subject_and_snippet" msgid="7884124651812798896">"<xliff:g id="ID_1">%s</xliff:g> - <xliff:g id="ID_2">%s</xliff:g>"</string>
+ <string name="badge_subject_and_snippet" msgid="1261901365444812399">"<xliff:g id="ID_1">%1$s</xliff:g> <xliff:g id="ID_2">%2$s</xliff:g> - <xliff:g id="ID_3">%3$s</xliff:g>"</string>
<plurals name="draft">
<item quantity="one" msgid="333591132893648383">"草稿"</item>
<item quantity="other" msgid="6961049507579977505">"草稿"</item>
diff --git a/res/values-zh-rHK/strings.xml b/res/values-zh-rHK/strings.xml
index 945ac3e..ea6f9e3 100644
--- a/res/values-zh-rHK/strings.xml
+++ b/res/values-zh-rHK/strings.xml
@@ -140,6 +140,7 @@
<string name="unread_string" msgid="588180203444398297">"未讀取對話群組"</string>
<string name="filtered_tag" msgid="6470627954465675488">"[<xliff:g id="TAG">%1$s</xliff:g>]<xliff:g id="SUBJECT">%2$s</xliff:g>"</string>
<string name="subject_and_snippet" msgid="7884124651812798896">"<xliff:g id="ID_1">%s</xliff:g> — <xliff:g id="ID_2">%s</xliff:g>"</string>
+ <string name="badge_subject_and_snippet" msgid="1261901365444812399">"<xliff:g id="ID_1">%1$s</xliff:g> <xliff:g id="ID_2">%2$s</xliff:g> — <xliff:g id="ID_3">%3$s</xliff:g>"</string>
<plurals name="draft">
<item quantity="one" msgid="333591132893648383">"草稿"</item>
<item quantity="other" msgid="6961049507579977505">"草稿"</item>
diff --git a/res/values-zh-rTW/strings.xml b/res/values-zh-rTW/strings.xml
index f39268e..2ae5ac4 100644
--- a/res/values-zh-rTW/strings.xml
+++ b/res/values-zh-rTW/strings.xml
@@ -140,6 +140,7 @@
<string name="unread_string" msgid="588180203444398297">"未閱讀的會話群組"</string>
<string name="filtered_tag" msgid="6470627954465675488">"[<xliff:g id="TAG">%1$s</xliff:g>]<xliff:g id="SUBJECT">%2$s</xliff:g>"</string>
<string name="subject_and_snippet" msgid="7884124651812798896">"<xliff:g id="ID_1">%s</xliff:g> — <xliff:g id="ID_2">%s</xliff:g>"</string>
+ <string name="badge_subject_and_snippet" msgid="1261901365444812399">"<xliff:g id="ID_1">%1$s</xliff:g> <xliff:g id="ID_2">%2$s</xliff:g> — <xliff:g id="ID_3">%3$s</xliff:g>"</string>
<plurals name="draft">
<item quantity="one" msgid="333591132893648383">"草稿"</item>
<item quantity="other" msgid="6961049507579977505">"草稿"</item>
diff --git a/res/values-zu/strings.xml b/res/values-zu/strings.xml
index 8b84292..a6c7385 100644
--- a/res/values-zu/strings.xml
+++ b/res/values-zu/strings.xml
@@ -140,6 +140,7 @@
<string name="unread_string" msgid="588180203444398297">"inkulumo engafundiwe"</string>
<string name="filtered_tag" msgid="6470627954465675488">"[<xliff:g id="TAG">%1$s</xliff:g>]<xliff:g id="SUBJECT">%2$s</xliff:g>"</string>
<string name="subject_and_snippet" msgid="7884124651812798896">"<xliff:g id="ID_1">%s</xliff:g> — <xliff:g id="ID_2">%s</xliff:g>"</string>
+ <string name="badge_subject_and_snippet" msgid="1261901365444812399">"<xliff:g id="ID_1">%1$s</xliff:g> <xliff:g id="ID_2">%2$s</xliff:g> — <xliff:g id="ID_3">%3$s</xliff:g>"</string>
<plurals name="draft">
<item quantity="one" msgid="333591132893648383">"Okusalungiswa"</item>
<item quantity="other" msgid="6961049507579977505">"Okusalungiswa"</item>
diff --git a/res/values/colors.xml b/res/values/colors.xml
index c095b6c..c44fd3a 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -130,4 +130,6 @@
<color name="swipe_refresh_color2">#ffdb4437</color>
<color name="swipe_refresh_color3">#ff4285f4</color>
<color name="swipe_refresh_color4">#fff4b400</color>
+
+ <color name="badge_background_color">#edb802</color>
</resources>
diff --git a/res/values/dimen.xml b/res/values/dimen.xml
index 801d003..b5c4d90 100644
--- a/res/values/dimen.xml
+++ b/res/values/dimen.xml
@@ -160,6 +160,9 @@
<dimen name="search_results_padding">8dip</dimen>
<!-- conversation list dimensions -->
+ <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_reply_state_padding_end">8dip</dimen>
<dimen name="conv_list_personal_indicator_padding_start">-2dip</dimen>
@@ -169,16 +172,27 @@
<dimen name="conv_list_paperclip_padding_start">6dip</dimen>
<dimen name="conv_list_star_padding_end">-9dip</dimen>
- <dimen name="conv_list_frame_padding_start">20dip</dimen>
- <dimen name="conv_list_frame_padding_end">32dip</dimen>
+ <dimen name="conv_list_wide_padding_start">20dip</dimen>
+ <dimen name="conv_list_wide_padding_end">32dip</dimen>
<dimen name="conv_list_wide_contact_image_padding_end">20dip</dimen>
<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_spacious_linearlayout_padding_start">22dip</dimen>
- <dimen name="conv_list_spacious_linearlayout_padding_end">16dip</dimen>
+ <dimen name="conv_list_spacious_padding_start">22dip</dimen>
+ <dimen name="conv_list_spacious_padding_end">16dip</dimen>
<dimen name="conv_list_spacious_contact_image_padding_end">16dip</dimen>
<dimen name="conv_list_spacious_star_padding_end">-8dip</dimen>
+ <dimen name="badge_padding_extra_width">6dip</dimen>
+ <dimen name="badge_rounded_corner_radius">2dip</dimen>
+
+ <dimen name="custom_from_inner_padding">6dip</dimen>
+
+ <dimen name="quoted_text_header_padding">8dip</dimen>
+
+ <dimen name="compose_attachment_tile_text_end_padding">4dip</dimen>
+
+ <dimen name="folder_teaser_vertical_padding">8dip</dimen>
+ <dimen name="folder_teaser_horizontal_padding">16dip</dimen>
</resources>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index c1b7f39..f7fc403 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -299,9 +299,10 @@
<!-- 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 Header View and Widget in the form of "subject - snippet"
- [CHAR LIMIT=5] -->
+ <!-- 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 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 89c3060..a4194fb 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -60,10 +60,10 @@
<style name="AbstractRecipientComposeHeading" parent="@style/ComposeHeading">
<item name="android:layout_marginTop">4dip</item>
- <item name="android:paddingLeft">0dip</item>
</style>
<style name="RecipientComposeHeading" parent="@style/AbstractRecipientComposeHeading">
+ <item name="android:paddingLeft">0dip</item>
<item name="android:layout_marginRight">@dimen/compose_recipient_heading_margin_end</item>
</style>
@@ -123,15 +123,11 @@
<item name="android:layout_height">wrap_content</item>
</style>
- <style name="QuotedTextHeaderStyle">
- <item name="android:textColor">@color/quoted_text_color</item>
- <item name="android:textSize">12sp</item>
- </style>
-
<style name="RespondInlineButtonStyle">
<item name="android:textColor">@color/quotedTextColor</item>
<item name="android:textStyle">bold</item>
<item name="android:textSize">12sp</item>
+ <item name="android:paddingLeft">16dip</item>
<item name="android:paddingRight">16dip</item>
<item name="android:gravity">center_vertical|right</item>
</style>
@@ -462,8 +458,8 @@
<item name="android:layout_height">48dip</item>
<item name="android:background">?android:attr/selectableItemBackground</item>
<item name="android:addStatesFromChildren">true</item>
- <item name="android:gravity">center|left</item>
- <item name="android:layout_gravity">center|left</item>
+ <item name="android:gravity">center|left|start</item>
+ <item name="android:layout_gravity">center|left|start</item>
</style>
<style name="FillRowStyle">
@@ -578,6 +574,7 @@
</style>
<style name="FolderListIconStyle">
+ <item name="android:layout_marginLeft">@dimen/folder_list_item_start_margin</item>
<item name="android:layout_alignParentLeft">true</item>
</style>
@@ -861,9 +858,9 @@
<item name="android:layout_marginRight">@dimen/ap_margin_side</item>
</style>
- <style name="ConversationListFrameStyle">
- <item name="android:layout_marginLeft">@dimen/conv_list_frame_padding_start</item>
- <item name="android:layout_marginRight">@dimen/conv_list_frame_padding_end</item>
+ <style name="ConversationListWideStyle">
+ <item name="android:layout_marginLeft">@dimen/conv_list_wide_padding_start</item>
+ <item name="android:layout_marginRight">@dimen/conv_list_wide_padding_end</item>
</style>
<style name="ConversationListWideContactImageStyle">
@@ -898,11 +895,9 @@
<item name="android:layout_gravity">top|right</item>
</style>
- <style name="ConversationListSpaciousLinearLayoutStyle">
- <item name="android:layout_marginLeft">
- @dimen/conv_list_spacious_linearlayout_padding_start</item>
- <item name="android:layout_marginRight">
- @dimen/conv_list_spacious_linearlayout_padding_end</item>
+ <style name="ConversationListSpaciousStyle">
+ <item name="android:layout_marginLeft">@dimen/conv_list_spacious_padding_start</item>
+ <item name="android:layout_marginRight">@dimen/conv_list_spacious_padding_end</item>
</style>
<style name="ConversationListSpaciousContactImageStyle">
@@ -915,4 +910,38 @@
</style>
<!-- END Conversation list styles -->
+ <style name="BadgeTextStyle">
+ <item name="android:textColor">@android:color/white</item>
+ <item name="android:textSize">12sp</item>
+ <item name="android:textStyle">bold</item>
+ </style>
+
+ <style name="SpinnerAccountAddressStyle">
+ <item name="android:paddingLeft">@dimen/custom_from_inner_padding</item>
+ </style>
+
+ <style name="AbstractComposeArea">
+ <item name="android:paddingLeft">@dimen/compose_area_start_padding</item>
+ </style>
+
+ <style name="ComposeRowStyle">
+ <item name="android:paddingRight">@dimen/compose_area_end_padding</item>
+ </style>
+
+ <style name="ComposeAttachmentTileTextEndStyle">
+ <item name="android:paddingRight">@dimen/compose_attachment_tile_text_end_padding</item>
+ </style>
+
+ <style name="FolderTeaserVerticalMarginStyle">
+ <item name="android:layout_marginTop">@dimen/folder_teaser_vertical_padding</item>
+ <item name="android:layout_marginBottom">@dimen/folder_teaser_vertical_padding</item>
+ </style>
+
+ <style name="FolderTeaserMarginStartStyle" parent="FolderTeaserVerticalMarginStyle">
+ <item name="android:layout_marginLeft">@dimen/folder_teaser_horizontal_padding</item>
+ </style>
+
+ <style name="FolderTeaserMarginEndStyle" parent="FolderTeaserVerticalMarginStyle">
+ <item name="android:layout_marginRight">@dimen/folder_teaser_horizontal_padding</item>
+ </style>
</resources>
diff --git a/src/com/android/mail/adapter/DrawerItem.java b/src/com/android/mail/adapter/DrawerItem.java
index bfb5c01..093bdd3 100644
--- a/src/com/android/mail/adapter/DrawerItem.java
+++ b/src/com/android/mail/adapter/DrawerItem.java
@@ -346,7 +346,7 @@
accountItemView =
(AccountItemView) mInflater.inflate(R.layout.account_item, parent, false);
}
- accountItemView.bind(mAccount, mIsSelected, mResource);
+ accountItemView.bind(mAccount, mIsSelected, mResource, mBidiFormatter);
View v = accountItemView.findViewById(R.id.account_graphic);
v.setBackgroundColor(mAccount.color);
return accountItemView;
@@ -364,8 +364,7 @@
if (convertView != null) {
headerView = (TextView) convertView;
} else {
- headerView = (TextView) mInflater.inflate(
- R.layout.folder_list_header, parent, false);
+ headerView = (TextView) mInflater.inflate(R.layout.folder_list_header, parent, false);
}
headerView.setText(mResource);
return headerView;
diff --git a/src/com/android/mail/browse/BadgeSpan.java b/src/com/android/mail/browse/BadgeSpan.java
new file mode 100644
index 0000000..e849f7d
--- /dev/null
+++ b/src/com/android/mail/browse/BadgeSpan.java
@@ -0,0 +1,107 @@
+/*
+ * Copyright (C) 2014 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.
+ */
+
+package com.android.mail.browse;
+
+import android.graphics.Canvas;
+import android.graphics.Paint;
+import android.graphics.Paint.FontMetricsInt;
+import android.graphics.RectF;
+import android.text.Spanned;
+import android.text.TextPaint;
+import android.text.style.CharacterStyle;
+import android.text.style.ReplacementSpan;
+
+/**
+ * A replacement span to use when displaying a badge in a conversation list item.
+ * A badge will be some piece of text with a colored background and rounded
+ * corners.
+ */
+public class BadgeSpan extends ReplacementSpan {
+
+ public interface BadgeSpanDimensions {
+ /**
+ * Returns the padding value that corresponds to one side of the
+ * horizontal padding surrounding the text inside the background color.
+ */
+ int getHorizontalPadding();
+
+ /**
+ * Returns the radius to use for the rounded corners on the background rect.
+ */
+ float getRoundedCornerRadius();
+ }
+
+ private TextPaint mWorkPaint = new TextPaint();
+ /**
+ * A reference to the enclosing Spanned object to collect other CharacterStyle spans and take
+ * them into account when drawing.
+ */
+ private final Spanned mSpanned;
+ private final BadgeSpanDimensions mDims;
+
+ public BadgeSpan(Spanned spanned, BadgeSpanDimensions dims) {
+ mSpanned = spanned;
+ mDims = dims;
+ }
+
+ @Override
+ public int getSize(Paint paint, CharSequence text, int start, int end, FontMetricsInt fm) {
+ if (fm != null) {
+ paint.getFontMetricsInt(fm);
+ // The magic set of measurements to vertically center text within a colored region!
+ fm.top = fm.ascent;
+ }
+ return measureWidth(paint, text, start, end);
+ }
+
+ private int measureWidth(Paint paint, CharSequence text, int start, int end) {
+ return (int) paint.measureText(text, start, end) + 2 * mDims.getHorizontalPadding();
+ }
+
+ @Override
+ public void draw(Canvas canvas, CharSequence text, int start, int end, float x, int top,
+ int y, int bottom, Paint paint) {
+
+ mWorkPaint.set(paint);
+
+ // take into account the foreground/background color spans when painting
+ final CharacterStyle[] otherSpans = mSpanned.getSpans(start, end, CharacterStyle.class);
+ for (CharacterStyle otherSpan : otherSpans) {
+ otherSpan.updateDrawState(mWorkPaint);
+ }
+
+ // paint a background if present
+ if (mWorkPaint.bgColor != 0) {
+ final int prevColor = mWorkPaint.getColor();
+ final Paint.Style prevStyle = mWorkPaint.getStyle();
+
+ mWorkPaint.setColor(mWorkPaint.bgColor);
+ mWorkPaint.setStyle(Paint.Style.FILL);
+
+ final int bgWidth = measureWidth(mWorkPaint, text, start, end);
+ final RectF rect = new RectF(x, top, x + bgWidth, bottom);
+ final float radius = mDims.getRoundedCornerRadius();
+ canvas.drawRoundRect(rect, radius, radius, mWorkPaint);
+
+ mWorkPaint.setColor(prevColor);
+ mWorkPaint.setStyle(prevStyle);
+ }
+
+ canvas.drawText(text, start, end, x + mDims.getHorizontalPadding(), y, mWorkPaint);
+ }
+}
diff --git a/src/com/android/mail/browse/ConversationContainer.java b/src/com/android/mail/browse/ConversationContainer.java
index e78c328..0fa9d03 100644
--- a/src/com/android/mail/browse/ConversationContainer.java
+++ b/src/com/android/mail/browse/ConversationContainer.java
@@ -20,6 +20,7 @@
import android.content.Context;
import android.content.res.Configuration;
import android.database.DataSetObserver;
+import android.support.v4.view.ViewCompat;
import android.util.AttributeSet;
import android.util.SparseArray;
import android.view.Gravity;
@@ -782,6 +783,7 @@
// show and/or move overlay
if (overlayView == null) {
overlayView = addOverlayView(adapterIndex, postAddView);
+ ViewCompat.setLayoutDirection(overlayView, ViewCompat.getLayoutDirection(this));
measureOverlayView(overlayView);
item.markMeasurementValid();
traceLayout("show/measure overlay %d", adapterIndex);
diff --git a/src/com/android/mail/browse/ConversationItemView.java b/src/com/android/mail/browse/ConversationItemView.java
index 2de6b15..7c8c8da 100644
--- a/src/com/android/mail/browse/ConversationItemView.java
+++ b/src/com/android/mail/browse/ConversationItemView.java
@@ -35,6 +35,8 @@
import android.graphics.Shader;
import android.graphics.Typeface;
import android.graphics.drawable.Drawable;
+import android.graphics.drawable.InsetDrawable;
+import android.support.v4.text.BidiFormatter;
import android.support.v4.view.ViewCompat;
import android.text.Layout.Alignment;
import android.text.Spannable;
@@ -45,6 +47,7 @@
import android.text.TextUtils;
import android.text.TextUtils.TruncateAt;
import android.text.format.DateUtils;
+import android.text.style.BackgroundColorSpan;
import android.text.style.CharacterStyle;
import android.text.style.ForegroundColorSpan;
import android.text.style.TextAppearanceSpan;
@@ -61,8 +64,6 @@
import android.widget.TextView;
import com.android.mail.R;
-import com.android.mail.R.drawable;
-import com.android.mail.R.integer;
import com.android.mail.analytics.Analytics;
import com.android.mail.bitmap.AttachmentDrawable;
import com.android.mail.bitmap.AttachmentGridDrawable;
@@ -100,7 +101,7 @@
public class ConversationItemView extends View
implements SwipeableItemView, ToggleableItem, InvalidateCallback, OnScrollListener,
- ConversationSetObserver {
+ ConversationSetObserver, BadgeSpan.BadgeSpanDimensions {
// Timer.
private static int sLayoutCount = 0;
@@ -143,8 +144,9 @@
private static int sSenderImageTouchSlop;
private static int sShrinkAnimationDuration;
private static int sSlideAnimationDuration;
- private static int sOverflowCountMax;
private static int sCabAnimationDuration;
+ private static int sBadgePaddingExtraWidth;
+ private static int sBadgeRoundedCornerRadius;
// Static paints.
private static final TextPaint sPaint = new TextPaint();
@@ -195,6 +197,7 @@
private ControllableActivity mActivity;
private final TextView mSubjectTextView;
private final TextView mSendersTextView;
+ private final TextView mBadgeTextView;
private int mGadgetMode;
private boolean mAttachmentPreviewsEnabled;
private boolean mParallaxSpeedAlternative;
@@ -203,6 +206,8 @@
private static int sFoldersStartPadding;
private static TextAppearanceSpan sSubjectTextUnreadSpan;
private static TextAppearanceSpan sSubjectTextReadSpan;
+ private static TextAppearanceSpan sBadgeTextSpan;
+ private static BackgroundColorSpan sBadgeBackgroundSpan;
private static ForegroundColorSpan sSnippetTextUnreadSpan;
private static ForegroundColorSpan sSnippetTextReadSpan;
private static int sScrollSlop;
@@ -354,8 +359,9 @@
if (labelTooLong) {
// todo - take RTL into account for fade
final int rightBorder = xLeft + width - sFoldersStartPadding - padding;
- final Shader shader = new LinearGradient(rightBorder - padding, y, rightBorder, y,
- fgColor, Utils.getTransparentColor(fgColor), Shader.TileMode.CLAMP);
+ final Shader shader = new LinearGradient(rightBorder - padding, y,
+ rightBorder, y, fgColor, Utils.getTransparentColor(fgColor),
+ Shader.TileMode.CLAMP);
sFoldersPaint.setShader(shader);
}
canvas.drawText(folderString, xLeft + padding, y + height - textBottomPadding,
@@ -407,8 +413,8 @@
BitmapFactory.decodeResource(res, R.drawable.ic_badge_invite_holo_light);
VISIBLE_CONVERSATION_CARET = BitmapFactory.decodeResource(res, R.drawable.caret_grey);
RIGHT_EDGE_TABLET = res.getDrawable(R.drawable.list_edge_tablet);
- PLACEHOLDER = res.getDrawable(drawable.ic_attachment_load);
- PROGRESS_BAR = res.getDrawable(drawable.progress_holo);
+ PLACEHOLDER = res.getDrawable(R.drawable.ic_attachment_load);
+ PROGRESS_BAR = res.getDrawable(R.drawable.progress_holo);
// Initialize colors.
sActivatedTextSpan = CharacterStyle.wrap(new ForegroundColorSpan(
@@ -417,8 +423,11 @@
sSendersTextColorUnread = res.getColor(R.color.senders_text_color_unread);
sSubjectTextUnreadSpan = new TextAppearanceSpan(mContext,
R.style.SubjectAppearanceUnreadStyle);
- sSubjectTextReadSpan = new TextAppearanceSpan(mContext,
- R.style.SubjectAppearanceReadStyle);
+ sBadgeTextSpan = new TextAppearanceSpan(mContext, R.style.BadgeTextStyle);
+ sBadgeBackgroundSpan = new BackgroundColorSpan(
+ res.getColor(R.color.badge_background_color));
+ sSubjectTextReadSpan = new TextAppearanceSpan(
+ mContext, R.style.SubjectAppearanceReadStyle);
sSnippetTextUnreadSpan =
new ForegroundColorSpan(res.getColor(R.color.snippet_text_color_unread));
sSnippetTextReadSpan =
@@ -433,8 +442,10 @@
sElidedPaddingToken = res.getString(R.string.elided_padding_token);
sScrollSlop = res.getInteger(R.integer.swipeScrollSlop);
sFoldersStartPadding = res.getDimensionPixelOffset(R.dimen.folders_start_padding);
- sOverflowCountMax = res.getInteger(integer.ap_overflow_max_count);
sCabAnimationDuration = res.getInteger(R.integer.conv_item_view_cab_anim_duration);
+ sBadgePaddingExtraWidth = res.getDimensionPixelSize(R.dimen.badge_padding_extra_width);
+ sBadgeRoundedCornerRadius =
+ res.getDimensionPixelSize(R.dimen.badge_rounded_corner_radius);
}
mSendersTextView = new TextView(mContext);
@@ -444,6 +455,9 @@
mSubjectTextView.setEllipsize(TextUtils.TruncateAt.END);
mSubjectTextView.setIncludeFontPadding(false);
+ mBadgeTextView = new TextView(mContext);
+ mBadgeTextView.setIncludeFontPadding(false);
+
mAttachmentsView = new AttachmentGridDrawable(res, PLACEHOLDER, PROGRESS_BAR);
mAttachmentsView.setCallback(this);
@@ -464,7 +478,8 @@
null /* conversationItemAreaClickListener */,
set, folder, checkboxOrSenderImage, showAttachmentPreviews,
parallaxSpeedAlternative, parallaxDirectionAlternative, swipeEnabled,
- priorityArrowEnabled, adapter, -1 /* backgroundOverrideResId */, null /* photoBitmap */);
+ priorityArrowEnabled, adapter, -1 /* backgroundOverrideResId */,
+ null /* photoBitmap */, false /* useFullMargins */);
Utils.traceEndSection();
}
@@ -478,7 +493,7 @@
folder, checkboxOrSenderImage, false /* attachment previews */,
false /* parallax */, false /* parallax */, true /* swipeEnabled */,
false /* priorityArrowEnabled */,
- adapter, backgroundOverrideResId, photoBitmap);
+ adapter, backgroundOverrideResId, photoBitmap, true /* useFullMargins */);
Utils.traceEndSection();
}
@@ -488,7 +503,8 @@
final int checkboxOrSenderImage, final boolean showAttachmentPreviews,
final boolean parallaxSpeedAlternative, final boolean parallaxDirectionAlternative,
boolean swipeEnabled, final boolean priorityArrowEnabled, final AnimatedAdapter adapter,
- final int backgroundOverrideResId, final Bitmap photoBitmap) {
+ final int backgroundOverrideResId, final Bitmap photoBitmap,
+ final boolean useFullMargins) {
mBackgroundOverrideResId = backgroundOverrideResId;
mPhotoBitmap = photoBitmap;
mConversationItemAreaClickListener = conversationItemAreaClickListener;
@@ -580,19 +596,20 @@
mDisplayedFolder.folderUri, ignoreFolderType);
Utils.traceEndSection();
- if (mHeader.dateOverrideText == null) {
+ if (mHeader.showDateText) {
Utils.traceBeginSection("relative time");
mHeader.dateText = DateUtils.getRelativeTimeSpanString(mContext,
mHeader.conversation.dateMs);
Utils.traceEndSection();
} else {
- mHeader.dateText = mHeader.dateOverrideText;
+ mHeader.dateText = "";
}
Utils.traceBeginSection("config setup");
mConfig = new ConversationItemViewCoordinates.Config()
.withGadget(mGadgetMode)
- .withAttachmentPreviews(getAttachmentPreviewsMode());
+ .withAttachmentPreviews(getAttachmentPreviewsMode())
+ .setUseFullMargins(useFullMargins);
if (header.folderDisplayer.hasVisibleFolders()) {
mConfig.showFolders();
}
@@ -736,6 +753,8 @@
Utils.traceBeginSection("subject");
createSubject(mHeader.unread);
+ createBadge();
+
if (!mHeader.isLayoutValid()) {
setContentDescription();
}
@@ -764,6 +783,10 @@
Drawable drawable = mBackgrounds.get(resourceId);
if (drawable == null) {
drawable = getResources().getDrawable(resourceId);
+ final int insetPadding = mHeader.insetPadding;
+ if (insetPadding > 0) {
+ drawable = new InsetDrawable(drawable, insetPadding);
+ }
mBackgrounds.put(resourceId, drawable);
}
if (getBackground() != drawable) {
@@ -781,8 +804,7 @@
setSelected(mSelected);
mHeader.gadgetMode = mGadgetMode;
- final boolean isUnread = mHeader.unread;
- updateBackground(isUnread);
+ updateBackground();
mHeader.sendersDisplayText = new SpannableStringBuilder();
mHeader.styledSendersString = null;
@@ -1013,18 +1035,28 @@
}
private void createSubject(final boolean isUnread) {
- final String subject = filterTag(mHeader.conversation.subject);
- final String snippet = mHeader.conversation.getSnippet();
+ // Need to check if we're in wide mode because the badge
+ // does not get added if we're in wide mode.
+ final BidiFormatter bidiFormatter = mAdapter.getBidiFormatter();
+ final String badgeText = mCoordinates.isWideMode() || mHeader.badgeText == null ? "" :
+ bidiFormatter.unicodeWrap(mHeader.badgeText);
+ final String subject = bidiFormatter.unicodeWrap(filterTag(mHeader.conversation.subject));
+ final String snippet = bidiFormatter.unicodeWrap(mHeader.conversation.getSnippet());
final Spannable displayedStringBuilder = new SpannableString(
- Conversation.getSubjectAndSnippetForDisplay(mContext, subject, snippet));
+ Conversation.getSubjectAndSnippetForDisplay(
+ mContext, badgeText, subject, snippet));
// since spans affect text metrics, add spans to the string before measure/layout or fancy
// ellipsizing
- final int subjectTextLength = (subject != null) ? subject.length() : 0;
+
+ final int badgeTextLength = formatBadgeText(displayedStringBuilder, badgeText);
+
+ final int subjectTextLength = badgeTextLength + ((subject != null) ? subject.length() : 0)
+ + ((badgeTextLength > 0) ? 1 : 0);
if (!TextUtils.isEmpty(subject)) {
displayedStringBuilder.setSpan(TextAppearanceSpan.wrap(
- isUnread ? sSubjectTextUnreadSpan : sSubjectTextReadSpan), 0, subjectTextLength,
- Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
+ isUnread ? sSubjectTextUnreadSpan : sSubjectTextReadSpan),
+ badgeTextLength, subjectTextLength, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
}
if (!TextUtils.isEmpty(snippet)) {
final int startOffset = subjectTextLength;
@@ -1035,8 +1067,8 @@
displayedStringBuilder.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
}
if (isActivated() && showActivatedText()) {
- displayedStringBuilder.setSpan(sActivatedTextSpan, 0, displayedStringBuilder.length(),
- Spannable.SPAN_INCLUSIVE_INCLUSIVE);
+ displayedStringBuilder.setSpan(sActivatedTextSpan, badgeTextLength,
+ displayedStringBuilder.length(), Spannable.SPAN_INCLUSIVE_INCLUSIVE);
}
final int subjectWidth = mCoordinates.subjectWidth;
@@ -1049,6 +1081,53 @@
mSubjectTextView.setText(displayedStringBuilder);
}
+ private void createBadge() {
+ // Do not create badge if in wide mode or badge text is empty.
+ final String badgeText = mHeader.badgeText;
+ if (!mCoordinates.isWideMode() || TextUtils.isEmpty(badgeText)) {
+ return;
+ }
+
+ final Spannable displayedBadgeString = new SpannableString(badgeText);
+ formatBadgeText(displayedBadgeString, badgeText);
+
+ final int badgeWidth = mCoordinates.badgeWidth;
+ final int badgeHeight = mCoordinates.badgeHeight;
+ mBadgeTextView.setLayoutParams(new ViewGroup.LayoutParams(badgeWidth, badgeHeight));
+ mBadgeTextView.setMaxLines(mCoordinates.badgeLineCount);
+ layoutViewExactly(mBadgeTextView, badgeWidth, badgeHeight);
+
+ mBadgeTextView.setText(displayedBadgeString);
+ }
+
+ private int formatBadgeText(Spannable displayedStringBuilder, String badgeText) {
+ final int badgeTextLength = (badgeText != null) ? badgeText.length() : 0;
+ if (!TextUtils.isEmpty(badgeText)) {
+ displayedStringBuilder.setSpan(TextAppearanceSpan.wrap(sBadgeTextSpan),
+ 0, badgeTextLength, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
+ displayedStringBuilder.setSpan(TextAppearanceSpan.wrap(sBadgeBackgroundSpan),
+ 0, badgeTextLength, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
+ displayedStringBuilder.setSpan(new BadgeSpan(displayedStringBuilder, this),
+ 0, badgeTextLength, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
+ }
+
+ return badgeTextLength;
+ }
+
+ // START BadgeSpan.BadgeSpanDimensions override
+
+ @Override
+ public int getHorizontalPadding() {
+ return sBadgePaddingExtraWidth;
+ }
+
+ @Override
+ public float getRoundedCornerRadius() {
+ return sBadgeRoundedCornerRadius;
+ }
+
+ // END BadgeSpan.BadgeSpanDimensions override
+
private boolean showActivatedText() {
// For activated elements in tablet in conversation mode, we show an activated color, since
// the background is dark blue for activated versus gray for non-activated.
@@ -1098,7 +1177,7 @@
mPaperclipX = (isRtl) ? mDateX + mDateWidth + mCoordinates.datePaddingStart :
mDateX - ATTACHMENT.getWidth() - mCoordinates.datePaddingStart;
- if (mCoordinates.isWide()) {
+ if (mCoordinates.isWideMode()) {
// In wide mode, the end of the senders should align with
// the start of the subject and is based on a max width.
mSendersWidth = mCoordinates.sendersWidth;
@@ -1317,6 +1396,12 @@
drawSubject(canvas);
canvas.restore();
+ if (mCoordinates.isWideMode()) {
+ canvas.save();
+ drawBadge(canvas);
+ canvas.restore();
+ }
+
// Folders.
if (mConfig.areFoldersVisible()) {
mHeader.folderDisplayer.drawFolders(canvas, mCoordinates, ViewUtils.isViewRtl(this));
@@ -1450,6 +1535,11 @@
mSubjectTextView.draw(canvas);
}
+ private void drawBadge(Canvas canvas) {
+ canvas.translate(mCoordinates.badgeLeft, mCoordinates.badgeTop);
+ mBadgeTextView.draw(canvas);
+ }
+
private void drawSenders(Canvas canvas) {
canvas.translate(mSendersX, mCoordinates.sendersY);
mSendersTextView.draw(canvas);
@@ -1469,13 +1559,12 @@
* 2. Tablet / Phone
* 3. Checkbox checked / Unchecked (controls CAB color for item)
* 4. Activated / Not activated (controls the blue highlight on tablet)
- * @param isUnread
*/
- private void updateBackground(boolean isUnread) {
+ private void updateBackground() {
final int background;
if (mBackgroundOverrideResId > 0) {
background = mBackgroundOverrideResId;
- } else if (isUnread) {
+ } else if (mHeader.unread) {
background = R.drawable.conversation_unread_selector;
} else {
background = R.drawable.conversation_read_selector;
@@ -1605,7 +1694,7 @@
}
if (mStarEnabled) {
- if (mCoordinates.getMode() == ConversationItemViewCoordinates.WIDE_MODE) {
+ if (mCoordinates.isWideMode()) {
// Just check that we're to start of the star's touch area
if (isTouchInStarTargetX(isRtl, x)) {
return false;
@@ -1628,7 +1717,7 @@
private boolean isTouchInStar(float x, float y) {
if (mHeader.infoIcon != null
- && mCoordinates.getMode() != ConversationItemViewCoordinates.WIDE_MODE) {
+ && !mCoordinates.isWideMode()) {
// We have an info icon, and it's above the star
// We allow touches everywhere below the top of the subject text
if (y < mCoordinates.subjectY) {
diff --git a/src/com/android/mail/browse/ConversationItemViewCoordinates.java b/src/com/android/mail/browse/ConversationItemViewCoordinates.java
index 209cd16..a35539a 100644
--- a/src/com/android/mail/browse/ConversationItemViewCoordinates.java
+++ b/src/com/android/mail/browse/ConversationItemViewCoordinates.java
@@ -17,6 +17,7 @@
package com.android.mail.browse;
+import android.annotation.SuppressLint;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.Paint.FontMetricsInt;
@@ -32,8 +33,6 @@
import android.widget.TextView;
import com.android.mail.R;
-import com.android.mail.R.dimen;
-import com.android.mail.R.id;
import com.android.mail.ui.ViewMode;
import com.android.mail.utils.Utils;
import com.android.mail.utils.ViewUtils;
@@ -83,6 +82,7 @@
private boolean mShowReplyState = false;
private boolean mShowColorBlock = false;
private boolean mShowPersonalIndicator = false;
+ private boolean mUseFullMargins = false;
public Config setViewMode(int viewMode) {
mViewMode = viewMode;
@@ -159,7 +159,8 @@
private int getCacheKey() {
// hash the attributes that contribute to item height and child view geometry
return Objects.hashCode(mWidth, mViewMode, mGadgetMode, mAttachmentPreviewMode,
- mShowFolders, mShowReplyState, mShowPersonalIndicator);
+ mShowFolders, mShowReplyState, mShowPersonalIndicator, mLayoutDirection,
+ mUseFullMargins);
}
public Config setLayoutDirection(int layoutDirection) {
@@ -170,6 +171,15 @@
public int getLayoutDirection() {
return mLayoutDirection;
}
+
+ public Config setUseFullMargins(boolean useFullMargins) {
+ mUseFullMargins = useFullMargins;
+ return this;
+ }
+
+ public boolean useFullPadding() {
+ return mUseFullMargins;
+ }
}
public static class CoordinatesCache {
@@ -212,9 +222,15 @@
final int sendersWidth;
final int sendersHeight;
final int sendersLineCount;
- final int sendersLineHeight;
final float sendersFontSize;
+ // Badge. optional.
+ final int badgeLeft;
+ final int badgeTop;
+ final int badgeWidth;
+ final int badgeHeight;
+ final int badgeLineCount;
+
// Subject.
final int subjectX;
final int subjectY;
@@ -316,7 +332,7 @@
mMode = calculateMode(res, config);
final int layoutId;
- if (mMode == WIDE_MODE) {
+ if (isWideMode()) {
layoutId = R.layout.conversation_item_view_wide;
} else {
if (config.getWidth() >= mMinListWidthIsSpacious) {
@@ -379,6 +395,8 @@
personalIndicator.setVisibility(
config.isPersonalIndicatorVisible() ? View.VISIBLE : View.GONE);
+ setFramePadding(context, view, config.useFullPadding());
+
// Layout the appropriate view.
ViewCompat.setLayoutDirection(view, config.getLayoutDirection());
final int widthSpec = MeasureSpec.makeMeasureSpec(config.getWidth(), MeasureSpec.EXACTLY);
@@ -413,13 +431,23 @@
sendersWidth = senders.getWidth();
sendersHeight = senders.getHeight();
sendersLineCount = getLineCount(senders);
- sendersLineHeight = senders.getLineHeight();
sendersFontSize = senders.getTextSize();
+ final TextView badge = (TextView) view.findViewById(R.id.badge);
+ if (badge != null) {
+ badgeLeft = getX(badge);
+ badgeTop = getY(badge);
+ badgeWidth = senders.getWidth();
+ badgeHeight = senders.getHeight();
+ badgeLineCount = getLineCount(senders);
+ } else {
+ badgeLeft = badgeTop = badgeWidth = badgeHeight = badgeLineCount = 0;
+ }
+
final TextView subject = (TextView) view.findViewById(R.id.subject);
final int subjectTopAdjust = getLatinTopAdjustment(subject);
subjectX = getX(subject);
- if (isWide()) {
+ if (isWideMode()) {
subjectY = getY(subject) + subjectTopAdjust;
} else {
subjectY = getY(subject) + sendersTopAdjust;
@@ -434,7 +462,7 @@
final boolean isRtl = ViewUtils.isViewRtl(view);
foldersLeft = (isRtl) ? 0 : subjectX;
foldersRight = (isRtl) ? subjectX + subjectWidth : getX(folders) + folders.getWidth();
- if (isWide()) {
+ if (isWideMode()) {
foldersY = getY(folders);
} else {
foldersY = getY(folders) + sendersTopAdjust;
@@ -502,7 +530,7 @@
attachmentPreviewsHeight = attachmentPreviews.getHeight();
// We only care about the right and bottom of the overflow count
- final TextView overflow = (TextView) view.findViewById(id.ap_overflow);
+ final TextView overflow = (TextView) view.findViewById(R.id.ap_overflow);
final FrameLayout.LayoutParams params = (FrameLayout.LayoutParams) overflow
.getLayoutParams();
overflowXEnd = attachmentPreviewsX + attachmentPreviewsWidth - params.rightMargin;
@@ -511,13 +539,13 @@
overflowFontSize = overflow.getTextSize();
overflowTypeface = overflow.getTypeface();
- final View placeholder = view.findViewById(id.ap_placeholder);
+ final View placeholder = view.findViewById(R.id.ap_placeholder);
placeholderWidth = placeholder.getWidth();
placeholderHeight = placeholder.getHeight();
placeholderY = attachmentPreviewsY + attachmentPreviewsHeight / 2
- placeholderHeight / 2;
- final View progressBar = view.findViewById(id.ap_progress_bar);
+ final View progressBar = view.findViewById(R.id.ap_progress_bar);
progressBarWidth = progressBar.getWidth();
progressBarHeight = progressBar.getHeight();
progressBarY = attachmentPreviewsY + attachmentPreviewsHeight / 2
@@ -540,15 +568,31 @@
progressBarHeight = 0;
}
- height = view.getHeight() + (isWide() ? 0 : sendersTopAdjust);
+ height = view.getHeight() + (isWideMode() ? 0 : sendersTopAdjust);
Utils.traceEndSection();
}
+ @SuppressLint("NewApi")
+ private static void setFramePadding(Context context, ViewGroup view, boolean useFullPadding) {
+ final Resources res = context.getResources();
+ final int padding = res.getDimensionPixelSize(useFullPadding ?
+ R.dimen.conv_list_card_border_padding : R.dimen.conv_list_no_border_padding);
+
+ final View frame = view.findViewById(R.id.conversation_item_frame);
+ if (Utils.isRunningJBMR1OrLater()) {
+ // start, top, end, bottom
+ frame.setPaddingRelative(frame.getPaddingStart(), padding,
+ frame.getPaddingEnd(), padding);
+ } else {
+ frame.setPadding(frame.getPaddingLeft(), padding, frame.getPaddingRight(), padding);
+ }
+ }
+
public int getMode() {
return mMode;
}
- public boolean isWide() {
+ public boolean isWideMode() {
return mMode == WIDE_MODE;
}
@@ -587,10 +631,11 @@
final Resources res = context.getResources();
switch (attachmentPreviewMode) {
case ATTACHMENT_PREVIEW_UNREAD:
- return (int) (isWide() ? res.getDimension(dimen.attachment_preview_height_tall_wide)
- : res.getDimension(dimen.attachment_preview_height_tall));
+ return (int) (isWideMode()
+ ? res.getDimension(R.dimen.attachment_preview_height_tall_wide)
+ : res.getDimension(R.dimen.attachment_preview_height_tall));
case ATTACHMENT_PREVIEW_READ:
- return (int) res.getDimension(dimen.attachment_preview_height_short);
+ return (int) res.getDimension(R.dimen.attachment_preview_height_short);
default:
return 0;
}
@@ -623,6 +668,7 @@
/**
* Returns the number of lines of this text view. Delegates to built-in TextView logic on JB+.
*/
+ @SuppressLint("NewApi")
private static int getLineCount(TextView textView) {
if (Utils.isRunningJellybeanOrLater()) {
return textView.getMaxLines();
@@ -705,9 +751,4 @@
public int getFolderMinimumWidth() {
return mFolderMinimumWidth;
}
-
- public static boolean isWideMode(int mode) {
- return mode == WIDE_MODE;
- }
-
}
diff --git a/src/com/android/mail/browse/ConversationItemViewModel.java b/src/com/android/mail/browse/ConversationItemViewModel.java
index 9ea145b..27216a5 100644
--- a/src/com/android/mail/browse/ConversationItemViewModel.java
+++ b/src/com/android/mail/browse/ConversationItemViewModel.java
@@ -67,13 +67,17 @@
// Date
CharSequence dateText;
- public CharSequence dateOverrideText;
+ public boolean showDateText = true;
// Personal level
Bitmap personalLevelBitmap;
public Bitmap infoIcon;
+ public String badgeText;
+
+ public int insetPadding = 0;
+
// Paperclip
Bitmap paperclip;
diff --git a/src/com/android/mail/browse/ConversationViewAdapter.java b/src/com/android/mail/browse/ConversationViewAdapter.java
index 5dc55eb..d4298c1 100644
--- a/src/com/android/mail/browse/ConversationViewAdapter.java
+++ b/src/com/android/mail/browse/ConversationViewAdapter.java
@@ -20,6 +20,7 @@
import android.app.FragmentManager;
import android.app.LoaderManager;
import android.content.Context;
+import android.support.v4.text.BidiFormatter;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
@@ -81,6 +82,8 @@
public static final int VIEW_TYPE_AD_SENDER_HEADER = 6;
public static final int VIEW_TYPE_COUNT = 7;
+ private final BidiFormatter mBidiFormatter;
+
public class ConversationHeaderItem extends ConversationOverlayItem {
public final Conversation mConversation;
@@ -99,7 +102,7 @@
R.layout.conversation_view_header, parent, false);
headerView.setCallbacks(mConversationCallbacks, mAccountController);
headerView.bind(this);
- headerView.setSubject(mConversation.subject);
+ headerView.setSubject(mConversation.subject, getBidiFormatter());
if (mAccountController.getAccount().supportsCapability(
UIProvider.AccountCapabilities.MULTIPLE_FOLDERS_PER_CONV)) {
headerView.setFolders(mConversation);
@@ -453,7 +456,7 @@
ContactInfoSource contactInfoSource,
ConversationViewHeaderCallbacks convCallbacks,
SuperCollapsedBlock.OnClickListener scbListener, Map<String, Address> addressCache,
- FormattedDateBuilder dateBuilder) {
+ FormattedDateBuilder dateBuilder, BidiFormatter bidiFormatter) {
mContext = controllableActivity.getActivityContext();
mDateBuilder = dateBuilder;
mAccountController = accountController;
@@ -468,6 +471,8 @@
mItems = Lists.newArrayList();
mMatcher = controllableActivity.getAccountController().getVeiledAddressMatcher();
+
+ mBidiFormatter = bidiFormatter;
}
@Override
@@ -596,4 +601,8 @@
}
}
}
+
+ public BidiFormatter getBidiFormatter() {
+ return mBidiFormatter;
+ }
}
diff --git a/src/com/android/mail/browse/ConversationViewHeader.java b/src/com/android/mail/browse/ConversationViewHeader.java
index 2522990..fbaa0ff 100644
--- a/src/com/android/mail/browse/ConversationViewHeader.java
+++ b/src/com/android/mail/browse/ConversationViewHeader.java
@@ -17,8 +17,11 @@
package com.android.mail.browse;
+import android.annotation.SuppressLint;
import android.content.Context;
import android.content.res.Resources;
+import android.support.v4.text.BidiFormatter;
+import android.support.v4.text.TextUtilsCompat;
import android.text.Spannable;
import android.text.SpannableStringBuilder;
import android.text.TextUtils;
@@ -97,9 +100,8 @@
resources.getDimensionPixelSize(R.dimen.conversation_header_font_size_condensed);
mCondensedTopPadding = resources.getDimensionPixelSize(
R.dimen.conversation_header_vertical_padding_condensed);
- mIsRtl = Utils.isRunningJBMR1OrLater() ?
- TextUtils.getLayoutDirectionFromLocale(Locale.getDefault()) == LAYOUT_DIRECTION_RTL
- : false;
+ mIsRtl = TextUtilsCompat.getLayoutDirectionFromLocale(
+ Locale.getDefault()) == LAYOUT_DIRECTION_RTL;
}
@Override
@@ -110,9 +112,10 @@
mFoldersView = (FolderSpanTextView) findViewById(R.id.folders);
mFoldersView.setOnClickListener(this);
- mFolderDisplayer = new ConversationFolderDisplayer(getContext(), mFoldersView, mIsRtl);
+ mFolderDisplayer = new ConversationFolderDisplayer(getContext(), mFoldersView);
}
+ @SuppressLint("NewApi")
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
@@ -143,11 +146,11 @@
mAccountController = accountController;
}
- public void setSubject(final String subject) {
+ public void setSubject(final String subject, final BidiFormatter bidiFormatter) {
if (TextUtils.isEmpty(subject)) {
mSubjectView.setText(R.string.no_subject);
} else {
- mSubjectView.setText(subject);
+ mSubjectView.setText(bidiFormatter.unicodeWrap(subject));
}
}
@@ -169,7 +172,7 @@
mFolderDisplayer.loadConversationFolders(conv, null /* ignoreFolder */,
-1 /* ignoreFolderType */);
- mFolderDisplayer.appendFolderSpans(sb);
+ mFolderDisplayer.appendFolderSpans(sb, mIsRtl);
mFoldersView.setText(sb);
}
@@ -215,22 +218,19 @@
private static class ConversationFolderDisplayer extends FolderDisplayer {
- private final boolean mIsRtl;
-
private FolderSpanDimensions mDims;
public ConversationFolderDisplayer(
- Context context, FolderSpanDimensions dims, boolean isRtl) {
+ Context context, FolderSpanDimensions dims) {
super(context);
mDims = dims;
- mIsRtl = isRtl;
}
- public void appendFolderSpans(SpannableStringBuilder sb) {
+ public void appendFolderSpans(SpannableStringBuilder sb, boolean isRtl) {
for (final Folder f : mFoldersSortedSet) {
final int bgColor = f.getBackgroundColor(mDefaultBgColor);
final int fgColor = f.getForegroundColor(mDefaultFgColor);
- addSpan(sb, f.name, bgColor, fgColor);
+ addSpan(sb, f.name, bgColor, fgColor, isRtl);
}
if (mFoldersSortedSet.isEmpty()) {
@@ -238,12 +238,12 @@
final String name = r.getString(R.string.add_label);
final int bgColor = r.getColor(R.color.conv_header_add_label_background);
final int fgColor = r.getColor(R.color.conv_header_add_label_text);
- addSpan(sb, name, bgColor, fgColor);
+ addSpan(sb, name, bgColor, fgColor, isRtl);
}
}
private void addSpan(SpannableStringBuilder sb, String name, int bgColor,
- int fgColor) {
+ int fgColor, boolean isRtl) {
final int start = sb.length();
sb.append(name);
final int end = sb.length();
@@ -252,7 +252,7 @@
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
sb.setSpan(new ForegroundColorSpan(fgColor), start, end,
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
- sb.setSpan(new FolderSpan(sb, mDims, mIsRtl), start, end,
+ sb.setSpan(new FolderSpan(sb, mDims, isRtl), start, end,
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
}
diff --git a/src/com/android/mail/browse/FolderSpan.java b/src/com/android/mail/browse/FolderSpan.java
index 1bbd79b..12b9b05 100644
--- a/src/com/android/mail/browse/FolderSpan.java
+++ b/src/com/android/mail/browse/FolderSpan.java
@@ -136,8 +136,7 @@
left = x + paddingBefore;
right = x + bgWidth + paddingBefore;
}
- canvas.drawRect(left, top + paddingAbove, right, bottom,
- mWorkPaint);
+ canvas.drawRect(left, top + paddingAbove, right, bottom, mWorkPaint);
mWorkPaint.setColor(prevColor);
mWorkPaint.setStyle(prevStyle);
diff --git a/src/com/android/mail/browse/MessageAttachmentBar.java b/src/com/android/mail/browse/MessageAttachmentBar.java
index a1cfe12..6905723 100644
--- a/src/com/android/mail/browse/MessageAttachmentBar.java
+++ b/src/com/android/mail/browse/MessageAttachmentBar.java
@@ -23,6 +23,7 @@
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
+import android.support.v4.text.BidiFormatter;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.view.LayoutInflater;
@@ -107,7 +108,8 @@
* repeatedly as status updates stream in, so only properties with new or changed values will
* cause sub-views to update.
*/
- public void render(Attachment attachment, Uri accountUri, boolean loaderResult) {
+ public void render(Attachment attachment, Uri accountUri,
+ boolean loaderResult, BidiFormatter bidiFormatter) {
// get account uri for potential eml viewer usage
mAccountUri = accountUri;
@@ -129,13 +131,14 @@
mTitle.setText(R.string.load_attachment);
} else if (prevAttachment == null
|| !TextUtils.equals(attachment.getName(), prevAttachment.getName())) {
- mTitle.setText(attachment.getName());
+ mTitle.setText(bidiFormatter.unicodeWrap(attachment.getName()));
}
if (prevAttachment == null || attachment.size != prevAttachment.size) {
- mAttachmentSizeText = AttachmentUtils.convertToHumanReadableSize(getContext(),
- attachment.size);
- mDisplayType = AttachmentUtils.getDisplayType(getContext(), attachment);
+ mAttachmentSizeText = bidiFormatter.unicodeWrap(
+ AttachmentUtils.convertToHumanReadableSize(getContext(), attachment.size));
+ mDisplayType = bidiFormatter.unicodeWrap(
+ AttachmentUtils.getDisplayType(getContext(), attachment));
updateSubtitleText();
}
diff --git a/src/com/android/mail/browse/MessageFooterView.java b/src/com/android/mail/browse/MessageFooterView.java
index fad6f89..9916146 100644
--- a/src/com/android/mail/browse/MessageFooterView.java
+++ b/src/com/android/mail/browse/MessageFooterView.java
@@ -210,7 +210,8 @@
mAttachmentBarList.addView(barAttachmentView);
}
- barAttachmentView.render(attachment, mAccountUri, loaderResult);
+ barAttachmentView.render(attachment, mAccountUri, loaderResult,
+ mMessageHeaderItem.getAdapter().getBidiFormatter());
}
}
diff --git a/src/com/android/mail/browse/MessageHeaderView.java b/src/com/android/mail/browse/MessageHeaderView.java
index c5661c3..373d492 100644
--- a/src/com/android/mail/browse/MessageHeaderView.java
+++ b/src/com/android/mail/browse/MessageHeaderView.java
@@ -23,6 +23,7 @@
import android.database.DataSetObserver;
import android.graphics.Bitmap;
import android.graphics.Typeface;
+import android.support.v4.text.BidiFormatter;
import android.text.Spannable;
import android.text.SpannableStringBuilder;
import android.text.Spanned;
@@ -451,10 +452,11 @@
updateChildVisibility();
+ final BidiFormatter bidiFormatter = mMessageHeaderItem.getAdapter().getBidiFormatter();
if (mIsDraft || mIsSending) {
- mSnippet = makeSnippet(mMessage.snippet);
+ mSnippet = bidiFormatter.unicodeWrap(makeSnippet(mMessage.snippet));
} else {
- mSnippet = mMessage.snippet;
+ mSnippet = bidiFormatter.unicodeWrap(mMessage.snippet);
}
mSenderNameView.setText(getHeaderTitle());
@@ -529,7 +531,8 @@
} else if (mIsSending) {
title = getResources().getString(R.string.sending);
} else {
- title = getSenderName(mSender);
+ title = mMessageHeaderItem.getAdapter().getBidiFormatter().unicodeWrap(
+ getSenderName(mSender));
}
return title;
@@ -557,7 +560,7 @@
/**
* Return the name, if known, or just the address.
*/
- private static CharSequence getSenderName(Address sender) {
+ private static String getSenderName(Address sender) {
if (sender == null) {
return "";
}
@@ -1295,7 +1298,8 @@
if (!mExpandedDetailsValid) {
renderExpandedDetails(getResources(), mExpandedDetailsView, mMessage.viaDomain,
mAddressCache, getAccount(), mVeiledMatcher, mFrom, mReplyTo, mTo, mCc, mBcc,
- mMessageHeaderItem.getTimestampFull());
+ mMessageHeaderItem.getTimestampFull(),
+ mMessageHeaderItem.getAdapter().getBidiFormatter());
mExpandedDetailsValid = true;
}
@@ -1310,17 +1314,18 @@
public static void renderExpandedDetails(Resources res, View detailsView,
String viaDomain, Map<String, Address> addressCache, Account account,
VeiledAddressMatcher veiledMatcher, String[] from, String[] replyTo,
- String[] to, String[] cc, String[] bcc, CharSequence receivedTimestamp) {
+ String[] to, String[] cc, String[] bcc, CharSequence receivedTimestamp,
+ BidiFormatter bidiFormatter) {
renderEmailList(res, R.id.from_heading, R.id.from_details, from, viaDomain,
- detailsView, addressCache, account, veiledMatcher);
+ detailsView, addressCache, account, veiledMatcher, bidiFormatter);
renderEmailList(res, R.id.replyto_heading, R.id.replyto_details, replyTo, viaDomain,
- detailsView, addressCache, account, veiledMatcher);
+ detailsView, addressCache, account, veiledMatcher, bidiFormatter);
renderEmailList(res, R.id.to_heading, R.id.to_details, to, viaDomain,
- detailsView, addressCache, account, veiledMatcher);
+ detailsView, addressCache, account, veiledMatcher, bidiFormatter);
renderEmailList(res, R.id.cc_heading, R.id.cc_details, cc, viaDomain,
- detailsView, addressCache, account, veiledMatcher);
+ detailsView, addressCache, account, veiledMatcher, bidiFormatter);
renderEmailList(res, R.id.bcc_heading, R.id.bcc_details, bcc, viaDomain,
- detailsView, addressCache, account, veiledMatcher);
+ detailsView, addressCache, account, veiledMatcher, bidiFormatter);
// Render date
detailsView.findViewById(R.id.date_heading).setVisibility(VISIBLE);
@@ -1335,7 +1340,7 @@
private static void renderEmailList(Resources res, int headerId, int detailsId,
String[] emails, String viaDomain, View rootView,
Map<String, Address> addressCache, Account account,
- VeiledAddressMatcher veiledMatcher) {
+ VeiledAddressMatcher veiledMatcher, BidiFormatter bidiFormatter) {
if (emails == null || emails.length == 0) {
return;
}
@@ -1365,17 +1370,20 @@
addressShown = address;
}
if (name == null || name.length() == 0) {
- formattedEmails[i] = addressShown;
+ formattedEmails[i] = bidiFormatter.unicodeWrap(addressShown);
} else {
// The one downside to having the showViaDomain here is that
// if the sender does not have a name, it will not show the via info
if (viaDomain != null) {
formattedEmails[i] = res.getString(
R.string.address_display_format_with_via_domain,
- name, addressShown, viaDomain);
+ bidiFormatter.unicodeWrap(name),
+ bidiFormatter.unicodeWrap(addressShown),
+ bidiFormatter.unicodeWrap(viaDomain));
} else {
formattedEmails[i] = res.getString(R.string.address_display_format,
- name, addressShown);
+ bidiFormatter.unicodeWrap(name),
+ bidiFormatter.unicodeWrap(addressShown));
}
}
}
diff --git a/src/com/android/mail/compose/ComposeActivity.java b/src/com/android/mail/compose/ComposeActivity.java
index fd82c98..b2bd5c1 100644
--- a/src/com/android/mail/compose/ComposeActivity.java
+++ b/src/com/android/mail/compose/ComposeActivity.java
@@ -45,6 +45,7 @@
import android.os.ParcelFileDescriptor;
import android.os.Parcelable;
import android.provider.BaseColumns;
+import android.support.v4.text.BidiFormatter;
import android.text.Editable;
import android.text.Html;
import android.text.SpannableString;
@@ -295,6 +296,8 @@
private boolean mRespondedInline;
private boolean mPerformedSendOrDiscard = false;
+ private final BidiFormatter mBidiFormatter = BidiFormatter.getInstance();
+
/**
* Can be called from a non-UI thread.
*/
@@ -770,7 +773,7 @@
// Update the from spinner as other accounts
// may now be available.
if (mFromSpinner != null && mAccount != null) {
- mFromSpinner.initialize(mComposeMode, mAccount, mAccounts, mRefMessage);
+ mFromSpinner.initialize(mComposeMode, mAccount, mAccounts, mRefMessage, mBidiFormatter);
}
}
@@ -982,7 +985,7 @@
if (action == EDIT_DRAFT && mDraft.draftType == UIProvider.DraftType.COMPOSE) {
action = COMPOSE;
}
- mFromSpinner.initialize(action, mAccount, mAccounts, mRefMessage);
+ mFromSpinner.initialize(action, mAccount, mAccounts, mRefMessage, mBidiFormatter);
if (bundle != null) {
if (bundle.containsKey(EXTRA_SELECTED_REPLY_FROM_ACCOUNT)) {
diff --git a/src/com/android/mail/compose/ComposeAttachmentTile.java b/src/com/android/mail/compose/ComposeAttachmentTile.java
index 7038455..022fbe1 100644
--- a/src/com/android/mail/compose/ComposeAttachmentTile.java
+++ b/src/com/android/mail/compose/ComposeAttachmentTile.java
@@ -18,6 +18,8 @@
public ComposeAttachmentTile(Context context, AttributeSet attrs) {
super(context, attrs);
+
+ setAlwaysShowInfoText(true);
}
public static ComposeAttachmentTile inflate(LayoutInflater inflater, ViewGroup parent) {
diff --git a/src/com/android/mail/compose/FromAddressSpinner.java b/src/com/android/mail/compose/FromAddressSpinner.java
index 7d82d1e..aeed90b 100644
--- a/src/com/android/mail/compose/FromAddressSpinner.java
+++ b/src/com/android/mail/compose/FromAddressSpinner.java
@@ -16,6 +16,7 @@
package com.android.mail.compose;
import android.content.Context;
+import android.support.v4.text.BidiFormatter;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.view.View;
@@ -90,7 +91,7 @@
* @param syncingAccounts
*/
public void initialize(int action, Account currentAccount, Account[] syncingAccounts,
- Message refMessage) {
+ Message refMessage, BidiFormatter bidiFormatter) {
final List<Account> accounts = AccountUtils.mergeAccountLists(mAccounts,
syncingAccounts, true /* prioritizeAccountList */);
if (action == ComposeActivity.COMPOSE) {
@@ -111,11 +112,11 @@
}
mAccounts = ImmutableList.of(replyAccount);
}
- initFromSpinner();
+ initFromSpinner(bidiFormatter);
}
@VisibleForTesting
- protected void initFromSpinner() {
+ protected void initFromSpinner(BidiFormatter bidiFormatter) {
// If there are not yet any accounts in the cached synced accounts
// because this is the first time mail was opened, and it was opened
// directly to the compose activity, don't bother populating the reply
@@ -123,7 +124,8 @@
if (mAccounts == null || mAccounts.size() == 0) {
return;
}
- FromAddressSpinnerAdapter adapter = new FromAddressSpinnerAdapter(getContext());
+ FromAddressSpinnerAdapter adapter =
+ new FromAddressSpinnerAdapter(getContext(), bidiFormatter);
mReplyFromAccounts.clear();
for (Account account : mAccounts) {
diff --git a/src/com/android/mail/compose/FromAddressSpinnerAdapter.java b/src/com/android/mail/compose/FromAddressSpinnerAdapter.java
index 88528fd..980d419 100644
--- a/src/com/android/mail/compose/FromAddressSpinnerAdapter.java
+++ b/src/com/android/mail/compose/FromAddressSpinnerAdapter.java
@@ -16,6 +16,7 @@
package com.android.mail.compose;
import android.content.Context;
+import android.support.v4.text.BidiFormatter;
import android.text.TextUtils;
import android.text.util.Rfc822Tokenizer;
import android.view.LayoutInflater;
@@ -46,11 +47,14 @@
public static int ACCOUNT_ADDRESS = 1;
+ private final BidiFormatter mBidiFormatter;
+
private LayoutInflater mInflater;
- public FromAddressSpinnerAdapter(Context context) {
+ public FromAddressSpinnerAdapter(Context context, BidiFormatter bidiFormatter) {
super(context, R.layout.from_item, R.id.spinner_account_address);
sFormatString = getContext().getString(R.string.formatted_email_address);
+ mBidiFormatter = bidiFormatter;
}
protected LayoutInflater getInflater() {
@@ -78,13 +82,14 @@
int res = fromItem.isCustomFrom ? R.layout.custom_from_item : R.layout.from_item;
View fromEntry = convertView == null ? getInflater().inflate(res, null) : convertView;
if (fromItem.isCustomFrom) {
- ((TextView) fromEntry.findViewById(R.id.spinner_account_name)).setText(fromItem.name);
+ ((TextView) fromEntry.findViewById(R.id.spinner_account_name)).setText(
+ mBidiFormatter.unicodeWrap(fromItem.name));
((TextView) fromEntry.findViewById(R.id.spinner_account_address))
.setText(formatAddress(fromItem.address));
} else {
((TextView) fromEntry.findViewById(R.id.spinner_account_address))
- .setText(fromItem.address);
+ .setText(mBidiFormatter.unicodeWrap(fromItem.address));
}
return fromEntry;
}
@@ -97,21 +102,22 @@
View fromEntry = getInflater().inflate(res, null);
if (fromItem.isCustomFrom) {
((TextView) fromEntry.findViewById(R.id.spinner_account_name))
- .setText(fromItem.name);
+ .setText(mBidiFormatter.unicodeWrap(fromItem.name));
((TextView) fromEntry.findViewById(R.id.spinner_account_address))
.setText(formatAddress(fromItem.address));
} else {
((TextView) fromEntry.findViewById(R.id.spinner_account_address))
- .setText(fromItem.address);
+ .setText(mBidiFormatter.unicodeWrap(fromItem.address));
}
return fromEntry;
}
- private static CharSequence formatAddress(String address) {
+ private CharSequence formatAddress(String address) {
if (TextUtils.isEmpty(address)) {
return "";
}
- return String.format(sFormatString, Rfc822Tokenizer.tokenize(address)[0].getAddress());
+ return String.format(sFormatString,
+ mBidiFormatter.unicodeWrap(Rfc822Tokenizer.tokenize(address)[0].getAddress()));
}
public void addAccounts(List<ReplyFromAccount> replyFromAccounts) {
diff --git a/src/com/android/mail/compose/QuotedTextView.java b/src/com/android/mail/compose/QuotedTextView.java
index 8ebac6f..2dd64d5 100644
--- a/src/com/android/mail/compose/QuotedTextView.java
+++ b/src/com/android/mail/compose/QuotedTextView.java
@@ -61,7 +61,7 @@
private CharSequence mQuotedText;
private WebView mQuotedTextWebView;
private ShowHideQuotedTextListener mShowHideListener;
- private CheckBox mShowHideCheckBox;
+ private CheckBox mQuotedTextCheckBox;
private boolean mIncludeText = true;
private Button mRespondInlineButton;
private RespondInlineListener mRespondInlineListener;
@@ -85,11 +85,10 @@
WebSettings settings = mQuotedTextWebView.getSettings();
settings.setBlockNetworkLoads(true);
- mShowHideCheckBox = (CheckBox) findViewById(R.id.hide_quoted_text);
- mShowHideCheckBox.setChecked(true);
- mShowHideCheckBox.setOnClickListener(this);
+ mQuotedTextCheckBox = (CheckBox) findViewById(R.id.hide_quoted_text);
+ mQuotedTextCheckBox.setChecked(true);
+ mQuotedTextCheckBox.setOnClickListener(this);
sQuoteBegin = context.getResources().getString(R.string.quote_begin);
- findViewById(R.id.hide_quoted_text_label).setOnClickListener(this);
mRespondInlineButton = (Button) findViewById(R.id.respond_inline_button);
@@ -109,9 +108,8 @@
* @param allow
*/
public void allowQuotedText(boolean allow) {
- View quotedTextRow = findViewById(R.id.quoted_text_row);
- if (quotedTextRow != null) {
- quotedTextRow.setVisibility(allow? View.VISIBLE: View.INVISIBLE);
+ if (mQuotedTextCheckBox != null) {
+ mQuotedTextCheckBox.setVisibility(allow ? View.VISIBLE : View.INVISIBLE);
}
}
@@ -166,9 +164,7 @@
if (id == R.id.respond_inline_button) {
respondInline();
} else if (id == R.id.hide_quoted_text) {
- updateCheckedState(mShowHideCheckBox.isChecked());
- } else if (id == R.id.hide_quoted_text_label) {
- updateCheckedState(!mShowHideCheckBox.isChecked());
+ updateCheckedState(mQuotedTextCheckBox.isChecked());
}
}
@@ -178,7 +174,7 @@
* @param checked Either true or false.
*/
public void updateCheckedState(boolean checked) {
- mShowHideCheckBox.setChecked(checked);
+ mQuotedTextCheckBox.setChecked(checked);
updateQuotedTextVisibility(checked);
if (mShowHideListener != null) {
mShowHideListener.onShowHideQuotedText(checked);
diff --git a/src/com/android/mail/providers/Account.java b/src/com/android/mail/providers/Account.java
index ebda1aa..17d7a4e 100644
--- a/src/com/android/mail/providers/Account.java
+++ b/src/com/android/mail/providers/Account.java
@@ -482,6 +482,16 @@
return (capabilities & capability) != 0;
}
+ /**
+ * @return <tt>true</tt> if this mail account can be searched in any way (locally on the device,
+ * remotely on the server, or remotely on the server within the current folder)
+ */
+ public boolean supportsSearch() {
+ return supportsCapability(AccountCapabilities.LOCAL_SEARCH)
+ || supportsCapability(AccountCapabilities.SERVER_SEARCH)
+ || supportsCapability(AccountCapabilities.FOLDER_SERVER_SEARCH);
+ }
+
public boolean isAccountSyncRequired() {
return (syncStatus & SyncStatus.INITIAL_SYNC_NEEDED) == SyncStatus.INITIAL_SYNC_NEEDED;
}
diff --git a/src/com/android/mail/providers/Conversation.java b/src/com/android/mail/providers/Conversation.java
index 24ed5b7..a9692e9 100644
--- a/src/com/android/mail/providers/Conversation.java
+++ b/src/com/android/mail/providers/Conversation.java
@@ -176,6 +176,7 @@
private transient boolean viewed;
private static String sSubjectAndSnippet;
+ private static String sBadgeSubjectAndSnippet;
// Constituents of convFlags below
// Flag indicating that the item has been deleted, but will continue being
@@ -851,22 +852,24 @@
/**
* Get the properly formatted subject and snippet string for display a
* conversation.
- *
- * @param context
- * @param filteredSubject
- * @param snippet
*/
public static String getSubjectAndSnippetForDisplay(Context context,
- String filteredSubject, String snippet) {
- if (sSubjectAndSnippet == null) {
- sSubjectAndSnippet = context.getString(R.string.subject_and_snippet);
- }
+ String badgeText, String filteredSubject, String snippet) {
if (TextUtils.isEmpty(filteredSubject) && TextUtils.isEmpty(snippet)) {
return "";
} else if (TextUtils.isEmpty(filteredSubject)) {
return snippet;
} else if (TextUtils.isEmpty(snippet)) {
return filteredSubject;
+ } else if (!TextUtils.isEmpty(badgeText)) {
+ if (sBadgeSubjectAndSnippet == null) {
+ sBadgeSubjectAndSnippet = context.getString(R.string.badge_subject_and_snippet);
+ }
+ return String.format(sBadgeSubjectAndSnippet, badgeText, filteredSubject, snippet);
+ }
+
+ if (sSubjectAndSnippet == null) {
+ sSubjectAndSnippet = context.getString(R.string.subject_and_snippet);
}
return String.format(sSubjectAndSnippet, filteredSubject, snippet);
diff --git a/src/com/android/mail/ui/AbstractActivityController.java b/src/com/android/mail/ui/AbstractActivityController.java
index c44e598..20528ec 100644
--- a/src/com/android/mail/ui/AbstractActivityController.java
+++ b/src/com/android/mail/ui/AbstractActivityController.java
@@ -3144,8 +3144,7 @@
LogUtils.d(LOG_TAG, "AbstractActivityController.startSearch(): null account");
return;
}
- if (mAccount.supportsCapability(UIProvider.AccountCapabilities.LOCAL_SEARCH)
- || mAccount.supportsCapability(UIProvider.AccountCapabilities.SERVER_SEARCH)) {
+ if (mAccount.supportsSearch()) {
mActionBarView.expandSearch();
} else {
Toast.makeText(mActivity.getActivityContext(), mActivity.getActivityContext()
diff --git a/src/com/android/mail/ui/AccountItemView.java b/src/com/android/mail/ui/AccountItemView.java
index 7e8edee..87f154b 100644
--- a/src/com/android/mail/ui/AccountItemView.java
+++ b/src/com/android/mail/ui/AccountItemView.java
@@ -15,19 +15,17 @@
*/
package com.android.mail.ui;
-import com.android.mail.R;
-
-import android.widget.ImageView;
-import android.widget.TextView;
-
-import com.android.mail.providers.Account;
-import com.android.mail.utils.Utils;
-
import android.content.Context;
-
+import android.support.v4.text.BidiFormatter;
import android.util.AttributeSet;
import android.view.View;
+import android.widget.ImageView;
import android.widget.RelativeLayout;
+import android.widget.TextView;
+
+import com.android.mail.R;
+import com.android.mail.providers.Account;
+import com.android.mail.utils.Utils;
/**
* The view for each account in the folder list/drawer.
@@ -66,8 +64,9 @@
* @param isCurrentAccount true if the account is the one in use, false otherwise
* @param count unread count
*/
- public void bind(final Account account, final boolean isCurrentAccount, final int count) {
- mAccountTextView.setText(account.name);
+ public void bind(final Account account, final boolean isCurrentAccount,
+ final int count, BidiFormatter bidiFormatter) {
+ mAccountTextView.setText(bidiFormatter.unicodeWrap(account.name));
setUnreadCount(count);
mUnreadCountTextView.setSelected(isCurrentAccount);
mAccountTextView.setSelected(isCurrentAccount);
diff --git a/src/com/android/mail/ui/AnimatedAdapter.java b/src/com/android/mail/ui/AnimatedAdapter.java
index d898fc1..d622cc6 100644
--- a/src/com/android/mail/ui/AnimatedAdapter.java
+++ b/src/com/android/mail/ui/AnimatedAdapter.java
@@ -28,6 +28,7 @@
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
+import android.support.v4.text.BidiFormatter;
import android.util.SparseArray;
import android.view.LayoutInflater;
import android.view.View;
@@ -196,6 +197,8 @@
*/
private final List<ConversationSpecialItemView> mFleetingViews;
+ private final BidiFormatter mBidiFormatter = BidiFormatter.getInstance();
+
/**
* @return <code>true</code> if a relevant part of the account has changed, <code>false</code>
* otherwise
@@ -473,6 +476,8 @@
if (list.isEmpty()) {
// If we have no deleted items on screen, skip the animation
listener.onListItemsRemoved();
+ // If we have an action queued up, perform it
+ performAndSetNextAction(null);
} else {
performAndSetNextAction(listener);
}
@@ -650,6 +655,10 @@
return mCoordinatesCache;
}
+ public BidiFormatter getBidiFormatter() {
+ return mBidiFormatter;
+ }
+
public SwipeableListView getListView() {
return mListView;
}
diff --git a/src/com/android/mail/ui/AttachmentTile.java b/src/com/android/mail/ui/AttachmentTile.java
index 1ca5f76..63542fa 100644
--- a/src/com/android/mail/ui/AttachmentTile.java
+++ b/src/com/android/mail/ui/AttachmentTile.java
@@ -59,6 +59,8 @@
// considered skinny
private static final float skinnyThresholdRatio = 0.5f;
+ private boolean mAlwaysShowInfoText;
+
/**
* Returns true if the attachment should be rendered as a tile. with a large image preview.
@@ -76,6 +78,7 @@
public AttachmentTile(Context context, AttributeSet attrs) {
super(context, attrs);
mDefaultThumbnailSet = true;
+ mAlwaysShowInfoText = false;
}
@Override
@@ -167,8 +170,10 @@
// We got a real thumbnail; hide the default thumbnail.
mDefaultIcon.setVisibility(View.GONE);
- mTitle.setVisibility(View.GONE);
- mSubtitle.setVisibility(View.GONE);
+ if (!mAlwaysShowInfoText) {
+ mTitle.setVisibility(View.GONE);
+ mSubtitle.setVisibility(View.GONE);
+ }
final int maxSize = getResources().getInteger(R.integer.attachment_preview_max_size);
final int width = result.getWidth();
@@ -281,4 +286,8 @@
public void thumbnailLoadFailed() {
setThumbnailToDefault();
}
+
+ protected void setAlwaysShowInfoText(boolean alwaysShowInfoText) {
+ mAlwaysShowInfoText = alwaysShowInfoText;
+ }
}
diff --git a/src/com/android/mail/ui/AttachmentTileGrid.java b/src/com/android/mail/ui/AttachmentTileGrid.java
index 018cea2..2bb2acd 100644
--- a/src/com/android/mail/ui/AttachmentTileGrid.java
+++ b/src/com/android/mail/ui/AttachmentTileGrid.java
@@ -32,6 +32,7 @@
import com.android.mail.ui.AttachmentTile.AttachmentPreview;
import com.android.mail.ui.AttachmentTile.AttachmentPreviewCache;
+import com.android.mail.utils.ViewUtils;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
@@ -162,9 +163,15 @@
private void onLayoutForTiles() {
final int count = getChildCount();
- int childLeft = 0;
- int childTop = 0;
+ if (count == 0) {
+ return;
+ }
+
boolean skipBeginningOfRowFirstTime = true;
+ final boolean isRtl = ViewUtils.isViewRtl(this);
+ final int width = getMeasuredWidth();
+ int childLeft = (isRtl) ? width - getChildAt(0).getMeasuredWidth() : 0;;
+ int childTop = 0;
// Layout the grid.
for (int i = 0; i < count; i++) {
@@ -178,7 +185,7 @@
// in the grid, reset childLeft to 0 and update childTop
// to reflect the top of the new row.
if (!skipBeginningOfRowFirstTime && i % mColumnCount == 0) {
- childLeft = 0;
+ childLeft = (isRtl) ? width - childWidth : 0;
childTop += childHeight;
} else {
skipBeginningOfRowFirstTime = false;
@@ -186,7 +193,12 @@
child.layout(childLeft, childTop,
childLeft + childWidth, childTop + childHeight);
- childLeft += childWidth;
+
+ if (isRtl) {
+ childLeft -= childWidth;
+ } else {
+ childLeft += childWidth;
+ }
}
}
diff --git a/src/com/android/mail/ui/ConversationViewFragment.java b/src/com/android/mail/ui/ConversationViewFragment.java
index f018b18..abc0e9c 100644
--- a/src/com/android/mail/ui/ConversationViewFragment.java
+++ b/src/com/android/mail/ui/ConversationViewFragment.java
@@ -210,7 +210,7 @@
private static final String BUNDLE_KEY_WEBVIEW_Y_PERCENT =
ConversationViewFragment.class.getName() + "webview-y-percent";
- private BidiFormatter sBidiFormatter;
+ private BidiFormatter mBidiFormatter;
/**
* Contains a mapping between inline image attachments and their local message id.
@@ -274,7 +274,7 @@
mAdapter = new ConversationViewAdapter(mActivity, this,
getLoaderManager(), this, getContactInfoSource(), this,
- this, mAddressCache, dateBuilder);
+ this, mAddressCache, dateBuilder, mBidiFormatter);
mConversationContainer.setOverlayAdapter(mAdapter);
// set up snap header (the adapter usually does this with the other ones)
@@ -335,9 +335,7 @@
mWebViewYPercent = savedState.getFloat(BUNDLE_KEY_WEBVIEW_Y_PERCENT);
}
- if (sBidiFormatter == null) {
- sBidiFormatter = BidiFormatter.getInstance();
- }
+ mBidiFormatter = BidiFormatter.getInstance();
}
protected ConversationWebViewClient createConversationWebViewClient() {
@@ -1345,8 +1343,8 @@
} else {
final Address addr = getAddress(senderAddress);
return res.getString(R.string.new_incoming_messages_one,
- sBidiFormatter.unicodeWrap(TextUtils.isEmpty(addr.getPersonal())
- ? addr.getAddress() : addr.getPersonal()));
+ mBidiFormatter.unicodeWrap(TextUtils.isEmpty(addr.getPersonal())
+ ? addr.getAddress() : addr.getPersonal()));
}
}
}
@@ -1588,7 +1586,7 @@
mConversation = conv;
if (headerView != null) {
headerView.onConversationUpdated(conv);
- headerView.setSubject(conv.subject);
+ headerView.setSubject(conv.subject, mBidiFormatter);
}
}
diff --git a/src/com/android/mail/ui/CustomTypefaceSpan.java b/src/com/android/mail/ui/CustomTypefaceSpan.java
deleted file mode 100644
index df54fdd..0000000
--- a/src/com/android/mail/ui/CustomTypefaceSpan.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/**
- * Copyright (c) 2013, Google Inc.
- *
- * 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.
- */
-
-package com.android.mail.ui;
-
-import android.graphics.Paint;
-import android.graphics.Typeface;
-import android.text.TextPaint;
-import android.text.style.TypefaceSpan;
-
-/**
- * CustomTypefaceSpan allows for the use of a non-framework font supplied in the
- * assets/fonts directory of the application. Use this class whenever the
- * framework does not contain a needed font.
- */
-public class CustomTypefaceSpan extends TypefaceSpan {
- private final Typeface newType;
- private int newColor;
- private int newSize;
-
- /**
- * @param family Ignored since this uses a completely custom included font.
- * @param type Typeface, specified as: Typeface.createFromAsset(
- * context.getAssets(), "fonts/Roboto-Medium.ttf"),
- * @param size Desired font size; this should have already been converted
- * from a dimension.
- * @param color Desired font color; this should have already been converted
- * to an integer representation of a color.
- */
- public CustomTypefaceSpan(String family, Typeface type, int size, int color) {
- super(family);
- newType = type;
- newSize = size;
- newColor = color;
- }
-
- @Override
- public void updateDrawState(TextPaint ds) {
- applyCustomTypeFace(ds, newType, newSize, newColor);
- }
-
- @Override
- public void updateMeasureState(TextPaint paint) {
- applyCustomTypeFace(paint, newType, newSize, newColor);
- }
-
- private static void applyCustomTypeFace(Paint paint, Typeface tf, int newSize, int newColor) {
- int oldStyle;
- Typeface old = paint.getTypeface();
- if (old == null) {
- oldStyle = 0;
- } else {
- oldStyle = old.getStyle();
- }
-
- int fake = oldStyle & ~tf.getStyle();
- if ((fake & Typeface.BOLD) != 0) {
- paint.setFakeBoldText(true);
- }
-
- if ((fake & Typeface.ITALIC) != 0) {
- paint.setTextSkewX(-0.25f);
- }
-
- paint.setTextSize(newSize);
- paint.setColor(newColor);
- paint.setTypeface(tf);
- }
-}
\ No newline at end of file
diff --git a/src/com/android/mail/ui/FolderItemView.java b/src/com/android/mail/ui/FolderItemView.java
index 6df68d8..d0d99dc 100644
--- a/src/com/android/mail/ui/FolderItemView.java
+++ b/src/com/android/mail/ui/FolderItemView.java
@@ -15,6 +15,7 @@
*/
package com.android.mail.ui;
+import android.annotation.SuppressLint;
import android.content.Context;
import android.graphics.Color;
import android.support.v4.text.BidiFormatter;
@@ -131,13 +132,21 @@
* Sets the icon, if any. If the image view's visibility is set to gone, the text view will
* be moved over to account for the change.
*/
+ @SuppressLint("NewApi")
public void setIcon(final Folder folder) {
final ImageView folderIconView = (ImageView) findViewById(R.id.folder_icon);
Folder.setIcon(folder, folderIconView);
if (folderIconView.getVisibility() == View.GONE) {
- mFolderTextView.setPadding(getContext()
- .getResources().getDimensionPixelSize(R.dimen.folder_list_item_left_offset),
- 0, 0, 0 /* No top, right, bottom padding needed */);
+ final int paddingStart = getContext().getResources().getDimensionPixelSize(
+ R.dimen.folder_list_item_left_offset);
+ if (Utils.isRunningJBMR1OrLater()) {
+ // start, top, end, bottom
+ mFolderTextView.setPaddingRelative(paddingStart, mFolderTextView.getPaddingTop(),
+ mFolderTextView.getPaddingEnd(), mFolderTextView.getPaddingBottom());
+ } else {
+ mFolderTextView.setPadding(paddingStart, mFolderTextView.getPaddingTop(),
+ mFolderTextView.getPaddingRight(), mFolderTextView.getPaddingBottom());
+ }
} else {
// View recycling case
mFolderTextView.setPadding(0, 0, 0, 0);
diff --git a/src/com/android/mail/ui/MailActionBarView.java b/src/com/android/mail/ui/MailActionBarView.java
index b07324c..f0d191d 100644
--- a/src/com/android/mail/ui/MailActionBarView.java
+++ b/src/com/android/mail/ui/MailActionBarView.java
@@ -30,6 +30,7 @@
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
+import android.support.v4.text.BidiFormatter;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.view.Menu;
@@ -122,7 +123,7 @@
subtitleText = null;
LogUtils.wtf(LOG_TAG, "MABV.handleMessage() has a null account!");
}
- setSubtitle(subtitleText);
+ setSubtitle(mBidiFormatter.unicodeWrap(subtitleText));
super.handleMessage(message);
}
}
@@ -135,6 +136,8 @@
private static final int ACCOUNT_DELAY_MS = 5 * 1000;
/** At what point do we stop showing the unread count: 999+ currently */
private final int UNREAD_LIMIT;
+ /** BidiFormatter for title and subtitle. */
+ private final BidiFormatter mBidiFormatter;
/** Updates the resolver and tells it the most recent account. */
private final class UpdateProvider extends AsyncTask<Bundle, Void, Void> {
@@ -173,6 +176,7 @@
final Resources r = getResources();
mIsOnTablet = Utils.useTabletUI(r);
UNREAD_LIMIT = r.getInteger(R.integer.maxUnreadCount);
+ mBidiFormatter = BidiFormatter.getInstance();
}
private void initializeTitleViews() {
@@ -424,10 +428,8 @@
reorderMenu(getContext(), mAccount, menu, totalItems);
break;
case ViewMode.CONVERSATION_LIST:
- // Show compose and search based on the account
- // The only option that needs to be disabled is search
- Utils.setMenuItemVisibility(menu, R.id.search,
- mAccount.supportsCapability(AccountCapabilities.FOLDER_SERVER_SEARCH));
+ // Show search if the account supports it
+ Utils.setMenuItemVisibility(menu, R.id.search, mAccount.supportsSearch());
break;
case ViewMode.SEARCH_RESULTS_LIST:
// Hide compose and search
@@ -550,7 +552,8 @@
}
}
- private void setTitle(CharSequence title) {
+ private void setTitle(String title) {
+ title = mBidiFormatter.unicodeWrap(title);
if (!TextUtils.equals(title, mActionBar.getTitle())) {
mActionBar.setTitle(title);
}
diff --git a/src/com/android/mail/ui/NestedFolderTeaserView.java b/src/com/android/mail/ui/NestedFolderTeaserView.java
index ebbdbdc..75c99f8 100644
--- a/src/com/android/mail/ui/NestedFolderTeaserView.java
+++ b/src/com/android/mail/ui/NestedFolderTeaserView.java
@@ -294,11 +294,13 @@
// Add all folder views to the teaser
int added = 0;
+ // If we're only over the limit by one, don't truncate the list.
+ boolean truncate = folderHolders.size() > sCollapsedFolderThreshold + 1;
for (final FolderHolder folderHolder : folderHolders) {
mNestedFolderContainer.addView(folderHolder.getItemView());
added++;
- if (added >= sCollapsedFolderThreshold && mCollapsed) {
+ if (truncate && added >= sCollapsedFolderThreshold && mCollapsed) {
// We will display the rest when "Show more" is clicked
break;
}
@@ -345,7 +347,7 @@
}
mShowMoreFoldersCountTextView.setText(Integer.toString(unreadCount));
- } else if (displayed > sCollapsedFolderThreshold) {
+ } else if (displayed > sCollapsedFolderThreshold + 1) {
// We are expanded
mShowMoreFoldersRow.setVisibility(VISIBLE);
mShowMoreFoldersTextView.setText(R.string.hide_folders);
diff --git a/src/com/android/mail/ui/SecureConversationViewController.java b/src/com/android/mail/ui/SecureConversationViewController.java
index c89cd92..8084db1 100644
--- a/src/com/android/mail/ui/SecureConversationViewController.java
+++ b/src/com/android/mail/ui/SecureConversationViewController.java
@@ -22,6 +22,7 @@
import android.content.res.Resources;
import android.graphics.Rect;
import android.os.Bundle;
+import android.support.v4.text.BidiFormatter;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@@ -60,6 +61,7 @@
private static final String END_HTML = "</div></body>";
private final SecureConversationViewControllerCallbacks mCallbacks;
+ private final BidiFormatter mBidiFormatter;
private MessageWebView mWebView;
private ConversationViewHeader mConversationHeaderView;
@@ -76,6 +78,7 @@
public SecureConversationViewController(SecureConversationViewControllerCallbacks callbacks) {
mCallbacks = callbacks;
+ mBidiFormatter = BidiFormatter.getInstance();
}
public View onCreateView(LayoutInflater inflater, ViewGroup container,
@@ -232,7 +235,7 @@
}
public void setSubject(String subject) {
- mConversationHeaderView.setSubject(subject);
+ mConversationHeaderView.setSubject(subject, mBidiFormatter);
}
public void printMessage() {
@@ -243,6 +246,10 @@
}
+ public BidiFormatter getBidiFormatter() {
+ return mBidiFormatter;
+ }
+
// Start MessageHeaderViewCallbacks implementations
@Override
diff --git a/src/com/android/mail/ui/SecureConversationViewFragment.java b/src/com/android/mail/ui/SecureConversationViewFragment.java
index 31c1d4c..1241ec7 100644
--- a/src/com/android/mail/ui/SecureConversationViewFragment.java
+++ b/src/com/android/mail/ui/SecureConversationViewFragment.java
@@ -143,7 +143,7 @@
public void setupConversationHeaderView(ConversationViewHeader headerView) {
headerView.setCallbacks(this, this);
headerView.setFolders(mConversation);
- headerView.setSubject(mConversation.subject);
+ headerView.setSubject(mConversation.subject, mViewController.getBidiFormatter());
}
@Override
@@ -256,7 +256,7 @@
final ConversationViewHeader headerView = mViewController.getConversationHeaderView();
if (headerView != null) {
headerView.onConversationUpdated(conv);
- headerView.setSubject(conv.subject);
+ headerView.setSubject(conv.subject, mViewController.getBidiFormatter());
}
}
diff --git a/src/com/android/mail/widget/WidgetConversationListItemViewBuilder.java b/src/com/android/mail/widget/WidgetConversationListItemViewBuilder.java
index 585eddf..29cd006 100644
--- a/src/com/android/mail/widget/WidgetConversationListItemViewBuilder.java
+++ b/src/com/android/mail/widget/WidgetConversationListItemViewBuilder.java
@@ -16,25 +16,27 @@
package com.android.mail.widget;
-import com.android.mail.R;
-import com.android.mail.providers.Conversation;
-import com.android.mail.providers.Folder;
-import com.android.mail.ui.FolderDisplayer;
-import com.android.mail.utils.FolderUri;
-
import android.content.Context;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Typeface;
+import android.support.v4.text.BidiFormatter;
import android.text.Spannable;
import android.text.SpannableStringBuilder;
+import android.text.TextUtils;
import android.text.style.AbsoluteSizeSpan;
import android.text.style.ForegroundColorSpan;
import android.text.style.StyleSpan;
import android.view.View;
import android.widget.RemoteViews;
+import com.android.mail.R;
+import com.android.mail.providers.Conversation;
+import com.android.mail.providers.Folder;
+import com.android.mail.ui.FolderDisplayer;
+import com.android.mail.utils.FolderUri;
+
public class WidgetConversationListItemViewBuilder {
// Static font sizes
private static int DATE_FONT_SIZE;
@@ -49,6 +51,7 @@
private static Bitmap ATTACHMENT;
private final Context mContext;
+
private WidgetFolderDisplayer mFolderDisplayer;
/**
@@ -148,7 +151,7 @@
*/
public RemoteViews getStyledView(final CharSequence date, final Conversation conversation,
final FolderUri folderUri, final int ignoreFolderType,
- final SpannableStringBuilder senders, final String filteredSubject) {
+ final SpannableStringBuilder senders, final String subject) {
final boolean isUnread = !conversation.read;
final String snippet = conversation.getSnippet();
@@ -159,8 +162,13 @@
// Add style to subject
final int subjectColor = isUnread ? SUBJECT_TEXT_COLOR_UNREAD : SUBJECT_TEXT_COLOR_READ;
+ final BidiFormatter bidiFormatter = BidiFormatter.getInstance();
+ final String filteredSubject =
+ TextUtils.isEmpty(subject) ? "" : bidiFormatter.unicodeWrap(subject);
final SpannableStringBuilder subjectAndSnippet = new SpannableStringBuilder(
- Conversation.getSubjectAndSnippetForDisplay(mContext, filteredSubject, snippet));
+ Conversation.getSubjectAndSnippetForDisplay(
+ mContext, null /* badgeText */, filteredSubject,
+ bidiFormatter.unicodeWrap(snippet)));
if (isUnread) {
subjectAndSnippet.setSpan(new StyleSpan(Typeface.BOLD), 0, filteredSubject.length(),
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
diff --git a/src/com/android/mail/widget/WidgetService.java b/src/com/android/mail/widget/WidgetService.java
index e35ec24..8b18222 100644
--- a/src/com/android/mail/widget/WidgetService.java
+++ b/src/com/android/mail/widget/WidgetService.java
@@ -437,21 +437,6 @@
}
}
- private CharacterStyle getUnreadStyle() {
- if (mUnreadStyle == null) {
- mUnreadStyle = new TextAppearanceSpan(mContext,
- R.style.SendersUnreadTextAppearance);
- }
- return CharacterStyle.wrap(mUnreadStyle);
- }
-
- private CharacterStyle getReadStyle() {
- if (mReadStyle == null) {
- mReadStyle = new TextAppearanceSpan(mContext, R.style.SendersReadTextAppearance);
- }
- return CharacterStyle.wrap(mReadStyle);
- }
-
private SpannableStringBuilder ellipsizeStyledSenders(
ArrayList<SpannableString> styledSenders) {
SpannableStringBuilder builder = new SpannableStringBuilder();
diff --git a/tests/src/com/android/mail/browse/EmlMessageLoaderTest.java b/tests/src/com/android/mail/browse/EmlMessageLoaderTest.java
new file mode 100644
index 0000000..8e4b803
--- /dev/null
+++ b/tests/src/com/android/mail/browse/EmlMessageLoaderTest.java
@@ -0,0 +1,97 @@
+/*******************************************************************************
+ * Copyright (C) 2014 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.
+ *******************************************************************************/
+
+package com.android.mail.browse;
+
+import android.content.ContentValues;
+import android.content.Context;
+import android.content.ContextWrapper;
+import android.net.Uri;
+import android.os.ParcelFileDescriptor;
+import android.provider.OpenableColumns;
+import android.test.IsolatedContext;
+import android.test.LoaderTestCase;
+import android.test.mock.MockContentResolver;
+import android.test.suitebuilder.annotation.SmallTest;
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.HashMap;
+
+public class EmlMessageLoaderTest extends LoaderTestCase {
+ private TestEmlProvider mTestProvider;
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ MockContentResolver resolver = new MockContentResolver();
+ IsolatedContext context = new IsolatedContext(resolver, getContext());
+ Context wrappedContext = new ContextWrapper(context) {
+ @Override
+ public Context getApplicationContext() {
+ return this;
+ }
+ };
+ setContext(wrappedContext);
+ mTestProvider = new TestEmlProvider(wrappedContext);
+ resolver.addProvider(TestEmlProvider.AUTHORITY, mTestProvider);
+ }
+
+ @SmallTest
+ public void testLoadingBlankEml() throws Exception {
+ final Uri emptyEmlUri = TestProvider.uri(
+ new Uri.Builder().scheme("content").authority("empty").path("empty").build());
+ final ContentValues cv = new ContentValues(2);
+ cv.put(OpenableColumns.DISPLAY_NAME, "Empty.eml");
+ cv.put(OpenableColumns.SIZE, 0);
+ mTestProvider.insert(emptyEmlUri, cv);
+ final OutputStream out = new ParcelFileDescriptor.AutoCloseOutputStream(
+ mTestProvider.makePipeForUri(emptyEmlUri));
+ out.write(0);
+ out.close();
+
+ EmlMessageLoader loader = new EmlMessageLoader(getContext(), emptyEmlUri);
+
+ getLoaderResultSynchronously(loader);
+ // If we don't crash, the test passed.
+ }
+
+ public static class TestEmlProvider extends TestProvider {
+ private final HashMap<Uri, ParcelFileDescriptor> mFileMap =
+ new HashMap<Uri, ParcelFileDescriptor>();
+
+ public TestEmlProvider(Context context) {
+ super(context);
+ }
+
+ public ParcelFileDescriptor makePipeForUri(Uri uri) throws IOException {
+ ParcelFileDescriptor[] descriptors = ParcelFileDescriptor.createPipe();
+ mFileMap.put(uri, descriptors[0]);
+ return descriptors[1];
+ }
+
+ @Override
+ public ParcelFileDescriptor openFile(Uri uri, String mode) throws FileNotFoundException {
+ final ParcelFileDescriptor descriptor = mFileMap.get(uri);
+ if (descriptor != null) {
+ return descriptor;
+ }
+ return super.openFile(uri, mode);
+ }
+ }
+}
diff --git a/tests/src/com/android/mail/compose/ComposeActivityTest.java b/tests/src/com/android/mail/compose/ComposeActivityTest.java
index d2cc308..52066e9 100644
--- a/tests/src/com/android/mail/compose/ComposeActivityTest.java
+++ b/tests/src/com/android/mail/compose/ComposeActivityTest.java
@@ -22,6 +22,7 @@
import android.database.Cursor;
import android.database.MatrixCursor;
import android.net.Uri;
+import android.support.v4.text.BidiFormatter;
import android.test.ActivityInstrumentationTestCase2;
import android.test.suitebuilder.annotation.SmallTest;
import android.text.Html;
@@ -149,7 +150,7 @@
activity.mFromSpinner.setCurrentAccount(currentAccount);
activity.mFromSpinner.initialize(ComposeActivity.REPLY_ALL,
- currentAccount.account, EMPTY_ACCOUNT_LIST, null);
+ currentAccount.account, EMPTY_ACCOUNT_LIST, null, BidiFormatter.getInstance());
runTestOnUiThread(new Runnable() {
@Override
public void run() {
@@ -183,7 +184,7 @@
activity.mFromSpinner.setCurrentAccount(currentAccount);
activity.mFromSpinner.initialize(ComposeActivity.REPLY_ALL,
- currentAccount.account, EMPTY_ACCOUNT_LIST, null);
+ currentAccount.account, EMPTY_ACCOUNT_LIST, null, BidiFormatter.getInstance());
runTestOnUiThread(new Runnable() {
@Override
public void run() {
@@ -222,7 +223,7 @@
activity.mFromSpinner.setCurrentAccount(currentAccount);
activity.mFromSpinner.initialize(ComposeActivity.REPLY_ALL,
- currentAccount.account, EMPTY_ACCOUNT_LIST, null);
+ currentAccount.account, EMPTY_ACCOUNT_LIST, null, BidiFormatter.getInstance());
runTestOnUiThread(new Runnable() {
@Override
public void run() {
@@ -550,7 +551,7 @@
mAccount.name, mAccount.name, mAccount.name, true, false);
activity.mFromSpinner.setCurrentAccount(currentAccount);
activity.mFromSpinner.initialize(ComposeActivity.REPLY, currentAccount.account,
- EMPTY_ACCOUNT_LIST, null);
+ EMPTY_ACCOUNT_LIST, null, BidiFormatter.getInstance());
runTestOnUiThread(new Runnable() {
@Override
@@ -590,7 +591,7 @@
mAccount.name, mAccount.name, mAccount.name, true, false);
activity.mFromSpinner.setCurrentAccount(currentAccount);
activity.mFromSpinner.initialize(ComposeActivity.REPLY_ALL,
- currentAccount.account, EMPTY_ACCOUNT_LIST, null);
+ currentAccount.account, EMPTY_ACCOUNT_LIST, null, BidiFormatter.getInstance());
runTestOnUiThread(new Runnable() {
@Override
public void run() {
@@ -632,7 +633,7 @@
mAccount.name, mAccount.name, mAccount.name, true, false);
activity.mFromSpinner.setCurrentAccount(currentAccount);
activity.mFromSpinner.initialize(ComposeActivity.REPLY_ALL,
- currentAccount.account, EMPTY_ACCOUNT_LIST, null);
+ currentAccount.account, EMPTY_ACCOUNT_LIST, null, BidiFormatter.getInstance());
runTestOnUiThread(new Runnable() {
@Override
public void run() {