summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJin Cao <jinyan@google.com>2014-09-29 20:11:25 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-09-29 20:11:25 +0000
commite09f537728d81e9cb3d4bc8560eecde863f74fd4 (patch)
tree9c4503b37d11f5a8510607a515ed427855beaf4f
parent5878dc7e8935683cd7b2460734bbdd127ff3d619 (diff)
parentb74e26c4318b1a46bac19db611f3b46fe49f0e78 (diff)
downloadandroid_packages_apps_UnifiedEmail-e09f537728d81e9cb3d4bc8560eecde863f74fd4.tar.gz
android_packages_apps_UnifiedEmail-e09f537728d81e9cb3d4bc8560eecde863f74fd4.tar.bz2
android_packages_apps_UnifiedEmail-e09f537728d81e9cb3d4bc8560eecde863f74fd4.zip
Merge "Match vacation responder style with compose style" into ub-gmail-ur14-dev
-rw-r--r--res/layout/vacation_responder.xml260
-rw-r--r--res/values-sw600dp-land/dimen.xml20
-rw-r--r--res/values-sw600dp/dimen.xml3
-rw-r--r--res/values-sw600dp/styles.xml5
-rw-r--r--res/values/colors.xml1
-rw-r--r--res/values/styles.xml5
6 files changed, 161 insertions, 133 deletions
diff --git a/res/layout/vacation_responder.xml b/res/layout/vacation_responder.xml
index 2394b7c70..70740f99d 100644
--- a/res/layout/vacation_responder.xml
+++ b/res/layout/vacation_responder.xml
@@ -17,158 +17,180 @@
-->
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:layout_gravity="center_horizontal|top"
android:fillViewport="true"
- style="@style/VacationResponderScrollViewStyle">
+ android:paddingLeft="@dimen/compose_wrapper_side_padding"
+ android:paddingRight="@dimen/compose_wrapper_side_padding">
+ <!-- Horizontal layout to get side paddings for tablets -->
<LinearLayout
android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- android:background="@color/vacation_responder_view_background"
- android:paddingLeft="@dimen/vacation_responder_padding_horizontal"
- android:paddingRight="@dimen/vacation_responder_padding_horizontal">
-
- <Switch
- android:id="@+id/vacation_responder_switch"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:background="?android:attr/selectableItemBackground"
- android:minHeight="56dp"
- android:text="@string/preferences_vacation_responder_title"
- android:textColor="@color/vacation_responder_main_text_color"
- android:textSize="@dimen/vacation_responder_main_text_size" />
+ android:layout_height="match_parent"
+ android:paddingTop="@dimen/compose_wrapper_top_padding">
+
+ <!-- Start border -->
+ <Space
+ android:layout_width="0dp"
+ android:layout_height="match_parent"
+ android:layout_weight="@integer/compose_padding_weight" />
<LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:paddingTop="16dp">
+ android:orientation="vertical"
+ android:paddingLeft="@dimen/vacation_responder_padding_horizontal"
+ android:paddingRight="@dimen/vacation_responder_padding_horizontal"
+ style="@style/ComposeArea">
+
+ <Switch
+ android:id="@+id/vacation_responder_switch"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:background="?android:attr/selectableItemBackground"
+ android:minHeight="56dp"
+ android:text="@string/preferences_vacation_responder_title"
+ android:textColor="@color/vacation_responder_main_text_color"
+ android:textSize="@dimen/vacation_responder_main_text_size" />
- <!-- Start date -->
<LinearLayout
- android:layout_width="0dp"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_weight="1"
- android:orientation="vertical"
- style="@style/VacationResponderDatePadding">
-
- <TextView
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="@string/pick_start_date_title"
- android:textColor="@color/vacation_responder_header_text_color"
- android:textSize="@dimen/vacation_responder_header_text_size" />
+ android:paddingTop="16dp">
- <!-- date selector -->
+ <!-- Start date -->
<LinearLayout
- android:id="@+id/start_date_selector"
- android:layout_width="match_parent"
+ android:layout_width="0dp"
android:layout_height="wrap_content"
- android:background="?android:attr/selectableItemBackground">
+ android:layout_weight="1"
+ android:orientation="vertical"
+ style="@style/VacationResponderDatePadding">
<TextView
- android:id="@+id/start_date"
- android:layout_width="0dp"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_weight="1"
- android:paddingTop="8dp"
- android:paddingBottom="8dp"
- android:textColor="@color/vacation_responder_main_text_color"
- android:textSize="@dimen/vacation_responder_main_text_size" />
-
- <ImageView
- android:layout_width="wrap_content"
+ android:text="@string/pick_start_date_title"
+ android:textColor="@color/vacation_responder_header_text_color"
+ android:textSize="@dimen/vacation_responder_header_text_size" />
+
+ <!-- date selector -->
+ <LinearLayout
+ android:id="@+id/start_date_selector"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_gravity="center_vertical"
- android:src="@drawable/ic_drop_down_24dp" />
+ android:background="?android:attr/selectableItemBackground">
+
+ <TextView
+ android:id="@+id/start_date"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:paddingTop="8dp"
+ android:paddingBottom="8dp"
+ android:textColor="@color/vacation_responder_main_text_color"
+ android:textSize="@dimen/vacation_responder_main_text_size" />
+
+ <ImageView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
+ android:src="@drawable/ic_drop_down_24dp" />
+
+ </LinearLayout>
+
+ <View
+ android:layout_marginTop="8dp"
+ style="@style/DefaultDividerStyle" />
</LinearLayout>
- <View
- android:layout_marginTop="8dp"
- style="@style/DefaultDividerStyle" />
-
- </LinearLayout>
-
- <!-- End date -->
- <LinearLayout
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:orientation="vertical">
-
- <TextView
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="@string/pick_end_date_title"
- android:textColor="@color/vacation_responder_header_text_color"
- android:textSize="@dimen/vacation_responder_header_text_size" />
-
- <!-- date selector -->
+ <!-- End date -->
<LinearLayout
- android:id="@+id/end_date_selector"
- android:layout_width="match_parent"
+ android:layout_width="0dp"
android:layout_height="wrap_content"
- android:background="?android:attr/selectableItemBackground">
+ android:layout_weight="1"
+ android:orientation="vertical">
<TextView
- android:id="@+id/end_date"
- android:layout_width="0dp"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_weight="1"
- android:paddingTop="8dp"
- android:paddingBottom="8dp"
- android:textColor="@color/vacation_responder_main_text_color"
- android:textSize="@dimen/vacation_responder_main_text_size" />
-
- <ImageView
- android:layout_width="wrap_content"
+ android:text="@string/pick_end_date_title"
+ android:textColor="@color/vacation_responder_header_text_color"
+ android:textSize="@dimen/vacation_responder_header_text_size" />
+
+ <!-- date selector -->
+ <LinearLayout
+ android:id="@+id/end_date_selector"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_gravity="center_vertical"
- android:src="@drawable/ic_drop_down_24dp" />
+ android:background="?android:attr/selectableItemBackground">
+
+ <TextView
+ android:id="@+id/end_date"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:paddingTop="8dp"
+ android:paddingBottom="8dp"
+ android:textColor="@color/vacation_responder_main_text_color"
+ android:textSize="@dimen/vacation_responder_main_text_size" />
+
+ <ImageView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
+ android:src="@drawable/ic_drop_down_24dp" />
+
+ </LinearLayout>
+
+ <View
+ android:layout_marginTop="8dp"
+ style="@style/DefaultDividerStyle" />
</LinearLayout>
- <View
- android:layout_marginTop="8dp"
- style="@style/DefaultDividerStyle" />
-
</LinearLayout>
+ <com.android.mail.compose.EnterSubject
+ android:id="@+id/subject"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:hint="@string/subject_hint"
+ android:imeOptions="actionDone|flagNoExtractUi|flagNoFullscreen"
+ android:inputType="textEmailSubject|textAutoCorrect|textCapSentences|textImeMultiLine|textMultiLine"
+ android:maxLength="@integer/vacation_responder_subject_length"
+ style="@style/VacationResponderInputField" />
+
+ <View style="@style/DefaultDividerStyle" />
+
+ <EditText
+ android:id="@+id/body"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:hint="@string/vacation_responder_body_hint_text"
+ android:imeOptions="flagNoFullscreen|actionDone|flagNoEnterAction"
+ android:inputType="textLongMessage|textMultiLine|textAutoCorrect|textCapSentences"
+ android:maxLength="@integer/vacation_responder_body_length"
+ style="@style/VacationResponderInputField" />
+
+ <View style="@style/DefaultDividerStyle" />
+
+ <CheckedTextView
+ android:id="@+id/checkbox_send_to_contacts"
+ android:text="@string/send_to_contacts_text"
+ style="@style/VacationResponderCheckBox" />
+
+ <CheckedTextView
+ android:id="@+id/checkbox_send_to_domain"
+ style="@style/VacationResponderCheckBox" />
+
</LinearLayout>
- <com.android.mail.compose.EnterSubject
- android:id="@+id/subject"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:hint="@string/subject_hint"
- android:imeOptions="actionDone|flagNoExtractUi|flagNoFullscreen"
- android:inputType="textEmailSubject|textAutoCorrect|textCapSentences|textImeMultiLine|textMultiLine"
- android:maxLength="@integer/vacation_responder_subject_length"
- style="@style/VacationResponderInputField" />
-
- <View style="@style/DefaultDividerStyle" />
-
- <EditText
- android:id="@+id/body"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:hint="@string/vacation_responder_body_hint_text"
- android:imeOptions="flagNoFullscreen|actionDone|flagNoEnterAction"
- android:inputType="textLongMessage|textMultiLine|textAutoCorrect|textCapSentences"
- android:maxLength="@integer/vacation_responder_body_length"
- style="@style/VacationResponderInputField" />
-
- <View style="@style/DefaultDividerStyle" />
-
- <CheckedTextView
- android:id="@+id/checkbox_send_to_contacts"
- android:text="@string/send_to_contacts_text"
- style="@style/VacationResponderCheckBox" />
-
- <CheckedTextView
- android:id="@+id/checkbox_send_to_domain"
- style="@style/VacationResponderCheckBox" />
+ <!-- End border -->
+ <Space
+ android:layout_width="0dp"
+ android:layout_height="match_parent"
+ android:layout_weight="@integer/compose_padding_weight" />
</LinearLayout>
+
</ScrollView>
diff --git a/res/values-sw600dp-land/dimen.xml b/res/values-sw600dp-land/dimen.xml
new file mode 100644
index 000000000..e24b9b01c
--- /dev/null
+++ b/res/values-sw600dp-land/dimen.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ 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.
+-->
+<resources>
+ <dimen name="vacation_responder_padding_horizontal">80dp</dimen>
+</resources> \ No newline at end of file
diff --git a/res/values-sw600dp/dimen.xml b/res/values-sw600dp/dimen.xml
index f5f13d24e..77d2aa5ee 100644
--- a/res/values-sw600dp/dimen.xml
+++ b/res/values-sw600dp/dimen.xml
@@ -57,9 +57,6 @@
<dimen name="action_bar_content_inset_start">60dp</dimen>
- <dimen name="vacation_responder_width_tablet">800dp</dimen>
- <dimen name="vacation_responder_padding_horizontal">80dp</dimen>
-
<dimen name="snack_bar_min_width">288dp</dimen>
<dimen name="snack_bar_max_width">320dp</dimen>
</resources>
diff --git a/res/values-sw600dp/styles.xml b/res/values-sw600dp/styles.xml
index 4ef4d751b..1a56abb01 100644
--- a/res/values-sw600dp/styles.xml
+++ b/res/values-sw600dp/styles.xml
@@ -16,11 +16,6 @@
limitations under the License.
-->
<resources>
- <style name="VacationResponderScrollViewStyle">
- <item name="android:layout_width">@dimen/vacation_responder_width_tablet</item>
- <item name="android:layout_height">match_parent</item>
- </style>
-
<style name="ComposeAreaWrapper">
<item name="android:background">@color/holo_light_background_color</item>
</style>
diff --git a/res/values/colors.xml b/res/values/colors.xml
index 2f718581a..a80cbf638 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -145,7 +145,6 @@
<!-- The color of the icon background in the teaser -->
<color name="folder_teaser_icon_background">#eeeeee</color>
- <color name="vacation_responder_view_background">@android:color/white</color>
<color name="vacation_responder_window_background">#ffe9e9e9</color>
<color name="vacation_responder_header_text_color">@color/text_color_grey</color>
<color name="vacation_responder_main_text_color">@color/text_color_black</color>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 98b5d912a..e13e0ae95 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -694,11 +694,6 @@
<item name="android:padding">4dp</item>
</style>
- <style name="VacationResponderScrollViewStyle">
- <item name="android:layout_width">match_parent</item>
- <item name="android:layout_height">match_parent</item>
- </style>
-
<style name="VacationResponderDatePadding">
<item name="android:layout_marginRight">@dimen/vacation_responder_padding_between_date_spinners</item>
</style>