From ed36ea6c955c1b352f7b4e53a57a961a9087d685 Mon Sep 17 00:00:00 2001 From: Jeff DeCew Date: Wed, 15 Jun 2022 21:08:58 +0000 Subject: [PATCH] Code cleanup and visual polish for hybrid views These views (the single line children of a group when it is collapsed) were missing some pretty basic polish pieces. This CL: * Removes unnecessary styles (the alternative theme was removed years ago) that also required an extra context allocation. * Apply the themed text colors to the text views. Leave colors alone (e.g. use the un-themed defaults) if theme colors cannot be resolved. * Ensure the "conversation sender name" text view translates vertically with the title and text when it fades out. Test: manual expansion Bug: 236252445 Change-Id: Ib578eeffa5c78a0016ba818fa0273daa54bee748 --- .../hybrid_conversation_notification.xml | 6 +- .../res/layout/hybrid_notification.xml | 9 +- packages/SystemUI/res/values/attrs.xml | 6 -- packages/SystemUI/res/values/styles.xml | 24 ----- .../HybridConversationNotificationView.java | 4 + .../notification/row/HybridGroupManager.java | 17 +--- .../row/HybridNotificationView.java | 96 +++++++++++++------ 7 files changed, 84 insertions(+), 78 deletions(-) diff --git a/packages/SystemUI/res/layout/hybrid_conversation_notification.xml b/packages/SystemUI/res/layout/hybrid_conversation_notification.xml index 43b16618d615c..a313833e2a66c 100644 --- a/packages/SystemUI/res/layout/hybrid_conversation_notification.xml +++ b/packages/SystemUI/res/layout/hybrid_conversation_notification.xml @@ -57,7 +57,8 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" - style="?attr/hybridNotificationTextStyle" + android:paddingEnd="4dp" + style="@*android:style/Widget.DeviceDefault.Notification.Text" /> diff --git a/packages/SystemUI/res/layout/hybrid_notification.xml b/packages/SystemUI/res/layout/hybrid_notification.xml index e8d77511e53cc..9ea7be50adec9 100644 --- a/packages/SystemUI/res/layout/hybrid_notification.xml +++ b/packages/SystemUI/res/layout/hybrid_notification.xml @@ -20,19 +20,22 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="bottom|start" - style="?attr/hybridNotificationStyle"> + android:paddingStart="@*android:dimen/notification_content_margin_start" + android:paddingEnd="12dp"> \ No newline at end of file diff --git a/packages/SystemUI/res/values/attrs.xml b/packages/SystemUI/res/values/attrs.xml index 3228c3c9d37fe..beda2a7c50b02 100644 --- a/packages/SystemUI/res/values/attrs.xml +++ b/packages/SystemUI/res/values/attrs.xml @@ -108,12 +108,6 @@ - - - - - - diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml index 0c25f54734167..5cbfa78256ce9 100644 --- a/packages/SystemUI/res/values/styles.xml +++ b/packages/SystemUI/res/values/styles.xml @@ -17,30 +17,6 @@ - - - - - - - - - - -