From 9a238e5124e1e55bba92ee832d2501d41bd472f8 Mon Sep 17 00:00:00 2001 From: Julia Reynolds Date: Tue, 13 Apr 2021 15:51:45 -0400 Subject: [PATCH] Restyle notif history to beter match shade Test: manual Fixes: 184695659 Fixes: 183949048 Fixes: 184695652 Fixes: 185271315 Change-Id: I79a937d7d64e6bdf0014ce3f939e6e96690556b9 --- AndroidManifest.xml | 2 +- res/drawable/rounded_bg.xml | 3 +- res/layout/notification_history.xml | 1 + .../notification_history_app_layout.xml | 28 ++++++++-------- res/layout/notification_history_log_row.xml | 15 +++++---- res/layout/notification_sbn_log_row.xml | 27 ++++++++------- res/values/styles.xml | 11 +------ .../history/NotificationHistoryActivity.java | 33 +++++++++++++++---- 8 files changed, 69 insertions(+), 51 deletions(-) diff --git a/AndroidManifest.xml b/AndroidManifest.xml index da438473a57..7f73d2cc899 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -1296,7 +1296,7 @@ diff --git a/res/drawable/rounded_bg.xml b/res/drawable/rounded_bg.xml index fcdd7614e64..3e4e91bafea 100644 --- a/res/drawable/rounded_bg.xml +++ b/res/drawable/rounded_bg.xml @@ -15,8 +15,9 @@ limitations under the License. --> - + diff --git a/res/layout/notification_history_app_layout.xml b/res/layout/notification_history_app_layout.xml index 42edd704d2d..78f2ef49a2e 100644 --- a/res/layout/notification_history_app_layout.xml +++ b/res/layout/notification_history_app_layout.xml @@ -24,23 +24,26 @@ android:id="@+id/app_header" android:layout_height="wrap_content" android:layout_width="match_parent" + android:clipChildren="true" android:background="@drawable/button_ripple_radius" - android:paddingTop="12dp" + android:paddingTop="24dp" android:orientation="horizontal" - android:paddingBottom="12dp" + android:paddingBottom="22dp" android:paddingStart="16dp"> - + + + @@ -66,7 +65,8 @@ android:layout_centerVertical="true" android:ellipsize="end" android:singleLine="true" - android:textAppearance="@style/TextAppearance.NotificationHistory.AppName" + android:textSize="12sp" + android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Notification" android:textAlignment="viewEnd" /> @@ -78,9 +78,10 @@ android:layout_gravity="left|center_vertical" android:ellipsize="end" android:layout_marginStart="32dp" - android:maxLines="3" - android:paddingTop="3dp" - android:textAppearance="@style/TextAppearance.NotificationHistory.Text" + android:maxLines="7" + android:paddingTop="4dp" + android:textColor="?android:attr/textColorSecondary" + android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Notification" android:textAlignment="viewStart" /> diff --git a/res/layout/notification_sbn_log_row.xml b/res/layout/notification_sbn_log_row.xml index f4ccd716878..91d6600e53e 100644 --- a/res/layout/notification_sbn_log_row.xml +++ b/res/layout/notification_sbn_log_row.xml @@ -22,8 +22,8 @@ @@ -33,16 +33,15 @@ android:layout_height="wrap_content" android:minHeight="@*android:dimen/status_bar_icon_size" android:gravity="center_vertical" - android:layout_marginBottom="6dp"> + android:layout_marginBottom="11dp"> @@ -55,7 +54,8 @@ android:ellipsize="end" android:singleLine="true" android:textColor="?android:attr/textColorPrimary" - android:textAppearance="@style/TextAppearance.NotificationHistory.AppName" + android:textSize="12sp" + android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Notification" android:marqueeRepeatLimit = "marquee_forever" android:scrollHorizontally = "true" android:textAlignment="viewStart" /> @@ -89,7 +89,8 @@ android:layout_alignParentEnd="true" android:ellipsize="end" android:singleLine="true" - android:textAppearance="@style/TextAppearance.NotificationHistory.AppName" + android:textSize="12sp" + android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Notification" android:textAlignment="viewEnd" /> @@ -97,7 +98,7 @@ @@ -109,7 +110,7 @@ android:layout_gravity="left|center_vertical" android:ellipsize="end" android:singleLine="true" - android:textAppearance="@style/TextAppearance.NotificationHistory.Title" + android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Notification.Title" android:textAlignment="viewStart" /> @@ -119,8 +120,10 @@ android:layout_height="wrap_content" android:layout_gravity="left|center_vertical" android:ellipsize="end" - android:maxLines="3" - android:textAppearance="@style/TextAppearance.NotificationHistory.Text" + android:paddingTop="4dp" + android:maxLines="7" + android:textColor="?android:attr/textColorSecondary" + android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Notification" android:textAlignment="viewStart" /> diff --git a/res/values/styles.xml b/res/values/styles.xml index 078c6b6b37a..735cc15ab2e 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -341,7 +341,7 @@ 8dp - @@ -350,15 +350,6 @@ 12sp - - - -