From c032ac90084d561389276e672bfc44b3ff92550e Mon Sep 17 00:00:00 2001 From: Rohan Shah Date: Thu, 3 May 2018 16:58:37 -0700 Subject: [PATCH] [Notif] Fix BH & Snooze button bounds and UI Moved padding/margins around to better align with content and avoid having negative margin where possible. Test: Visually, with layout bounds Change-Id: Ied84e84a8658064ef8c317857ef5bad2cbb67e9e Fixes: 77318740 --- .../SystemUI/res/layout/notification_info.xml | 37 ++++++++++--------- .../res/layout/notification_snooze.xml | 8 ++-- packages/SystemUI/res/values/dimens.xml | 5 ++- 3 files changed, 28 insertions(+), 22 deletions(-) diff --git a/packages/SystemUI/res/layout/notification_info.xml b/packages/SystemUI/res/layout/notification_info.xml index 095f181fc0493..88d19f495e937 100644 --- a/packages/SystemUI/res/layout/notification_info.xml +++ b/packages/SystemUI/res/layout/notification_info.xml @@ -16,24 +16,23 @@ --> + xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/notification_guts" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:clickable="true" + android:clipChildren="false" + android:clipToPadding="false" + android:orientation="vertical" + android:background="@color/notification_guts_bg_color" + android:theme="@*android:style/Theme.DeviceDefault.Light"> + + android:layout_marginStart="@dimen/notification_guts_button_side_margin" + android:layout_marginEnd="@dimen/notification_guts_button_side_margin" + android:gravity="end" + android:orientation="horizontal"> @@ -154,7 +157,6 @@ android:text="@string/inline_keep_button" android:layout_width="wrap_content" android:layout_height="match_parent" - android:layout_marginEnd="-8dp" android:layout_marginStart="@dimen/notification_guts_button_horizontal_spacing" style="@style/TextAppearance.NotificationInfo.Button"/> @@ -165,6 +167,8 @@ android:layout_height="wrap_content" android:layout_marginBottom="@dimen/notification_guts_button_spacing" android:layout_marginTop="@dimen/notification_guts_button_spacing" + android:layout_marginStart="@dimen/notification_guts_button_side_margin" + android:layout_marginEnd="@dimen/notification_guts_button_side_margin" android:visibility="gone" android:orientation="horizontal" > diff --git a/packages/SystemUI/res/layout/notification_snooze.xml b/packages/SystemUI/res/layout/notification_snooze.xml index 7476abdeef667..ea6ef4cc0012a 100644 --- a/packages/SystemUI/res/layout/notification_snooze.xml +++ b/packages/SystemUI/res/layout/notification_snooze.xml @@ -50,13 +50,13 @@ + android:text="@string/snooze_undo" + style="@style/TextAppearance.NotificationInfo.Button" /> 6dp + + 8dp + 14dp - 14dp + 8dp 8dp