diff options
| -rw-r--r-- | core/java/android/app/Notification.java | 8 | ||||
| -rw-r--r-- | core/res/res/layout/notification_2025_reply_container.xml | 79 | ||||
| -rw-r--r-- | core/res/res/layout/notification_2025_template_expanded_base.xml | 86 | ||||
| -rw-r--r-- | core/res/res/values/symbols.xml | 1 |
4 files changed, 172 insertions, 2 deletions
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java index b78f11148178..0928d732375f 100644 --- a/core/java/android/app/Notification.java +++ b/core/java/android/app/Notification.java @@ -814,9 +814,9 @@ public class Notification implements Parcelable if (Flags.notificationsRedesignTemplates()) { return switch (layoutId) { case R.layout.notification_2025_template_collapsed_base, + R.layout.notification_2025_template_expanded_base, R.layout.notification_2025_template_heads_up_base, R.layout.notification_2025_template_header, - R.layout.notification_template_material_big_base, R.layout.notification_template_material_big_picture, R.layout.notification_template_material_big_text, R.layout.notification_template_material_inbox, @@ -7539,7 +7539,11 @@ public class Notification implements Parcelable } private int getBigBaseLayoutResource() { - return R.layout.notification_template_material_big_base; + if (Flags.notificationsRedesignTemplates()) { + return R.layout.notification_2025_template_expanded_base; + } else { + return R.layout.notification_template_material_big_base; + } } private int getBigPictureLayoutResource() { diff --git a/core/res/res/layout/notification_2025_reply_container.xml b/core/res/res/layout/notification_2025_reply_container.xml new file mode 100644 index 000000000000..6923b59f34dc --- /dev/null +++ b/core/res/res/layout/notification_2025_reply_container.xml @@ -0,0 +1,79 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright (C) 2024 The Android Open Source Project + ~ + ~ Licensed under the Apache License, Version 2.0 (the "License"); + ~ you may not use this file except in compliance with the License. + ~ You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, software + ~ distributed under the License is distributed on an "AS IS" BASIS, + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ~ See the License for the specific language governing permissions and + ~ limitations under the License + --> + +<!-- Note: this layout is included from a view stub; layout attributes will be overridden. --> +<LinearLayout + xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/notification_material_reply_container" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + android:paddingStart="@dimen/notification_2025_content_margin_start"> + + <ImageView + android:layout_width="match_parent" + android:layout_height="1dip" + android:id="@+id/action_divider" + android:layout_marginTop="@dimen/notification_content_margin" + android:layout_marginBottom="@dimen/notification_content_margin" + android:layout_marginEnd="@dimen/notification_content_margin_end" + android:background="@drawable/notification_template_divider" /> + + <TextView + android:id="@+id/notification_material_reply_text_3" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginEnd="@dimen/notification_content_margin_end" + android:visibility="gone" + android:textAppearance="@style/TextAppearance.DeviceDefault.Notification.Reply" + android:singleLine="true" /> + + <TextView + android:id="@+id/notification_material_reply_text_2" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginEnd="@dimen/notification_content_margin_end" + android:visibility="gone" + android:textAppearance="@style/TextAppearance.DeviceDefault.Notification.Reply" + android:singleLine="true" /> + + <LinearLayout + android:id="@+id/notification_material_reply_text_1_container" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:layout_marginEnd="@dimen/notification_content_margin_end"> + <TextView + android:id="@+id/notification_material_reply_text_1" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_weight="1" + android:layout_marginEnd="@dimen/notification_content_margin_end" + android:layout_gravity="center" + android:textAppearance="@style/TextAppearance.DeviceDefault.Notification.Reply" + android:singleLine="true" /> + <ProgressBar + android:id="@+id/notification_material_reply_progress" + android:layout_height="@dimen/messaging_group_sending_progress_size" + android:layout_width="@dimen/messaging_group_sending_progress_size" + android:layout_marginStart="@dimen/notification_2025_content_margin_start" + android:layout_gravity="center" + android:indeterminate="true" + style="?android:attr/progressBarStyleSmall" /> + </LinearLayout> + +</LinearLayout> diff --git a/core/res/res/layout/notification_2025_template_expanded_base.xml b/core/res/res/layout/notification_2025_template_expanded_base.xml new file mode 100644 index 000000000000..e480fe5eef1e --- /dev/null +++ b/core/res/res/layout/notification_2025_template_expanded_base.xml @@ -0,0 +1,86 @@ +<?xml version="1.0" encoding="utf-8"?><!-- + ~ Copyright (C) 2024 The Android Open Source Project + ~ + ~ Licensed under the Apache License, Version 2.0 (the "License"); + ~ you may not use this file except in compliance with the License. + ~ You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, software + ~ distributed under the License is distributed on an "AS IS" BASIS, + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ~ See the License for the specific language governing permissions and + ~ limitations under the License + --> +<FrameLayout + xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/status_bar_latest_event_content" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + android:clipChildren="false" + android:tag="big" + > + + <LinearLayout + android:id="@+id/notification_action_list_margin_target" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="@dimen/notification_content_margin" + android:orientation="vertical" + > + + <FrameLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_weight="1" + android:layout_gravity="top" + > + + <include layout="@layout/notification_2025_template_header" /> + + <LinearLayout + android:id="@+id/notification_main_column" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginStart="@dimen/notification_2025_content_margin_start" + android:layout_marginEnd="@dimen/notification_content_margin_end" + android:layout_marginTop="@dimen/notification_content_margin_top" + android:orientation="vertical" + > + + <include layout="@layout/notification_template_part_line1" /> + + <include layout="@layout/notification_template_text_multiline" /> + + <include + android:layout_width="match_parent" + android:layout_height="@dimen/notification_progress_bar_height" + android:layout_marginTop="@dimen/notification_progress_margin_top" + layout="@layout/notification_template_progress" + /> + </LinearLayout> + + <include layout="@layout/notification_template_right_icon" /> + </FrameLayout> + + <ViewStub + android:layout="@layout/notification_2025_reply_container" + android:id="@+id/notification_material_reply_container" + android:layout_width="match_parent" + android:layout_height="wrap_content" + /> + + <include + layout="@layout/notification_template_smart_reply_container" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginStart="@dimen/notification_2025_content_margin_start" + android:layout_marginEnd="@dimen/notification_content_margin_end" + android:layout_marginTop="@dimen/notification_content_margin" + /> + + <include layout="@layout/notification_material_action_list" /> + </LinearLayout> +</FrameLayout> diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml index 5a6b66cc1504..707e80210475 100644 --- a/core/res/res/values/symbols.xml +++ b/core/res/res/values/symbols.xml @@ -2390,6 +2390,7 @@ <java-symbol type="layout" name="notification_material_action_list" /> <java-symbol type="layout" name="notification_material_action_tombstone" /> <java-symbol type="layout" name="notification_2025_template_collapsed_base" /> + <java-symbol type="layout" name="notification_2025_template_expanded_base" /> <java-symbol type="layout" name="notification_2025_template_heads_up_base" /> <java-symbol type="layout" name="notification_2025_template_header" /> <java-symbol type="layout" name="notification_template_material_base" /> |