summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/SystemUI/res/layout/notification_info.xml37
-rw-r--r--packages/SystemUI/res/layout/notification_snooze.xml8
-rw-r--r--packages/SystemUI/res/values/dimens.xml5
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 095f181fc049..88d19f495e93 100644
--- a/packages/SystemUI/res/layout/notification_info.xml
+++ b/packages/SystemUI/res/layout/notification_info.xml
@@ -16,24 +16,23 @@
-->
<com.android.systemui.statusbar.NotificationInfo
- 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:paddingStart="@*android:dimen/notification_content_margin_start"
- android:paddingEnd="@*android:dimen/notification_content_margin_end"
- android:background="@color/notification_guts_bg_color"
- android:theme="@*android:style/Theme.DeviceDefault.Light">
+ 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">
<!-- Package Info -->
<RelativeLayout
android:id="@+id/header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:layout_marginStart="@*android:dimen/notification_content_margin_start"
android:clipChildren="false"
android:clipToPadding="false">
<ImageView
@@ -73,13 +72,13 @@
android:maxLines="1"
android:layout_centerVertical="true"
android:layout_toEndOf="@id/pkg_group_divider" />
+ <!-- 24 dp icon with 16 dp padding all around to mirror notification content margins -->
<ImageButton
android:id="@+id/info"
android:layout_width="56dp"
android:layout_height="56dp"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
- android:layout_marginEnd="-16dp"
android:background="@drawable/ripple_drawable"
android:contentDescription="@string/notification_more_settings"
android:padding="16dp"
@@ -100,6 +99,8 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:layout_marginStart="@*android:dimen/notification_content_margin_start"
+ android:layout_marginEnd="@*android:dimen/notification_content_margin_start"
android:orientation="vertical">
<!-- Channel Name -->
<TextView
@@ -120,9 +121,11 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:orientation="horizontal"
android:layout_marginTop="@dimen/notification_guts_button_spacing"
- android:gravity="end" >
+ android:layout_marginStart="@dimen/notification_guts_button_side_margin"
+ android:layout_marginEnd="@dimen/notification_guts_button_side_margin"
+ android:gravity="end"
+ android:orientation="horizontal">
<!-- Optional link to app. Only appears if the channel is not disabled and the app
asked for it -->
@@ -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"/>
</LinearLayout>
@@ -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" >
<TextView
@@ -180,7 +184,6 @@
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
- android:layout_marginEnd="-8dp"
android:text="@string/inline_undo"
style="@style/TextAppearance.NotificationInfo.Button"/>
</RelativeLayout>
diff --git a/packages/SystemUI/res/layout/notification_snooze.xml b/packages/SystemUI/res/layout/notification_snooze.xml
index 7476abdeef66..ea6ef4cc0012 100644
--- a/packages/SystemUI/res/layout/notification_snooze.xml
+++ b/packages/SystemUI/res/layout/notification_snooze.xml
@@ -50,13 +50,13 @@
<TextView
android:id="@+id/undo"
- style="@style/TextAppearance.NotificationInfo.Button"
android:layout_width="wrap_content"
- android:layout_height="36dp"
- android:layout_marginEnd="@*android:dimen/notification_content_margin_end"
+ android:layout_height="48dp"
+ android:layout_marginEnd="@dimen/notification_guts_button_side_margin"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
- android:text="@string/snooze_undo" />
+ android:text="@string/snooze_undo"
+ style="@style/TextAppearance.NotificationInfo.Button" />
</RelativeLayout>
<View
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
index af343fb6a323..ad74725aa19d 100644
--- a/packages/SystemUI/res/values/dimens.xml
+++ b/packages/SystemUI/res/values/dimens.xml
@@ -161,11 +161,14 @@
<!-- The vertical space around the buttons in the inline settings -->
<dimen name="notification_guts_button_spacing">6dp</dimen>
+ <!-- Extra horizontal space for properly aligning guts buttons with the notification content -->
+ <dimen name="notification_guts_button_side_margin">8dp</dimen>
+
<!-- The vertical padding a notification guts button has to fulfill the 48dp touch target -->
<dimen name="notification_guts_button_vertical_padding">14dp</dimen>
<!-- The horizontal padding for notification guts buttons-->
- <dimen name="notification_guts_button_horizontal_padding">14dp</dimen>
+ <dimen name="notification_guts_button_horizontal_padding">8dp</dimen>
<!-- The horizontal space around the buttons in the inline settings -->
<dimen name="notification_guts_button_horizontal_spacing">8dp</dimen>