Quantum compose
Temporarily using ic_forward_24dp as placeholder until
I get the correct asset for the dropdown buttons.
b/15934812
Change-Id: I760a1717a73f7c3ab1ad5a3368fac297e883231c
diff --git a/res/layout-sw600dp/compose.xml b/res/layout-sw600dp/compose.xml
deleted file mode 100644
index 44fa5cb..0000000
--- a/res/layout-sw600dp/compose.xml
+++ /dev/null
@@ -1,180 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2011 Google Inc.
- Licensed to The Android Open Source Project.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_height="match_parent"
- android:layout_width="match_parent"
- android:background="@color/holo_light_background_color">
- <RelativeLayout
- android:id="@+id/wait"
- android:visibility="gone"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:gravity="center"
- android:layout_gravity="center"/>
- <ScrollView
- android:layout_height="match_parent"
- android:layout_width="match_parent"
- android:fillViewport="true"
- android:id="@+id/compose"
- android:visibility="gone">
- <TableLayout android:id="@+id/content"
- style="@style/ComposeArea"
- android:layout_height="match_parent"
- android:paddingTop="8dip"
- android:background="@android:color/white"
- android:layout_gravity="center_horizontal"
- android:animateLayoutChanges="true">
- <TableRow
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- style="@style/ComposeRowStyle" >
- <FrameLayout
- style="@style/FillRowStyle">
- <include layout="@layout/compose_from"/>
- </FrameLayout>
- </TableRow>
- <TableRow
- android:layout_width="match_parent"
- android:layout_height="wrap_content">
- <LinearLayout android:id="@+id/to_content"
- style="@style/RecipientComposeFieldLayout"
- android:layout_width="0dip"
- android:layout_height="wrap_content"
- android:layout_weight="1">
- <LinearLayout android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:addStatesFromChildren="true"
- android:gravity="center_vertical"
- android:layout_gravity="center_vertical">
-
- <TextView style="@style/RecipientComposeHeading"
- android:text="@string/to"
- android:id="@+id/to_label"
- android:contentDescription="@string/to"/>
-
- <com.android.ex.chips.RecipientEditTextView
- android:id="@+id/to"
- style="@style/RecipientEditTextViewStyle"
- android:contentDescription="@string/to"/>
- </LinearLayout>
-
- <View style="@style/RecipientComposeFieldSpacer"/>
- </LinearLayout>
- <RelativeLayout
- android:layout_width="@dimen/compose_area_end_padding"
- android:layout_height="wrap_content"
- android:layout_column="2"
- 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>
- </TableRow>
- <TableRow
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- style="@style/ComposeRowStyle" >
- <com.android.mail.compose.CcBccView
- android:id="@+id/cc_bcc_wrapper"
- style="@style/FillRowStyle"/>
- </TableRow>
- <TableRow
- android:layout_width="match_parent"
- android:layout_height="wrap_content">
- <RelativeLayout
- android:id="@+id/subject_wrapper"
- style="@style/ComposeFieldLayout"
- 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. -->
- <com.android.mail.compose.EnterSubject android:id="@+id/subject"
- style="@style/ComposeSubjectView" />
- </RelativeLayout>
- <RelativeLayout android:id="@+id/add_attachment"
- style="@style/AttachmentButtonStyle"
- android:layout_column="2"
- android:clickable="true"
- android:focusable="true">
- <ImageView
- android:contentDescription="@string/attach_file_content_description"
- android:src="@drawable/ic_attach"
- 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"
- style="@style/ComposeRowStyle" >
- <!-- Compose Area -->
- <FrameLayout
- android:id="@+id/compose_wrapper"
- style="@style/FillRowStyle">
- <include layout="@layout/compose_body"/>
- </FrameLayout>
- </TableRow>
- <TableRow
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- style="@style/ComposeRowStyle" >
- <!-- Attachments -->
- <com.android.mail.compose.AttachmentsView android:id="@+id/attachments"
- android:orientation="vertical"
- android:layout_marginTop="8dip"
- android:animateLayoutChanges="true"
- android:paddingTop="2dip"
- android:paddingBottom="0dip"
- android:visibility="gone"
- style="@style/FillRowStyle">
- <include layout="@layout/compose_attachments" />
- </com.android.mail.compose.AttachmentsView>
- </TableRow>
- <TableRow
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- style="@style/ComposeRowStyle" >
- <!-- Quoted text -->
- <com.android.mail.compose.QuotedTextView android:id="@+id/quoted_text_view"
- android:layout_height="wrap_content"
- android:visibility="gone"
- style="@style/FillRowStyle"/>
- </TableRow>
- <TableRow
- android:layout_width="match_parent"
- android:layout_height="wrap_content">
- <FrameLayout
- android:id="@+id/composearea_tap_trap_bottom"
- style="@style/FillRowStyle"
- android:clickable="true"/>
- </TableRow>
-
- </TableLayout>
-
- </ScrollView>
-</FrameLayout>
diff --git a/res/layout/cc_bcc_view.xml b/res/layout/cc_bcc_view.xml
index acc957b..f1693e7 100644
--- a/res/layout/cc_bcc_view.xml
+++ b/res/layout/cc_bcc_view.xml
@@ -15,60 +15,65 @@
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:layout_width="match_parent">
+ android:orientation="vertical">
- <LinearLayout style="@style/RecipientComposeFieldLayout"
+ <LinearLayout
android:id="@+id/cc_content"
- android:visibility="gone"
android:alpha="0"
- android:layout_alignParentTop="true">
+ android:visibility="gone"
+ style="@style/RecipientComposeFieldLayout">
- <LinearLayout android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:addStatesFromChildren="true"
- android:gravity="center_vertical">
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ style="@style/ComposeFieldContent">
<TextView
- style="@style/RecipientComposeHeading"
- android:text="@string/cc"
android:id="@+id/cc_label"
- android:contentDescription="@string/cc"/>
+ android:contentDescription="@string/cc"
+ android:text="@string/cc"
+ style="@style/RecipientComposeHeading" />
<com.android.ex.chips.RecipientEditTextView
android:id="@+id/cc"
- style="@style/RecipientEditTextViewStyle"
- android:contentDescription="@string/cc"/>
+ android:contentDescription="@string/cc"
+ style="@style/RecipientEditTextViewStyle" />
+
</LinearLayout>
- <View style="@style/RecipientComposeFieldSpacer"/>
+ <View style="@style/RecipientComposeFieldSpacer" />
+
</LinearLayout>
- <LinearLayout style="@style/RecipientComposeFieldLayout"
+ <LinearLayout
android:id="@+id/bcc_content"
- android:visibility="gone"
android:alpha="0"
- android:layout_below="@id/cc_content">
+ android:visibility="gone"
+ style="@style/RecipientComposeFieldLayout">
- <LinearLayout android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:addStatesFromChildren="true"
- android:gravity="center_vertical">
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ style="@style/ComposeFieldContent">
- <TextView style="@style/RecipientComposeHeading"
- android:text="@string/bcc"
+ <TextView
android:id="@+id/bcc_label"
- android:contentDescription="@string/bcc"/>
+ android:contentDescription="@string/bcc"
+ android:text="@string/bcc"
+ style="@style/RecipientComposeHeading" />
<com.android.ex.chips.RecipientEditTextView
android:id="@+id/bcc"
- style="@style/RecipientEditTextViewStyle"
- android:contentDescription="@string/bcc"/>
+ android:contentDescription="@string/bcc"
+ style="@style/RecipientEditTextViewStyle" />
</LinearLayout>
- <View style="@style/RecipientComposeFieldSpacer"/>
+ <View style="@style/RecipientComposeFieldSpacer" />
+
</LinearLayout>
-</RelativeLayout>
+</LinearLayout>
diff --git a/res/layout/compose.xml b/res/layout/compose.xml
index 7e8652b..4ca2ef5 100644
--- a/res/layout/compose.xml
+++ b/res/layout/compose.xml
@@ -16,76 +16,91 @@
limitations under the License.
-->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
android:layout_height="match_parent"
- android:layout_width="match_parent">
- <include layout="@layout/wait_fragment"/>
- <LinearLayout
- android:layout_height="match_parent"
+ android:background="@color/holo_light_background_color"
+ style="@style/ComposeAreaWrapper">
+
+ <include layout="@layout/wait_fragment" />
+
+ <ScrollView
+ android:id="@+id/compose"
android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:fillViewport="true"
android:orientation="vertical"
- android:background="@android:color/white"
- android:visibility="gone"
- android:id="@+id/compose">
+ android:visibility="gone">
- <ScrollView
- android:id="@+id/compose_scrollview"
- android:fillViewport="true"
- android:layout_height="0dip"
- android:layout_weight="1"
- android:layout_width="match_parent">
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
- <LinearLayout android:id="@+id/content"
- android:orientation="vertical"
- android:layout_width="match_parent"
+ <!-- Start border -->
+ <Space
+ android:layout_width="0dp"
android:layout_height="match_parent"
- android:animateLayoutChanges="true"
- android:paddingLeft="16dip"
- android:paddingRight="16dip">
+ android:layout_weight="@integer/compose_padding_weight" />
- <include layout="@layout/compose_from"/>
+ <!-- Main compose content -->
+ <LinearLayout
+ android:id="@+id/content"
+ android:orientation="vertical"
+ style="@style/ComposeArea">
- <LinearLayout android:layout_height="wrap_content"
- android:layout_width="match_parent"
- android:orientation="vertical">
+ <!-- From -->
+ <include layout="@layout/compose_from" />
- <include layout="@layout/compose_recipients"/>
+ <!-- To/Cc/Bcc -->
+ <include layout="@layout/compose_recipients" />
- <include layout="@layout/compose_subject"/>
- </LinearLayout>
+ <!-- Subject -->
+ <include layout="@layout/compose_subject" />
<!-- Body -->
- <include layout="@layout/compose_body"/>
+ <include layout="@layout/compose_body" />
<!-- Attachments -->
- <com.android.mail.compose.AttachmentsView android:id="@+id/attachments"
- android:layout_height="wrap_content"
+ <com.android.mail.compose.AttachmentsView
+ android:id="@+id/attachments"
android:layout_width="match_parent"
- android:orientation="vertical"
+ android:layout_height="wrap_content"
android:animateLayoutChanges="true"
+ android:focusable="true"
+ android:orientation="vertical"
android:paddingTop="8dip"
android:paddingRight="5dip"
android:paddingBottom="0dip"
android:paddingLeft="5dip"
- android:visibility="gone"
- android:focusable="true">
+ android:visibility="gone">
+
<include layout="@layout/compose_attachments" />
+
</com.android.mail.compose.AttachmentsView>
<!-- Quoted text -->
- <com.android.mail.compose.QuotedTextView android:id="@+id/quoted_text_view"
- android:layout_height="wrap_content"
+ <com.android.mail.compose.QuotedTextView
+ android:id="@+id/quoted_text_view"
android:layout_width="match_parent"
+ android:layout_height="wrap_content"
android:visibility="gone" />
- <View android:id="@+id/composearea_tap_trap_bottom"
- android:clickable="true"
+ <View
+ android:id="@+id/composearea_tap_trap_bottom"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:background="@color/compose_background_color"/>
+ android:background="@color/compose_background_color"
+ android:clickable="true" />
</LinearLayout>
- </ScrollView>
+ <!-- End border -->
+ <Space
+ android:layout_width="0dp"
+ android:layout_height="match_parent"
+ android:layout_weight="@integer/compose_padding_weight" />
- </LinearLayout>
+ </LinearLayout>
+
+ </ScrollView>
+
</FrameLayout>
\ No newline at end of file
diff --git a/res/layout/compose_body.xml b/res/layout/compose_body.xml
index 38ee736..e2fee76 100644
--- a/res/layout/compose_body.xml
+++ b/res/layout/compose_body.xml
@@ -16,13 +16,22 @@
limitations under the License.
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_height="wrap_content"
- android:layout_width="match_parent"
android:id="@+id/body_wrapper"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
style="@style/ComposeFieldLayout">
- <com.android.mail.compose.BodyView android:id="@+id/body"
- android:hint="@string/body_hint"
- style="@style/ComposeBodyView" />
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ style="@style/ComposeFieldContent">
+
+ <com.android.mail.compose.BodyView
+ android:id="@+id/body"
+ android:background="@null"
+ android:hint="@string/body_hint"
+ style="@style/ComposeBodyView" />
+
+ </LinearLayout>
</RelativeLayout>
\ No newline at end of file
diff --git a/res/layout/compose_from.xml b/res/layout/compose_from.xml
index 8fa5622..51953e5 100644
--- a/res/layout/compose_from.xml
+++ b/res/layout/compose_from.xml
@@ -15,40 +15,65 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_marginTop="4dip"
- android:layout_height="48dip">
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ style="@style/RecipientComposeFieldLayout">
- <!-- From spinner -->
- <LinearLayout android:id="@+id/spinner_from_content"
- style="@style/RecipientComposeFieldLayout"
- android:background="@android:color/transparent"
+ <LinearLayout
+ android:layout_width="match_parent"
android:layout_height="match_parent"
- android:visibility="gone">
+ style="@style/ComposeFieldContent">
- <com.android.mail.compose.FromAddressSpinner
- android:id="@+id/from_picker"
- android:layout_width="match_parent"
- android:layout_height="match_parent"/>
+ <TextView
+ android:id="@+id/from_label"
+ android:contentDescription="@string/from"
+ android:text="@string/from"
+ style="@style/RecipientComposeHeading" />
- </LinearLayout>
-
- <!-- static From -->
- <LinearLayout android:id="@+id/static_from_content"
- style="@style/RecipientComposeFieldLayout"
- android:layout_height="match_parent">
-
- <TextView android:id="@+id/from_account_name"
- android:layout_width="match_parent"
+ <FrameLayout
+ android:layout_width="0dp"
android:layout_height="match_parent"
- android:gravity="center_vertical"
- android:singleLine="true"
- android:ellipsize="end"
- android:textAlignment="viewStart"
- android:textSize="18sp"
- android:background="@android:color/transparent" />
+ android:layout_weight="1">
+
+ <!-- From spinner -->
+ <LinearLayout
+ android:id="@+id/spinner_from_content"
+ android:layout_height="match_parent"
+ android:background="@android:color/transparent"
+ android:visibility="gone"
+ style="@style/RecipientComposeFieldLayout">
+
+ <com.android.mail.compose.FromAddressSpinner
+ android:id="@+id/from_picker"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:background="@null" />
+
+ </LinearLayout>
+
+ <!-- static From -->
+ <LinearLayout
+ android:id="@+id/static_from_content"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <TextView
+ android:id="@+id/from_account_name"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:background="@android:color/transparent"
+ android:ellipsize="end"
+ android:gravity="center_vertical"
+ android:singleLine="true"
+ android:textAlignment="viewStart"
+ android:textColor="@color/compose_user_text"
+ android:textSize="@dimen/compose_header_text_size" />
+
+ </LinearLayout>
+
+ </FrameLayout>
</LinearLayout>
-</FrameLayout>
+ <View style="@style/RecipientComposeFieldSpacer" />
+
+</LinearLayout>
diff --git a/res/layout/compose_recipients.xml b/res/layout/compose_recipients.xml
index 4211a0b..ed259cf 100644
--- a/res/layout/compose_recipients.xml
+++ b/res/layout/compose_recipients.xml
@@ -15,41 +15,48 @@
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/compose_recipients_wrapper"
android:layout_width="match_parent"
- android:layout_height="wrap_content">
+ android:layout_height="wrap_content"
+ android:orientation="vertical">
<!-- To -->
-
- <LinearLayout android:id="@+id/to_content"
+ <LinearLayout
+ android:id="@+id/to_content"
style="@style/RecipientComposeFieldLayout">
- <LinearLayout android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:addStatesFromChildren="true"
- android:gravity="center_vertical"
- android:layout_gravity="center_vertical">
- <TextView style="@style/RecipientComposeHeading"
- android:text="@string/to"
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ style="@style/ComposeFieldContent">
+
+ <TextView
android:id="@+id/to_label"
- android:contentDescription="@string/to"/>
+ android:contentDescription="@string/to"
+ android:text="@string/to"
+ style="@style/RecipientComposeHeading" />
<com.android.ex.chips.RecipientEditTextView
android:id="@+id/to"
- style="@style/RecipientEditTextViewStyle"
- android:contentDescription="@string/to"/>
+ android:contentDescription="@string/to"
+ style="@style/ToRecipientEditTextViewStyle" />
+
+ <ImageView
+ android:id="@+id/add_cc_bcc"
+ android:src="@drawable/ic_forward_24dp"
+ android:contentDescription="@string/add_cc_label"
+ style="@style/ComposeFieldButton" />
</LinearLayout>
- <View style="@style/RecipientComposeFieldSpacer"/>
+ <View style="@style/RecipientComposeFieldSpacer" />
</LinearLayout>
-
+ <!-- Cc/Bcc -->
<com.android.mail.compose.CcBccView
- android:layout_height="wrap_content"
- android:layout_width="match_parent"
android:id="@+id/cc_bcc_wrapper"
- android:layout_below="@id/to_content" />
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content" />
-</RelativeLayout>
+</LinearLayout>
diff --git a/res/layout/compose_subject.xml b/res/layout/compose_subject.xml
index f1b16ef..6a8d520 100644
--- a/res/layout/compose_subject.xml
+++ b/res/layout/compose_subject.xml
@@ -15,10 +15,27 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- style="@style/ComposeFieldLayout"
- android:layout_below="@id/cc_bcc_wrapper">
- <!-- 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>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/subject_content"
+ style="@style/RecipientComposeFieldLayout">
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ style="@style/ComposeFieldContent">
+
+ <RelativeLayout
+ style="@style/ComposeFieldLayout">
+
+ <!-- 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>
+
+ </LinearLayout>
+
+ <View style="@style/RecipientComposeFieldSpacer"/>
+
+</LinearLayout>
diff --git a/res/layout/custom_from_item.xml b/res/layout/custom_from_item.xml
index 083e96f..4e84285 100644
--- a/res/layout/custom_from_item.xml
+++ b/res/layout/custom_from_item.xml
@@ -17,26 +17,31 @@
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_height="wrap_content"
android:layout_width="match_parent"
- android:orientation="horizontal"
- android:paddingLeft="6dip"
- android:paddingRight="6dip">
+ android:layout_height="@dimen/compose_header_min_height"
+ android:orientation="horizontal">
- <TextView android:id="@+id/spinner_account_name"
+ <TextView
+ android:id="@+id/spinner_account_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:singleLine="true"
android:ellipsize="end"
+ android:singleLine="true"
android:textAlignment="viewStart"
- android:textAppearance="?android:attr/textAppearanceMedium"/>
+ android:textAppearance="?android:attr/textAppearanceMedium" />
- <TextView android:id="@+id/spinner_account_address"
- android:layout_width="wrap_content"
+ <TextView
+ android:id="@+id/spinner_account_address"
+ android:layout_width="0dp"
android:layout_height="wrap_content"
- android:singleLine="true"
+ android:layout_weight="1"
android:ellipsize="end"
+ android:singleLine="true"
android:textAlignment="viewStart"
style="@style/SpinnerAccountAddressStyle" />
+ <ImageView
+ android:src="@drawable/ic_forward_24dp"
+ style="@style/ComposeFieldButton" />
+
</LinearLayout>
diff --git a/res/layout/from_item.xml b/res/layout/from_item.xml
index 574fc9c..2748625 100644
--- a/res/layout/from_item.xml
+++ b/res/layout/from_item.xml
@@ -15,14 +15,23 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<TextView xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/spinner_account_address"
- android:layout_width="wrap_content"
- android:layout_height="48dip"
- android:singleLine="true"
- android:ellipsize="end"
- android:textAlignment="viewStart"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:paddingLeft="8dip"
- android:paddingRight="8dip"
- android:gravity="center_vertical"/>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/compose_header_min_height">
+
+ <TextView
+ android:id="@+id/spinner_account_address"
+ android:layout_width="0dp"
+ android:layout_height="match_parent"
+ android:layout_weight="1"
+ android:ellipsize="end"
+ android:gravity="center_vertical"
+ android:singleLine="true"
+ android:textAlignment="viewStart"
+ android:textAppearance="?android:attr/textAppearanceMedium" />
+
+ <ImageView
+ android:src="@drawable/ic_forward_24dp"
+ style="@style/ComposeFieldButton" />
+
+</LinearLayout>
diff --git a/res/values-land/dimen.xml b/res/values-land/dimen.xml
index 96d5317..68e7805 100644
--- a/res/values-land/dimen.xml
+++ b/res/values-land/dimen.xml
@@ -16,8 +16,6 @@
limitations under the License.
-->
<resources>
- <dimen name="compose_scrollview_width">800dp</dimen>
-
<dimen name="empty_view_text_width">380dip</dimen>
<dimen name="empty_view_space">8dip</dimen>
</resources>
diff --git a/res/values-land/styles.xml b/res/values-land/styles.xml
index bae26ef..cf06296 100644
--- a/res/values-land/styles.xml
+++ b/res/values-land/styles.xml
@@ -18,22 +18,22 @@
<resources>
<!-- Compose styles -->
<style name="ComposeEditTextView">
- <item name="android:minHeight">40dip</item>
- <item name="android:layout_gravity">center_vertical</item>
- <item name="android:layout_height">wrap_content</item>
<item name="android:layout_width">match_parent</item>
+ <item name="android:layout_height">wrap_content</item>
+ <item name="android:layout_gravity">center_vertical</item>
<item name="android:background">@null</item>
+ <item name="android:minHeight">@dimen/compose_header_min_height</item>
</style>
<style name="ComposeFieldLayout" parent="@style/ComposeFieldLayoutBase">
- <item name="android:layout_height">wrap_content</item>
<item name="android:layout_width">match_parent</item>
+ <item name="android:layout_height">wrap_content</item>
<item name="android:addStatesFromChildren">true</item>
<item name="android:focusable">false</item>
<item name="android:focusableInTouchMode">false</item>
<item name="android:gravity">center_vertical</item>
- <item name="android:minHeight">38dip</item>
- <item name="android:paddingTop">0dip</item>
+ <item name="android:minHeight">@dimen/compose_header_min_height</item>
+ <item name="android:paddingTop">0dp</item>
</style>
<!-- End compose styles -->
diff --git a/res/values-ldrtl/styles-ldrtl.xml b/res/values-ldrtl/styles-ldrtl.xml
index d7b5d22..b412a73 100644
--- a/res/values-ldrtl/styles-ldrtl.xml
+++ b/res/values-ldrtl/styles-ldrtl.xml
@@ -244,9 +244,8 @@
<item name="android:layout_marginEnd">@dimen/message_attachment_bar_padding</item>
</style>
- <style name="RecipientComposeHeading" parent="@style/AbstractRecipientComposeHeading">
+ <style name="RecipientComposeHeading" parent="@style/ComposeHeading">
<item name="android:paddingStart">0dip</item>
- <item name="android:layout_marginEnd">@dimen/compose_recipient_heading_margin_end</item>
</style>
<style name="WidgetSendersStyle">
@@ -380,9 +379,6 @@
<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>
@@ -390,6 +386,21 @@
<item name="android:paddingEnd">@dimen/compose_attachment_tile_text_end_padding</item>
</style>
+ <style name="ComposeFieldContent">
+ <item name="android:paddingStart">@dimen/compose_content_start_padding</item>
+ <item name="android:paddingEnd">@dimen/compose_content_end_padding</item>
+ </style>
+
+ <style name="ComposeFieldButton" parent="@style/BaseComposeFieldButton">
+ <!--
+ hardcoded values here because the paddings depend on the exact values.
+ The height should correspond to @dimen/compose_header_min_height.
+ This is solely to increase click target of these buttons.
+ -->
+ <item name="android:layout_marginStart">@dimen/compose_header_btn_padding</item>
+ <item name="android:paddingStart">12dp</item>
+ </style>
+
<style name="FolderTeaserMarginStartStyle" parent="FolderTeaserVerticalMarginStyle">
<item name="android:layout_marginStart">@dimen/folder_teaser_horizontal_padding</item>
</style>
diff --git a/res/values-sw600dp-land/constants.xml b/res/values-sw600dp-land/constants.xml
index a40c958..7d9fb02 100644
--- a/res/values-sw600dp-land/constants.xml
+++ b/res/values-sw600dp-land/constants.xml
@@ -19,4 +19,7 @@
<bool name="list_collapsible">false</bool>
<!-- Whether to show single or 2 pane search results -->
<bool name="show_two_pane_search_results">true</bool>
+
+ <!-- Used to force 70% of max width in compose for landscape tablet -->
+ <integer name="compose_padding_weight">15</integer>
</resources>
diff --git a/res/values-sw600dp-land/dimen.xml b/res/values-sw600dp-land/dimen.xml
index 6e4a066..cf97bdb 100644
--- a/res/values-sw600dp-land/dimen.xml
+++ b/res/values-sw600dp-land/dimen.xml
@@ -16,9 +16,6 @@
limitations under the License.
-->
<resources>
- <dimen name="compose_scrollview_width">800dip</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 a3574db..bc87026 100644
--- a/res/values-sw600dp-land/styles.xml
+++ b/res/values-sw600dp-land/styles.xml
@@ -17,6 +17,8 @@
-->
<resources>
<style name="ComposeArea" parent="AbstractComposeArea">
- <item name="android:layout_width">@dimen/compose_scrollview_width</item>
+ <item name="android:layout_width">0dp</item>
+ <item name="android:layout_weight">70</item>
+ <item name="android:maxWidth">@dimen/compose_scrollview_max_width</item>
</style>
</resources>
diff --git a/res/values-sw600dp/dimen.xml b/res/values-sw600dp/dimen.xml
index 855e5e6..046da83 100644
--- a/res/values-sw600dp/dimen.xml
+++ b/res/values-sw600dp/dimen.xml
@@ -33,8 +33,12 @@
<dimen name="attachment_tile_max_size">254dp</dimen>
<dimen name="wait_padding">32dp</dimen>
- <dimen name="compose_area_start_padding">80dip</dimen>
- <dimen name="compose_area_end_padding">80dip</dimen>
+ <dimen name="compose_wrapper_top_padding">16dp</dimen>
+ <dimen name="compose_wrapper_side_padding">24dp</dimen>
+ <dimen name="compose_area_start_padding">32dp</dimen>
+ <dimen name="compose_area_end_padding">32dp</dimen>
+ <dimen name="compose_content_start_padding">8dp</dimen>
+ <dimen name="compose_content_end_padding">8dp</dimen>
<dimen name="search_view_width">400dip</dimen>
<dimen name="spinner_frame_width">170dp</dimen>
diff --git a/res/values-sw600dp/styles.xml b/res/values-sw600dp/styles.xml
index e79369a..0cc8753 100644
--- a/res/values-sw600dp/styles.xml
+++ b/res/values-sw600dp/styles.xml
@@ -23,10 +23,6 @@
<item name="android:layout_width">@dimen/spinner_frame_width</item>
</style>
- <style name="ComposeArea" parent="AbstractComposeArea">
- <item name="android:layout_width">match_parent</item>
- </style>
-
<style name="ShortcutWidgetTheme" parent="@android:style/Theme.Holo.Light.Dialog.MinWidth">
<item name="android:actionOverflowButtonStyle">@style/ActionBarOverflowButtonStyle</item>
<item name="android:homeAsUpIndicator">@drawable/ic_up_holo_light</item>
diff --git a/res/values-sw720dp-land/dimen.xml b/res/values-sw720dp-land/dimen.xml
index c85ecb1..3358b08 100644
--- a/res/values-sw720dp-land/dimen.xml
+++ b/res/values-sw720dp-land/dimen.xml
@@ -16,6 +16,5 @@
limitations under the License.
-->
<resources>
- <dimen name="compose_scrollview_width">900dip</dimen>
<dimen name="spinner_frame_width">260dip</dimen>
</resources>
\ No newline at end of file
diff --git a/res/values-sw800dp-land/dimen.xml b/res/values-sw800dp-land/dimen.xml
deleted file mode 100644
index 29544f9..0000000
--- a/res/values-sw800dp-land/dimen.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2012 Google Inc.
- Licensed to The Android Open Source Project.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<resources>
- <!--Manta b/7382467-->
- <dimen name="compose_scrollview_width">848dip</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-v21/styles.xml b/res/values-v21/styles.xml
index 9866d87..546220e 100644
--- a/res/values-v21/styles.xml
+++ b/res/values-v21/styles.xml
@@ -57,7 +57,7 @@
<style name="CustomActionButtonBase" parent="android:style/Widget.Material.Light.ActionButton" />
- <style name="ComposeFieldLayoutBase" parent="android:Widget.Material.Light.EditText" />
+ <style name="ComposeFieldLayoutBase" />
<style name="AccountSpinnerAnchorTextPrimary" parent="@android:style/TextAppearance.Material.Widget.ActionBar.Title" />
diff --git a/res/values/colors.xml b/res/values/colors.xml
index 18bbd18..602f078 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -53,8 +53,11 @@
<color name="separator_color">#b2b2b2</color>
<!-- Compose colors -->
- <color name="compose_label_text">#aaaaaa</color>
+ <color name="compose_label_text">@color/text_color_grey</color>
+ <color name="compose_user_text">@color/text_color_black</color>
+ <color name="compose_label_hint">@color/light_gray</color>
<color name="quoted_text_color">@color/gray_text_color</color>
+ <color name="compose_divider_color">@color/light_gray</color>
<string name="quoted_text_background_color_string" translatable="false">@android:color/white</string>
<!-- Must match the quoted_text_background_color_string -->
<color name="compose_background_color">@android:color/white</color>
diff --git a/res/values/constants.xml b/res/values/constants.xml
index ded9b00..73ebde3 100644
--- a/res/values/constants.xml
+++ b/res/values/constants.xml
@@ -115,4 +115,7 @@
<!-- Indicates whether help URLs should be opened by a system browser outside the application or with a webview inside the application -->
<bool name="openHelpWithBrowser">true</bool>
+
+ <!-- Used to force 70% of max width in compose for landscape tablet -->
+ <integer name="compose_padding_weight">0</integer>
</resources>
diff --git a/res/values/dimen.xml b/res/values/dimen.xml
index 6f98778..02c4a62 100644
--- a/res/values/dimen.xml
+++ b/res/values/dimen.xml
@@ -25,7 +25,7 @@
<dimen name="folders_text_bottom_padding">4dip</dimen>
<dimen name="attachment_tile_min_size">120dp</dimen>
<dimen name="attachment_tile_max_size">164dp</dimen>
- <dimen name="compose_scrollview_width">700dp</dimen>
+ <dimen name="compose_scrollview_max_width">768dp</dimen>
<dimen name="color_block_width">32dip</dimen>
<dimen name="color_block_height">6dip</dimen>
<!-- The star is pretty small and does not have padding anymore, so the slop needs to be bigger-->
@@ -143,8 +143,6 @@
<dimen name="message_attachment_bar_padding">8dip</dimen>
- <dimen name="compose_recipient_heading_margin_end">4dip</dimen>
-
<dimen name="widget_senders_padding_end">16dip</dimen>
<dimen name="widget_attachment_padding_end">8dp</dimen>
@@ -205,4 +203,14 @@
<dimen name="wearable_background_width">320dp</dimen>
<!-- The height of the wearable image background. -->
<dimen name="wearable_background_height">320dp</dimen>
+
+ <dimen name="compose_wrapper_top_padding">0dp</dimen>
+ <dimen name="compose_wrapper_side_padding">0dp</dimen>
+ <dimen name="compose_header_btn_padding">8dp</dimen>
+ <dimen name="compose_header_min_height">56dp</dimen>
+ <dimen name="compose_header_text_size">16sp</dimen>
+ <dimen name="compose_area_start_padding">0dp</dimen>
+ <dimen name="compose_area_end_padding">0dp</dimen>
+ <dimen name="compose_content_start_padding">16dp</dimen>
+ <dimen name="compose_content_end_padding">16dp</dimen>
</resources>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index c3671da..fa5f336 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -31,6 +31,8 @@
<string name="app_name" translatable="false">Unified Email</string>
<!-- Compose -->
+ <!-- Shown in Compose; the sender of the message [CHAR LIMIT=10] -->
+ <string name="from">From</string>
<!-- Shown in Compose; the recipient(s) of the message [CHAR LIMIT=10] -->
<string name="to">To</string>
<!-- Shown in Compose; the cc recipient(s) of the message [CHAR LIMIT=10] -->
diff --git a/res/values/styles.xml b/res/values/styles.xml
index aa8ae00..9a5a666 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -18,66 +18,72 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Compose Styles -->
<style name="RecipientEditTextViewStyle" parent="@style/RecipientEditTextView">
- <item name="android:minHeight">42dip</item>
- <item name="android:gravity">bottom</item>
+ <item name="android:gravity">center_vertical</item>
+ <item name="android:minHeight">@dimen/compose_header_min_height</item>
<item name="android:maxLines">@integer/chips_max_lines</item>
+ <item name="android:paddingLeft">0dp</item>
+ <item name="android:paddingRight">0dp</item>
+ <item name="android:textColor">@color/compose_user_text</item>
+ <item name="android:textSize">@dimen/compose_header_text_size</item>
+ </style>
+
+ <style name="ToRecipientEditTextViewStyle" parent="@style/RecipientEditTextViewStyle">
+ <item name="android:layout_width">0dp</item>
+ <item name="android:layout_weight">1</item>
</style>
<style name="ComposeEditTextView">
- <item name="android:minHeight">40dip</item>
- <item name="android:layout_gravity">center_vertical</item>
- <item name="android:layout_height">wrap_content</item>
<item name="android:layout_width">match_parent</item>
+ <item name="android:layout_height">wrap_content</item>
+ <item name="android:layout_gravity">center_vertical</item>
<item name="android:background">@null</item>
+ <item name="android:minHeight">@dimen/compose_header_min_height</item>
</style>
<style name="ComposeSubjectView" parent="@style/ComposeEditTextView">
- <item name="android:inputType">textEmailSubject|textAutoCorrect|textCapSentences|textImeMultiLine|textMultiLine</item>
<item name="android:hint">@string/subject_hint</item>
- <item name="android:textColorHint">@color/compose_label_text</item>
<item name="android:imeOptions">actionDone|flagNoExtractUi|flagNoFullscreen</item>
+ <item name="android:inputType">textEmailSubject|textAutoCorrect|textCapSentences|textImeMultiLine|textMultiLine</item>
+ <item name="android:textColorHint">@color/compose_label_hint</item>
</style>
<style name="ComposeBodyView" parent="@style/ComposeEditTextView">
- <item name="android:textColorHint">@color/compose_label_text</item>
- <item name="android:inputType">textLongMessage|textMultiLine|textAutoCorrect|textCapSentences</item>
+ <item name="android:layout_gravity">top</item>
<item name="android:imeOptions">flagNoFullscreen|actionDone|flagNoEnterAction</item>
+ <item name="android:inputType">textLongMessage|textMultiLine|textAutoCorrect|textCapSentences</item>
+ <item name="android:textColorHint">@color/compose_label_hint</item>
</style>
<style name="RecipientComposeFieldSpacer">
<item name="android:layout_width">match_parent</item>
- <item name="android:layout_height">4dip</item>
+ <item name="android:layout_height">1dp</item>
+ <item name="android:background">@color/compose_divider_color</item>
</style>
<style name="ComposeHeading">
- <item name="android:layout_width">wrap_content</item>
- <item name="android:layout_height">wrap_content</item>
- <item name="android:textAppearance">?android:attr/textAppearanceMedium</item>
- <item name="android:textColor">@color/compose_label_text</item>
- <item name="android:paddingLeft">8dip</item>
+ <item name="android:layout_width">56dp</item>
+ <item name="android:layout_height">@dimen/compose_header_min_height</item>
<item name="android:layout_gravity">center_vertical</item>
+ <item name="android:gravity">center_vertical</item>
+ <item name="android:textColor">@color/compose_label_text</item>
+ <item name="android:textSize">@dimen/compose_header_text_size</item>
</style>
- <style name="AbstractRecipientComposeHeading" parent="@style/ComposeHeading">
- <item name="android:layout_marginTop">4dip</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 name="RecipientComposeHeading" parent="@style/ComposeHeading">
+ <item name="android:paddingLeft">0dp</item>
</style>
- <style name="ComposeFieldLayoutBase" parent="android:Widget.Holo.Light.EditText" />
+ <style name="ComposeFieldLayoutBase" />
<style name="ComposeFieldLayout" parent="@style/ComposeFieldLayoutBase">
- <item name="android:addStatesFromChildren">true</item>
- <item name="android:focusable">false</item>
- <item name="android:focusableInTouchMode">false</item>
- <item name="android:orientation">horizontal</item>
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
- <item name="android:minHeight">48dip</item>
+ <item name="android:addStatesFromChildren">true</item>
<item name="android:clickable">true</item>
+ <item name="android:focusable">false</item>
+ <item name="android:focusableInTouchMode">false</item>
+ <item name="android:minHeight">@dimen/compose_header_min_height</item>
+ <item name="android:orientation">horizontal</item>
</style>
<style name="RecipientComposeFieldLayout" parent="@style/ComposeFieldLayout">
@@ -85,15 +91,28 @@
<item name="android:paddingTop">0dip</item>
</style>
- <style name="ComposeButton">
- <item name="android:padding">0dip</item>
+ <style name="ComposeFieldContent">
+ <item name="android:paddingLeft">@dimen/compose_content_start_padding</item>
+ <item name="android:paddingRight">@dimen/compose_content_end_padding</item>
+ </style>
+
+ <style name="BaseComposeFieldButton">
+ <item name="android:layout_width">44dp</item>
+ <item name="android:layout_height">56dp</item>
+ <item name="android:layout_gravity">center_vertical</item>
<item name="android:background">?android:attr/selectableItemBackground</item>
- <item name="android:layout_width">wrap_content</item>
- <item name="android:layout_height">wrap_content</item>
- <item name="android:textSize">12sp</item>
- <item name="android:textColor">#777777</item>
- <item name="android:textStyle">bold</item>
- <item name="android:textAllCaps">true</item>
+ <item name="android:paddingTop">12dp</item>
+ <item name="android:paddingBottom">12dp</item>
+ </style>
+
+ <style name="ComposeFieldButton" parent="@style/BaseComposeFieldButton">
+ <!--
+ hardcoded values here because the paddings depend on the exact values.
+ The height should correspond to @dimen/compose_header_min_height.
+ This is solely to increase click target of these buttons.
+ -->
+ <item name="android:layout_marginLeft">@dimen/compose_header_btn_padding</item>
+ <item name="android:paddingLeft">12dp</item>
</style>
<style name="AttachmentContainer">
@@ -964,11 +983,22 @@
</style>
<style name="AbstractComposeArea">
+ <item name="android:layout_width">match_parent</item>
+ <item name="android:layout_height">match_parent</item>
+ <item name="android:layout_gravity">center_horizontal</item>
+ <item name="android:animateLayoutChanges">true</item>
+ <item name="android:background">@android:color/white</item>
<item name="android:paddingLeft">@dimen/compose_area_start_padding</item>
+ <item name="android:paddingRight">@dimen/compose_area_end_padding</item>
</style>
- <style name="ComposeRowStyle">
- <item name="android:paddingRight">@dimen/compose_area_end_padding</item>
+ <style name="ComposeArea" parent="AbstractComposeArea" />
+
+ <style name="ComposeAreaWrapper">
+ <item name="android:layout_gravity">center_horizontal</item>
+ <item name="android:paddingLeft">@dimen/compose_wrapper_side_padding</item>
+ <item name="android:paddingRight">@dimen/compose_wrapper_side_padding</item>
+ <item name="android:paddingTop">@dimen/compose_wrapper_top_padding</item>
</style>
<style name="ComposeAttachmentTileTextEndStyle">