From 6c8e3bb43dbb400c7ac1da1375628ab8d4d820cd Mon Sep 17 00:00:00 2001 From: Michael Kwan Date: Tue, 1 Nov 2016 15:19:09 -0700 Subject: [PATCH] Tweak AlertDialog and Preference layout for nonround watches. Update the title layouts of AlertDialog and Preference for nonround watches with proper padding. Bug: 31271003 Change-Id: I9305c1f52297ee6658de2e84295509d5f06f8aaf --- .../alert_dialog_title_material.xml | 7 +++---- .../alert_dialog_title_material.xml | 3 +-- .../res/layout-watch/alert_dialog_material.xml | 3 +-- .../preference_list_fragment_material.xml | 2 +- .../select_dialog_multichoice_material.xml | 2 +- .../select_dialog_singlechoice_material.xml | 2 +- .../values-notround-watch/dimens_material.xml | 16 ++++++++++------ .../res/values-round-watch/config_material.xml | 3 --- .../res/values-round-watch/dimens_material.xml | 4 ++++ .../dimens.xml} | 14 +++++--------- core/res/res/values-watch/styles_material.xml | 2 +- core/res/res/values/dimens_material.xml | 1 + 12 files changed, 29 insertions(+), 30 deletions(-) rename core/res/res/{values-notround-watch/config_material.xml => values-watch/dimens.xml} (58%) diff --git a/core/res/res/layout-notround-watch/alert_dialog_title_material.xml b/core/res/res/layout-notround-watch/alert_dialog_title_material.xml index 0ab56f95efbe3..08eecef1da95a 100644 --- a/core/res/res/layout-notround-watch/alert_dialog_title_material.xml +++ b/core/res/res/layout-notround-watch/alert_dialog_title_material.xml @@ -18,14 +18,14 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" + android:paddingTop="?attr/dialogPreferredPadding" + android:paddingBottom="8dp" android:orientation="vertical" - android:gravity="top|center_horizontal" - android:minHeight="@dimen/alert_dialog_title_height"> + android:gravity="center_horizontal|top"> diff --git a/core/res/res/layout-round-watch/alert_dialog_title_material.xml b/core/res/res/layout-round-watch/alert_dialog_title_material.xml index aefe28f7f3594..dac1e324be81d 100644 --- a/core/res/res/layout-round-watch/alert_dialog_title_material.xml +++ b/core/res/res/layout-round-watch/alert_dialog_title_material.xml @@ -18,6 +18,7 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" + android:paddingBottom="8dp" android:orientation="vertical" android:gravity="top|center_horizontal"> diff --git a/core/res/res/layout-watch/alert_dialog_material.xml b/core/res/res/layout-watch/alert_dialog_material.xml index 2fe13de2120af..960b927a0e64f 100644 --- a/core/res/res/layout-watch/alert_dialog_material.xml +++ b/core/res/res/layout-watch/alert_dialog_material.xml @@ -50,7 +50,7 @@ diff --git a/core/res/res/layout-watch/preference_list_fragment_material.xml b/core/res/res/layout-watch/preference_list_fragment_material.xml index ae8f203a7ce61..22e66d5139361 100644 --- a/core/res/res/layout-watch/preference_list_fragment_material.xml +++ b/core/res/res/layout-watch/preference_list_fragment_material.xml @@ -44,7 +44,7 @@ android:paddingEnd="@dimen/dialog_padding_material" android:paddingBottom="8dp" android:textAppearance="@style/TextAppearance.Material.Title" - android:gravity="center" /> + android:gravity="center_horizontal|top" /> diff --git a/core/res/res/layout/select_dialog_multichoice_material.xml b/core/res/res/layout/select_dialog_multichoice_material.xml index 36e8e57b29880..731fe16196345 100644 --- a/core/res/res/layout/select_dialog_multichoice_material.xml +++ b/core/res/res/layout/select_dialog_multichoice_material.xml @@ -26,5 +26,5 @@ android:paddingStart="@dimen/select_dialog_padding_start_material" android:paddingEnd="?attr/dialogPreferredPadding" android:drawableStart="?attr/listChoiceIndicatorMultiple" - android:drawablePadding="20dp" + android:drawablePadding="@dimen/select_dialog_drawable_padding_start_material" android:ellipsize="marquee" /> diff --git a/core/res/res/layout/select_dialog_singlechoice_material.xml b/core/res/res/layout/select_dialog_singlechoice_material.xml index 995272ad80efc..77b693058e82d 100644 --- a/core/res/res/layout/select_dialog_singlechoice_material.xml +++ b/core/res/res/layout/select_dialog_singlechoice_material.xml @@ -26,5 +26,5 @@ android:paddingStart="@dimen/select_dialog_padding_start_material" android:paddingEnd="?attr/dialogPreferredPadding" android:drawableStart="?attr/listChoiceIndicatorSingle" - android:drawablePadding="20dp" + android:drawablePadding="@dimen/select_dialog_drawable_padding_start_material" android:ellipsize="marquee" /> diff --git a/core/res/res/values-notround-watch/dimens_material.xml b/core/res/res/values-notround-watch/dimens_material.xml index 9cacb117cf7ba..9fdf55b8a31db 100644 --- a/core/res/res/values-notround-watch/dimens_material.xml +++ b/core/res/res/values-notround-watch/dimens_material.xml @@ -15,12 +15,16 @@ --> 8dp - 0dp + 8dp - 16dp - 16dp - 16dp + 8dp + 8dp + 8dp - 8dp - 8dp + 0dp + 0dp + + + 8dp + 8dp diff --git a/core/res/res/values-round-watch/config_material.xml b/core/res/res/values-round-watch/config_material.xml index 11798709f148b..ae4a6eedf4fdf 100644 --- a/core/res/res/values-round-watch/config_material.xml +++ b/core/res/res/values-round-watch/config_material.xml @@ -20,9 +20,6 @@ false - - 0x00000031 - @dimen/screen_percentage_15 diff --git a/core/res/res/values-round-watch/dimens_material.xml b/core/res/res/values-round-watch/dimens_material.xml index f2de4e013a788..c8f27b1724e36 100644 --- a/core/res/res/values-round-watch/dimens_material.xml +++ b/core/res/res/values-round-watch/dimens_material.xml @@ -23,4 +23,8 @@ @dimen/screen_percentage_15 @dimen/screen_percentage_15 + + + @dimen/screen_percentage_15 + 8dp diff --git a/core/res/res/values-notround-watch/config_material.xml b/core/res/res/values-watch/dimens.xml similarity index 58% rename from core/res/res/values-notround-watch/config_material.xml rename to core/res/res/values-watch/dimens.xml index a99674f3f0604..4c8b39ca92a7b 100644 --- a/core/res/res/values-notround-watch/config_material.xml +++ b/core/res/res/values-watch/dimens.xml @@ -13,13 +13,9 @@ See the License for the specific language governing permissions and limitations under the License. --> - - - - - - 0x00800033 + + + 0dp + + 0dp diff --git a/core/res/res/values-watch/styles_material.xml b/core/res/res/values-watch/styles_material.xml index af4207ed4e6f5..0053c12d9d84d 100644 --- a/core/res/res/values-watch/styles_material.xml +++ b/core/res/res/values-watch/styles_material.xml @@ -98,7 +98,7 @@ please see styles_device_defaults.xml. @empty false @style/TextAppearance.Material.DialogWindowTitle - @integer/config_dialogTextGravity + center_horizontal|top end diff --git a/core/res/res/values/dimens_material.xml b/core/res/res/values/dimens_material.xml index 30e7b31377128..ebe577c737581 100644 --- a/core/res/res/values/dimens_material.xml +++ b/core/res/res/values/dimens_material.xml @@ -129,6 +129,7 @@ 20dp + 20dp 2dp 2dp