From 9af1abd4b38f69a2ab26552c984e97dd7b75218e Mon Sep 17 00:00:00 2001 From: Ioana Alexandru Date: Thu, 14 Nov 2024 11:24:07 +0100 Subject: [Notif redesign] Bigger "small" icon in header only notif Note that notification_2025_template_header is a fork of notification_temmplate_header. Bug: 378660052 Test: visual test, screenshot tests to come later Flag: android.app.notifications_redesign_templates Change-Id: I0d65856b0ea550cf20aa4be08b07a00dfaa01e53 --- core/java/android/app/Notification.java | 11 +- .../layout/notification_2025_template_header.xml | 111 +++++++++++++++++++++ core/res/res/values/dimens.xml | 3 + core/res/res/values/symbols.xml | 1 + 4 files changed, 125 insertions(+), 1 deletion(-) create mode 100644 core/res/res/layout/notification_2025_template_header.xml diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java index f0ae40502c71..cfe0ff9440e7 100644 --- a/core/java/android/app/Notification.java +++ b/core/java/android/app/Notification.java @@ -821,6 +821,7 @@ public class Notification implements Parcelable if (Flags.notificationsRedesignTemplates()) { switch(layoutId) { case R.layout.notification_2025_template_collapsed_base: + case R.layout.notification_2025_template_header: return true; } } @@ -6726,7 +6727,7 @@ public class Notification implements Parcelable // Headers on their own are never colorized p.disallowColorization(); RemoteViews header = new BuilderRemoteViews(mContext.getApplicationInfo(), - R.layout.notification_template_header); + getHeaderLayoutResource()); resetNotificationHeader(header); bindNotificationHeader(header, p); return header; @@ -7486,6 +7487,14 @@ public class Notification implements Parcelable return clone; } + private int getHeaderLayoutResource() { + if (Flags.notificationsRedesignTemplates()) { + return R.layout.notification_2025_template_header; + } else { + return R.layout.notification_template_header; + } + } + @UnsupportedAppUsage private int getBaseLayoutResource() { if (Flags.notificationsRedesignTemplates()) { diff --git a/core/res/res/layout/notification_2025_template_header.xml b/core/res/res/layout/notification_2025_template_header.xml new file mode 100644 index 000000000000..b7fe454e09d4 --- /dev/null +++ b/core/res/res/layout/notification_2025_template_header.xml @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/core/res/res/values/dimens.xml b/core/res/res/values/dimens.xml index 5cfe65cef4c6..513555d0ff5c 100644 --- a/core/res/res/values/dimens.xml +++ b/core/res/res/values/dimens.xml @@ -315,6 +315,9 @@ 56dp + + 72dp + 49.5dp diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml index f1a30a8ca23d..0eb1501d38e0 100644 --- a/core/res/res/values/symbols.xml +++ b/core/res/res/values/symbols.xml @@ -2390,6 +2390,7 @@ + -- cgit v1.2.3-59-g8ed1b