Vertically center checkboxes for phones with first line of subject.
Fixes b/5521010 conversation list items: checkbox not centered
Fixes b/5591310 Email crashed twice while trying to compose an email in POP/Exchange
Change-Id: I8a6bd28add83ee32906274d730d222ea75c44cb1
diff --git a/res/layout/message_compose.xml b/res/layout/message_compose.xml
index 498da5a..e2c035e 100644
--- a/res/layout/message_compose.xml
+++ b/res/layout/message_compose.xml
@@ -53,41 +53,7 @@
</LinearLayout>
<include layout="@layout/compose_body"/>
<!-- quoted text bar -->
- <RelativeLayout
- android:id="@+id/quoted_text_bar"
- android:layout_width="match_parent"
- android:layout_height="45dip"
- >
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textColor="?android:attr/textColorSecondaryInverse"
- android:text="@string/message_compose_quoted_text_label"
- android:layout_alignParentLeft="true"
- android:layout_centerVertical="true"
- />
- <CheckBox
- android:id="@+id/include_quoted_text"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_centerVertical="true"
- android:layout_alignParentRight="true"
- />
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_toLeftOf="@id/include_quoted_text"
- android:layout_centerVertical="true"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textColor="?android:attr/textColorSecondaryInverse"
- android:text="@string/message_compose_include_quoted_text_checkbox_label"
- />
- </RelativeLayout>
- <WebView android:id="@+id/quoted_text"
- android:layout_height="wrap_content"
- android:layout_width="match_parent"
- />
+ <include layout="@layout/quoted_text"/>
</LinearLayout>
</ScrollView>
</LinearLayout>
diff --git a/res/layout/message_list_item_normal.xml b/res/layout/message_list_item_normal.xml
index 016e581..2a6d24f 100644
--- a/res/layout/message_list_item_normal.xml
+++ b/res/layout/message_list_item_normal.xml
@@ -32,22 +32,23 @@
android:paddingRight="8dip"
>
<ImageView
- android:id="@+id/checkmark"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_centerVertical="true"
- android:layout_centerHorizontal="true"
- android:src="@drawable/btn_check_on_normal_holo_light"
- />
- <ImageView
android:id="@+id/reply_state"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginBottom="@dimen/message_list_icon_padding_compensation"
- android:layout_centerHorizontal="true"
- android:layout_above="@+id/checkmark"
+ android:layout_marginTop="@dimen/replystate_margin_top"
+ android:layout_marginLeft="@dimen/replystate_margin_left"
+ android:layout_alignParentTop="true"
android:src="@drawable/ic_badge_reply_holo_light"
/>
+ <ImageView
+ android:id="@+id/checkmark"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_centerHorizontal="true"
+ android:src="@drawable/btn_check_on_normal_holo_light"
+ android:layout_marginTop="@dimen/checkmark_margin_top"
+ android:layout_below="@id/reply_state"
+ />
</RelativeLayout>
<!-- No top padding, since the color chips have no padding -
@@ -71,7 +72,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
- android:layout_centerVertical="true"
+ android:layout_marginTop="@dimen/star_margin_top"
android:src="@drawable/btn_star_off_normal_email_holo_light" />
<LinearLayout
diff --git a/res/values-sw600dp/dimensions.xml b/res/values-sw600dp/dimensions.xml
index a59af43..24671b8 100644
--- a/res/values-sw600dp/dimensions.xml
+++ b/res/values-sw600dp/dimensions.xml
@@ -58,4 +58,9 @@
<dimen name="mailbox_list_padding_right">24dip</dimen>
<dimen name="mailbox_list_count_margin_left">16dip</dimen>
+ <!-- Message list items -->
+ <dimen name="replystate_margin_left">7dip</dimen>
+ <dimen name="replystate_margin_top">10sp</dimen>
+ <dimen name="checkmark_margin_top">4sp</dimen>
+ <dimen name="star_margin_top">30sp</dimen>
</resources>
diff --git a/res/values/dimensions.xml b/res/values/dimensions.xml
index 7c399ed..30ae1e8 100644
--- a/res/values/dimensions.xml
+++ b/res/values/dimensions.xml
@@ -73,4 +73,11 @@
<dimen name="mailbox_list_padding_left">8dip</dimen>
<dimen name="mailbox_list_padding_right">16dip</dimen>
<dimen name="mailbox_list_count_margin_left">8dip</dimen>
+
+ <!-- Message list items -->
+ <dimen name="replystate_margin_left">0dip</dimen>
+ <dimen name="replystate_margin_top">10sp</dimen>
+ <dimen name="checkmark_margin_top">3sp</dimen>
+ <dimen name="star_margin_top">28sp</dimen>
+
</resources>