diff options
author | Jin Cao <jinyan@google.com> | 2014-08-17 16:38:42 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-08-16 03:56:00 +0000 |
commit | c9e850dbf7b05591ed9b9e3769162f0b03311da7 (patch) | |
tree | 30e60e26bcf5b369df08bb05363b708edca7b804 | |
parent | d5ff7cd502eae841df2b38a6befc24363f01fe9a (diff) | |
parent | 57b30e63e9a51f48b4e9bfea635b9e97d873075e (diff) | |
download | android_packages_apps_UnifiedEmail-c9e850dbf7b05591ed9b9e3769162f0b03311da7.tar.gz android_packages_apps_UnifiedEmail-c9e850dbf7b05591ed9b9e3769162f0b03311da7.tar.bz2 android_packages_apps_UnifiedEmail-c9e850dbf7b05591ed9b9e3769162f0b03311da7.zip |
Merge "[Quantum] Quoted text" into ub-gmail-ur14-dev
-rw-r--r-- | res/layout/quoted_text.xml | 48 | ||||
-rw-r--r-- | res/values-ldrtl/styles-ldrtl.xml | 4 | ||||
-rw-r--r-- | res/values/colors.xml | 6 | ||||
-rw-r--r-- | res/values/dimen.xml | 3 | ||||
-rw-r--r-- | res/values/styles.xml | 10 | ||||
-rw-r--r-- | src/com/android/mail/compose/QuotedTextView.java | 7 |
6 files changed, 32 insertions, 46 deletions
diff --git a/res/layout/quoted_text.xml b/res/layout/quoted_text.xml index 0accc2922..4bde41585 100644 --- a/res/layout/quoted_text.xml +++ b/res/layout/quoted_text.xml @@ -17,57 +17,49 @@ --> <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_height="wrap_content" android:orientation="vertical"> <View android:id="@+id/upper_quotedtext_divider_bar" - android:layout_width="match_parent" - android:layout_height="2dip" - android:background="#babebe" - android:visibility="gone" /> + android:visibility="gone" + style="@style/RecipientComposeFieldSpacer" /> <LinearLayout android:id="@+id/quoted_text_button_bar" android:layout_width="match_parent" - android:layout_height="48dip" > + android:layout_height="48dp" + android:minHeight="0dp" + style="@style/ComposeFieldContent"> <CheckBox android:id="@+id/hide_quoted_text" - android:layout_width="0dip" + android:layout_width="0dp" android:layout_height="match_parent" + android:layout_gravity="center_vertical" android:layout_weight="1" android:contentDescription="@string/quoted_text" - android:drawablePadding="@dimen/quoted_text_header_padding" + android:drawablePadding="12dp" 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" /> - - <View - android:layout_width="2dip" - android:layout_height="match_parent" - android:background="#babebe" - android:layout_marginTop="12dip" - android:layout_marginBottom="12dip" - android:layout_gravity="center_vertical"/> + android:textColor="@color/compose_label_text" + android:textSize="14sp" + style="@style/QuotedTextCheckbox" /> <!-- Respond Inline --> <Button android:id="@+id/respond_inline_button" - style="@style/RespondInlineButtonStyle" + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:layout_gravity="center_vertical" + android:background="?android:attr/selectableItemBackground" android:text="@string/respond_inline" android:textAllCaps="true" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:background="?android:attr/selectableItemBackground"/> + android:textColor="@color/respond_inline_color" + android:textSize="14sp" /> </LinearLayout> <View - android:layout_width="match_parent" - android:layout_height="2dip" - android:background="#babebe" - android:id="@+id/divider_bar" /> + android:id="@+id/divider_bar" + style="@style/RecipientComposeFieldSpacer" /> <WebView android:id="@+id/quoted_text_web_view" android:layout_height="wrap_content" diff --git a/res/values-ldrtl/styles-ldrtl.xml b/res/values-ldrtl/styles-ldrtl.xml index 630598b35..363972461 100644 --- a/res/values-ldrtl/styles-ldrtl.xml +++ b/res/values-ldrtl/styles-ldrtl.xml @@ -366,6 +366,10 @@ <item name="android:layout_marginStart">@dimen/compose_header_btn_padding</item> </style> + <style name="QuotedTextCheckbox"> + <item name="android:layout_marginStart">@dimen/quoted_text_checkbox_margin_offset</item> + </style> + <style name="FolderTeaserLabelMarginStyle"> <item name="android:layout_marginStart">@dimen/folder_teaser_label_start_padding</item> <item name="android:layout_marginEnd">@dimen/folder_teaser_label_end_padding</item> diff --git a/res/values/colors.xml b/res/values/colors.xml index 19a389503..fed191201 100644 --- a/res/values/colors.xml +++ b/res/values/colors.xml @@ -59,13 +59,11 @@ <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> - <string name="quoted_text_font_color_string" translatable="false">@color/gray_text_color</string> - <color name="quotedTextColor">@color/gray_text_color</color> + <string name="quoted_text_font_color_string" translatable="false">@color/text_color_grey</string> + <color name="respond_inline_color">#00bfd8</color> <color name="conv_header_add_label_text">@android:color/black</color> <color name="conv_header_add_label_background">#eeeeee</color> diff --git a/res/values/dimen.xml b/res/values/dimen.xml index 8e6baccff..8cdbe2e28 100644 --- a/res/values/dimen.xml +++ b/res/values/dimen.xml @@ -181,8 +181,6 @@ <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_start_padding">24dp</dimen> @@ -219,6 +217,7 @@ <dimen name="compose_area_end_padding">0dp</dimen> <dimen name="compose_content_start_padding">16dp</dimen> <dimen name="compose_content_end_padding">16dp</dimen> + <dimen name="quoted_text_checkbox_margin_offset">-6dp</dimen> <dimen name="chip_wrapper_start_padding">72dp</dimen> diff --git a/res/values/styles.xml b/res/values/styles.xml index e01399c63..c90a5ba5b 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -181,14 +181,10 @@ <item name="android:layout_height">wrap_content</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 name="QuotedTextCheckbox"> + <item name="android:layout_marginLeft">@dimen/quoted_text_checkbox_margin_offset</item> </style> + <!-- End Compose styles --> <style name="UnreadCount"> diff --git a/src/com/android/mail/compose/QuotedTextView.java b/src/com/android/mail/compose/QuotedTextView.java index db35ae6a8..b46273709 100644 --- a/src/com/android/mail/compose/QuotedTextView.java +++ b/src/com/android/mail/compose/QuotedTextView.java @@ -187,13 +187,10 @@ class QuotedTextView extends LinearLayout implements OnClickListener { } private void populateData() { - String backgroundColor = getContext().getResources().getString( - R.string.quoted_text_background_color_string); String fontColor = getContext().getResources().getString( R.string.quoted_text_font_color_string); - String html = "<head><style type=\"text/css\">* body { background-color: " - + backgroundColor + "; color: " + fontColor + "; }</style></head>" - + mQuotedText.toString(); + String html = "<head><style type=\"text/css\">* body { color: " + + fontColor + "; }</style></head>" + mQuotedText.toString(); mQuotedTextWebView.loadDataWithBaseURL(null, html, "text/html", "utf-8", null); } |