Loading core/java/android/app/Notification.java +17 −5 Original line number Diff line number Diff line Loading @@ -817,13 +817,13 @@ public class Notification implements Parcelable R.layout.notification_2025_template_expanded_base, R.layout.notification_2025_template_heads_up_base, R.layout.notification_2025_template_header, R.layout.notification_2025_template_collapsed_messaging, R.layout.notification_2025_template_collapsed_media, R.layout.notification_template_material_big_picture, R.layout.notification_template_material_big_text, R.layout.notification_template_material_inbox, R.layout.notification_template_material_messaging, R.layout.notification_template_material_big_messaging, R.layout.notification_template_material_conversation, R.layout.notification_template_material_media, R.layout.notification_template_material_big_media, R.layout.notification_template_material_call, R.layout.notification_template_material_big_call, Loading Loading @@ -5924,7 +5924,7 @@ public class Notification implements Parcelable || resId == getCompactHeadsUpBaseLayoutResource() || resId == getMessagingCompactHeadsUpLayoutResource() || resId == getCollapsedMessagingLayoutResource() || resId == R.layout.notification_template_material_media); || resId == getCollapsedMediaLayoutResource()); RemoteViews contentView = new BuilderRemoteViews(mContext.getApplicationInfo(), resId); resetStandardTemplate(contentView); Loading Loading @@ -7573,13 +7573,25 @@ public class Notification implements Parcelable } private int getCollapsedMessagingLayoutResource() { if (Flags.notificationsRedesignTemplates()) { return R.layout.notification_2025_template_collapsed_messaging; } else { return R.layout.notification_template_material_messaging; } } private int getExpandedMessagingLayoutResource() { return R.layout.notification_template_material_big_messaging; } private int getCollapsedMediaLayoutResource() { if (Flags.notificationsRedesignTemplates()) { return R.layout.notification_2025_template_collapsed_media; } else { return R.layout.notification_template_material_media; } } private int getConversationLayoutResource() { return R.layout.notification_template_material_conversation; } Loading Loading @@ -10480,7 +10492,7 @@ public class Notification implements Parcelable .fillTextsFrom(mBuilder); TemplateBindResult result = new TemplateBindResult(); RemoteViews template = mBuilder.applyStandardTemplate( R.layout.notification_template_material_media, p, mBuilder.getCollapsedMediaLayoutResource(), p, null /* result */); for (int i = 0; i < MAX_MEDIA_BUTTONS_IN_COMPACT; i++) { Loading core/res/res/layout/notification_2025_template_collapsed_media.xml 0 → 100644 +197 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- ~ Copyright (C) 2014 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 is the old media style notification (different from UMO). --> <!-- extends FrameLayout --> <com.android.internal.widget.MediaNotificationView android:id="@+id/status_bar_latest_event_content" xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" android:minHeight="@dimen/notification_min_height" android:tag="media" > <ImageView android:id="@+id/left_icon" android:layout_width="@dimen/notification_2025_left_icon_size" android:layout_height="@dimen/notification_2025_left_icon_size" android:layout_gravity="center_vertical|start" android:layout_marginStart="@dimen/notification_left_icon_start" android:background="@drawable/notification_large_icon_outline" android:clipToOutline="true" android:importantForAccessibility="no" android:scaleType="centerCrop" android:visibility="gone" /> <com.android.internal.widget.NotificationRowIconView android:id="@+id/icon" android:layout_width="@dimen/notification_2025_icon_circle_size" android:layout_height="@dimen/notification_2025_icon_circle_size" android:layout_gravity="center_vertical|start" android:layout_marginStart="@dimen/notification_icon_circle_start" android:background="@drawable/notification_icon_circle" android:padding="@dimen/notification_2025_icon_circle_padding" /> <FrameLayout android:id="@+id/alternate_expand_target" android:layout_width="@dimen/notification_2025_content_margin_start" android:layout_height="match_parent" android:layout_gravity="start" android:importantForAccessibility="no" android:focusable="false" /> <LinearLayout android:id="@+id/notification_headerless_view_row" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginStart="@dimen/notification_2025_content_margin_start" android:orientation="horizontal" > <LinearLayout android:id="@+id/notification_headerless_view_column" android:layout_width="0px" android:layout_height="wrap_content" android:layout_gravity="center_vertical" android:layout_weight="1" android:layout_marginBottom="@dimen/notification_headerless_margin_twoline" android:layout_marginTop="@dimen/notification_headerless_margin_twoline" android:orientation="vertical" > <NotificationTopLineView android:id="@+id/notification_top_line" android:layout_width="wrap_content" android:layout_height="wrap_content" android:minHeight="@dimen/notification_headerless_line_height" android:clipChildren="false" android:theme="@style/Theme.DeviceDefault.Notification" > <!-- NOTE: The notification_top_line_views layout contains the app_name_text. In order to include the title view at the beginning, the Notification.Builder has logic to hide that view whenever this title view is to be visible. --> <TextView android:id="@+id/title" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginEnd="@dimen/notification_header_separating_margin" android:ellipsize="end" android:fadingEdge="horizontal" android:singleLine="true" android:textAlignment="viewStart" android:textAppearance="@style/TextAppearance.DeviceDefault.Notification.Title" /> <include layout="@layout/notification_top_line_views" /> </NotificationTopLineView> <LinearLayout android:id="@+id/notification_main_column" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" > <com.android.internal.widget.NotificationVanishingFrameLayout android:layout_width="match_parent" android:layout_height="@dimen/notification_headerless_line_height" > <!-- This is the simplest way to keep this text vertically centered without gravity="center_vertical" which causes jumpiness in expansion animations. --> <include layout="@layout/notification_template_text" android:layout_width="match_parent" android:layout_height="@dimen/notification_text_height" android:layout_gravity="center_vertical" android:layout_marginTop="0dp" /> </com.android.internal.widget.NotificationVanishingFrameLayout> <include layout="@layout/notification_template_progress" android:layout_width="match_parent" android:layout_height="@dimen/notification_headerless_line_height" /> </LinearLayout> </LinearLayout> <ImageView android:id="@+id/right_icon" android:layout_width="@dimen/notification_right_icon_size" android:layout_height="@dimen/notification_right_icon_size" android:layout_gravity="center_vertical|end" android:layout_marginTop="@dimen/notification_right_icon_headerless_margin" android:layout_marginBottom="@dimen/notification_right_icon_headerless_margin" android:layout_marginStart="@dimen/notification_right_icon_content_margin" android:background="@drawable/notification_large_icon_outline" android:clipToOutline="true" android:importantForAccessibility="no" android:scaleType="centerCrop" /> <LinearLayout android:id="@+id/media_actions" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_vertical" android:layoutDirection="ltr" android:orientation="horizontal" > <include layout="@layout/notification_material_media_action" android:id="@+id/action0" /> <include layout="@layout/notification_material_media_action" android:id="@+id/action1" /> <include layout="@layout/notification_material_media_action" android:id="@+id/action2" /> </LinearLayout> <FrameLayout android:id="@+id/expand_button_touch_container" android:layout_width="wrap_content" android:layout_height="match_parent" android:minWidth="@dimen/notification_content_margin_end" > <include layout="@layout/notification_expand_button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_vertical|end" /> </FrameLayout> </LinearLayout> </com.android.internal.widget.MediaNotificationView> core/res/res/layout/notification_2025_template_collapsed_messaging.xml 0 → 100644 +220 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- ~ Copyright (C) 2016 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 is the old "Messaging Style" notification (not a conversation). --> <!-- extends FrameLayout --> <com.android.internal.widget.MessagingLayout 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:clipChildren="false" android:tag="messaging" > <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:clipChildren="false" android:orientation="vertical" > <com.android.internal.widget.NotificationMaxHeightFrameLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:minHeight="@dimen/notification_min_height" android:clipChildren="false" > <ImageView android:id="@+id/left_icon" android:layout_width="@dimen/notification_2025_left_icon_size" android:layout_height="@dimen/notification_2025_left_icon_size" android:layout_gravity="center_vertical|start" android:layout_marginStart="@dimen/notification_left_icon_start" android:background="@drawable/notification_large_icon_outline" android:clipToOutline="true" android:importantForAccessibility="no" android:scaleType="centerCrop" android:visibility="gone" /> <com.android.internal.widget.NotificationRowIconView android:id="@+id/icon" android:layout_width="@dimen/notification_2025_icon_circle_size" android:layout_height="@dimen/notification_2025_icon_circle_size" android:layout_gravity="center_vertical|start" android:layout_marginStart="@dimen/notification_icon_circle_start" android:background="@drawable/notification_icon_circle" android:padding="@dimen/notification_2025_icon_circle_padding" /> <FrameLayout android:id="@+id/alternate_expand_target" android:layout_width="@dimen/notification_2025_content_margin_start" android:layout_height="match_parent" android:layout_gravity="start" android:importantForAccessibility="no" android:focusable="false" /> <!-- NOTE: to make the expansion animation of id/notification_messaging happen vertically, its X positioning must be the left edge of the notification, so instead of putting the layout_marginStart on the id/notification_headerless_view_row, we put it on id/notification_top_line, making the layout here just a bit different from the base. --> <LinearLayout android:id="@+id/notification_headerless_view_row" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="horizontal" android:clipChildren="false" > <!-- NOTE: because messaging will always have 2 lines, this LinearLayout should NOT have the id/notification_headerless_view_column, as that is used for modifying vertical margins to accommodate the single-line state that base supports --> <LinearLayout android:layout_width="0px" android:layout_height="wrap_content" android:layout_gravity="center_vertical" android:layout_weight="1" android:layout_marginBottom="@dimen/notification_headerless_margin_twoline" android:layout_marginTop="@dimen/notification_headerless_margin_twoline" android:layout_marginStart="@dimen/notification_2025_content_margin_start" android:clipChildren="false" android:orientation="vertical" > <NotificationTopLineView android:id="@+id/notification_top_line" android:layout_width="wrap_content" android:layout_height="wrap_content" android:minHeight="@dimen/notification_headerless_line_height" android:clipChildren="false" android:theme="@style/Theme.DeviceDefault.Notification" > <!-- NOTE: The notification_top_line_views layout contains the app_name_text. In order to include the title view at the beginning, the Notification.Builder has logic to hide that view whenever this title view is to be visible. --> <TextView android:id="@+id/title" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginEnd="@dimen/notification_header_separating_margin" android:ellipsize="end" android:fadingEdge="horizontal" android:singleLine="true" android:textAlignment="viewStart" android:textAppearance="@style/TextAppearance.DeviceDefault.Notification.Title" /> <include layout="@layout/notification_top_line_views" /> </NotificationTopLineView> <LinearLayout android:id="@+id/notification_main_column" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" android:clipChildren="false" > <com.android.internal.widget.MessagingLinearLayout android:id="@+id/notification_messaging" android:layout_width="match_parent" android:layout_height="wrap_content" android:clipChildren="false" android:spacing="@dimen/notification_messaging_spacing" /> </LinearLayout> </LinearLayout> <!-- Images --> <com.android.internal.widget.MessagingLinearLayout android:id="@+id/conversation_image_message_container" android:layout_width="@dimen/notification_right_icon_size" android:layout_height="@dimen/notification_right_icon_size" android:layout_gravity="center_vertical|end" android:layout_marginTop="@dimen/notification_right_icon_headerless_margin" android:layout_marginBottom="@dimen/notification_right_icon_headerless_margin" android:layout_marginStart="@dimen/notification_right_icon_content_margin" android:forceHasOverlappingRendering="false" android:spacing="0dp" android:clipChildren="false" android:visibility="gone" /> <ImageView android:id="@+id/right_icon" android:layout_width="@dimen/notification_right_icon_size" android:layout_height="@dimen/notification_right_icon_size" android:layout_gravity="center_vertical|end" android:layout_marginTop="@dimen/notification_right_icon_headerless_margin" android:layout_marginBottom="@dimen/notification_right_icon_headerless_margin" android:layout_marginStart="@dimen/notification_right_icon_content_margin" android:background="@drawable/notification_large_icon_outline" android:clipToOutline="true" android:importantForAccessibility="no" android:scaleType="centerCrop" /> <FrameLayout android:id="@+id/expand_button_touch_container" android:layout_width="wrap_content" android:layout_height="match_parent" android:minWidth="@dimen/notification_content_margin_end" > <include layout="@layout/notification_expand_button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_vertical|end" /> </FrameLayout> </LinearLayout> </com.android.internal.widget.NotificationMaxHeightFrameLayout> <LinearLayout android:id="@+id/notification_action_list_margin_target" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="-20dp" android:clipChildren="false" android:orientation="vertical"> <include layout="@layout/notification_template_smart_reply_container" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="@dimen/notification_content_margin" android:layout_marginStart="@dimen/notification_2025_content_margin_start" android:layout_marginEnd="@dimen/notification_content_margin_end" /> <include layout="@layout/notification_material_action_list" /> </LinearLayout> </LinearLayout> </com.android.internal.widget.MessagingLayout> core/res/res/values/symbols.xml +2 −0 Original line number Diff line number Diff line Loading @@ -2393,6 +2393,8 @@ <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_2025_template_collapsed_messaging" /> <java-symbol type="layout" name="notification_2025_template_collapsed_media" /> <java-symbol type="layout" name="notification_template_material_base" /> <java-symbol type="layout" name="notification_template_material_heads_up_base" /> <java-symbol type="layout" name="notification_template_material_compact_heads_up_base" /> Loading Loading
core/java/android/app/Notification.java +17 −5 Original line number Diff line number Diff line Loading @@ -817,13 +817,13 @@ public class Notification implements Parcelable R.layout.notification_2025_template_expanded_base, R.layout.notification_2025_template_heads_up_base, R.layout.notification_2025_template_header, R.layout.notification_2025_template_collapsed_messaging, R.layout.notification_2025_template_collapsed_media, R.layout.notification_template_material_big_picture, R.layout.notification_template_material_big_text, R.layout.notification_template_material_inbox, R.layout.notification_template_material_messaging, R.layout.notification_template_material_big_messaging, R.layout.notification_template_material_conversation, R.layout.notification_template_material_media, R.layout.notification_template_material_big_media, R.layout.notification_template_material_call, R.layout.notification_template_material_big_call, Loading Loading @@ -5924,7 +5924,7 @@ public class Notification implements Parcelable || resId == getCompactHeadsUpBaseLayoutResource() || resId == getMessagingCompactHeadsUpLayoutResource() || resId == getCollapsedMessagingLayoutResource() || resId == R.layout.notification_template_material_media); || resId == getCollapsedMediaLayoutResource()); RemoteViews contentView = new BuilderRemoteViews(mContext.getApplicationInfo(), resId); resetStandardTemplate(contentView); Loading Loading @@ -7573,13 +7573,25 @@ public class Notification implements Parcelable } private int getCollapsedMessagingLayoutResource() { if (Flags.notificationsRedesignTemplates()) { return R.layout.notification_2025_template_collapsed_messaging; } else { return R.layout.notification_template_material_messaging; } } private int getExpandedMessagingLayoutResource() { return R.layout.notification_template_material_big_messaging; } private int getCollapsedMediaLayoutResource() { if (Flags.notificationsRedesignTemplates()) { return R.layout.notification_2025_template_collapsed_media; } else { return R.layout.notification_template_material_media; } } private int getConversationLayoutResource() { return R.layout.notification_template_material_conversation; } Loading Loading @@ -10480,7 +10492,7 @@ public class Notification implements Parcelable .fillTextsFrom(mBuilder); TemplateBindResult result = new TemplateBindResult(); RemoteViews template = mBuilder.applyStandardTemplate( R.layout.notification_template_material_media, p, mBuilder.getCollapsedMediaLayoutResource(), p, null /* result */); for (int i = 0; i < MAX_MEDIA_BUTTONS_IN_COMPACT; i++) { Loading
core/res/res/layout/notification_2025_template_collapsed_media.xml 0 → 100644 +197 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- ~ Copyright (C) 2014 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 is the old media style notification (different from UMO). --> <!-- extends FrameLayout --> <com.android.internal.widget.MediaNotificationView android:id="@+id/status_bar_latest_event_content" xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" android:minHeight="@dimen/notification_min_height" android:tag="media" > <ImageView android:id="@+id/left_icon" android:layout_width="@dimen/notification_2025_left_icon_size" android:layout_height="@dimen/notification_2025_left_icon_size" android:layout_gravity="center_vertical|start" android:layout_marginStart="@dimen/notification_left_icon_start" android:background="@drawable/notification_large_icon_outline" android:clipToOutline="true" android:importantForAccessibility="no" android:scaleType="centerCrop" android:visibility="gone" /> <com.android.internal.widget.NotificationRowIconView android:id="@+id/icon" android:layout_width="@dimen/notification_2025_icon_circle_size" android:layout_height="@dimen/notification_2025_icon_circle_size" android:layout_gravity="center_vertical|start" android:layout_marginStart="@dimen/notification_icon_circle_start" android:background="@drawable/notification_icon_circle" android:padding="@dimen/notification_2025_icon_circle_padding" /> <FrameLayout android:id="@+id/alternate_expand_target" android:layout_width="@dimen/notification_2025_content_margin_start" android:layout_height="match_parent" android:layout_gravity="start" android:importantForAccessibility="no" android:focusable="false" /> <LinearLayout android:id="@+id/notification_headerless_view_row" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginStart="@dimen/notification_2025_content_margin_start" android:orientation="horizontal" > <LinearLayout android:id="@+id/notification_headerless_view_column" android:layout_width="0px" android:layout_height="wrap_content" android:layout_gravity="center_vertical" android:layout_weight="1" android:layout_marginBottom="@dimen/notification_headerless_margin_twoline" android:layout_marginTop="@dimen/notification_headerless_margin_twoline" android:orientation="vertical" > <NotificationTopLineView android:id="@+id/notification_top_line" android:layout_width="wrap_content" android:layout_height="wrap_content" android:minHeight="@dimen/notification_headerless_line_height" android:clipChildren="false" android:theme="@style/Theme.DeviceDefault.Notification" > <!-- NOTE: The notification_top_line_views layout contains the app_name_text. In order to include the title view at the beginning, the Notification.Builder has logic to hide that view whenever this title view is to be visible. --> <TextView android:id="@+id/title" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginEnd="@dimen/notification_header_separating_margin" android:ellipsize="end" android:fadingEdge="horizontal" android:singleLine="true" android:textAlignment="viewStart" android:textAppearance="@style/TextAppearance.DeviceDefault.Notification.Title" /> <include layout="@layout/notification_top_line_views" /> </NotificationTopLineView> <LinearLayout android:id="@+id/notification_main_column" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" > <com.android.internal.widget.NotificationVanishingFrameLayout android:layout_width="match_parent" android:layout_height="@dimen/notification_headerless_line_height" > <!-- This is the simplest way to keep this text vertically centered without gravity="center_vertical" which causes jumpiness in expansion animations. --> <include layout="@layout/notification_template_text" android:layout_width="match_parent" android:layout_height="@dimen/notification_text_height" android:layout_gravity="center_vertical" android:layout_marginTop="0dp" /> </com.android.internal.widget.NotificationVanishingFrameLayout> <include layout="@layout/notification_template_progress" android:layout_width="match_parent" android:layout_height="@dimen/notification_headerless_line_height" /> </LinearLayout> </LinearLayout> <ImageView android:id="@+id/right_icon" android:layout_width="@dimen/notification_right_icon_size" android:layout_height="@dimen/notification_right_icon_size" android:layout_gravity="center_vertical|end" android:layout_marginTop="@dimen/notification_right_icon_headerless_margin" android:layout_marginBottom="@dimen/notification_right_icon_headerless_margin" android:layout_marginStart="@dimen/notification_right_icon_content_margin" android:background="@drawable/notification_large_icon_outline" android:clipToOutline="true" android:importantForAccessibility="no" android:scaleType="centerCrop" /> <LinearLayout android:id="@+id/media_actions" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_vertical" android:layoutDirection="ltr" android:orientation="horizontal" > <include layout="@layout/notification_material_media_action" android:id="@+id/action0" /> <include layout="@layout/notification_material_media_action" android:id="@+id/action1" /> <include layout="@layout/notification_material_media_action" android:id="@+id/action2" /> </LinearLayout> <FrameLayout android:id="@+id/expand_button_touch_container" android:layout_width="wrap_content" android:layout_height="match_parent" android:minWidth="@dimen/notification_content_margin_end" > <include layout="@layout/notification_expand_button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_vertical|end" /> </FrameLayout> </LinearLayout> </com.android.internal.widget.MediaNotificationView>
core/res/res/layout/notification_2025_template_collapsed_messaging.xml 0 → 100644 +220 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- ~ Copyright (C) 2016 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 is the old "Messaging Style" notification (not a conversation). --> <!-- extends FrameLayout --> <com.android.internal.widget.MessagingLayout 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:clipChildren="false" android:tag="messaging" > <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:clipChildren="false" android:orientation="vertical" > <com.android.internal.widget.NotificationMaxHeightFrameLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:minHeight="@dimen/notification_min_height" android:clipChildren="false" > <ImageView android:id="@+id/left_icon" android:layout_width="@dimen/notification_2025_left_icon_size" android:layout_height="@dimen/notification_2025_left_icon_size" android:layout_gravity="center_vertical|start" android:layout_marginStart="@dimen/notification_left_icon_start" android:background="@drawable/notification_large_icon_outline" android:clipToOutline="true" android:importantForAccessibility="no" android:scaleType="centerCrop" android:visibility="gone" /> <com.android.internal.widget.NotificationRowIconView android:id="@+id/icon" android:layout_width="@dimen/notification_2025_icon_circle_size" android:layout_height="@dimen/notification_2025_icon_circle_size" android:layout_gravity="center_vertical|start" android:layout_marginStart="@dimen/notification_icon_circle_start" android:background="@drawable/notification_icon_circle" android:padding="@dimen/notification_2025_icon_circle_padding" /> <FrameLayout android:id="@+id/alternate_expand_target" android:layout_width="@dimen/notification_2025_content_margin_start" android:layout_height="match_parent" android:layout_gravity="start" android:importantForAccessibility="no" android:focusable="false" /> <!-- NOTE: to make the expansion animation of id/notification_messaging happen vertically, its X positioning must be the left edge of the notification, so instead of putting the layout_marginStart on the id/notification_headerless_view_row, we put it on id/notification_top_line, making the layout here just a bit different from the base. --> <LinearLayout android:id="@+id/notification_headerless_view_row" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="horizontal" android:clipChildren="false" > <!-- NOTE: because messaging will always have 2 lines, this LinearLayout should NOT have the id/notification_headerless_view_column, as that is used for modifying vertical margins to accommodate the single-line state that base supports --> <LinearLayout android:layout_width="0px" android:layout_height="wrap_content" android:layout_gravity="center_vertical" android:layout_weight="1" android:layout_marginBottom="@dimen/notification_headerless_margin_twoline" android:layout_marginTop="@dimen/notification_headerless_margin_twoline" android:layout_marginStart="@dimen/notification_2025_content_margin_start" android:clipChildren="false" android:orientation="vertical" > <NotificationTopLineView android:id="@+id/notification_top_line" android:layout_width="wrap_content" android:layout_height="wrap_content" android:minHeight="@dimen/notification_headerless_line_height" android:clipChildren="false" android:theme="@style/Theme.DeviceDefault.Notification" > <!-- NOTE: The notification_top_line_views layout contains the app_name_text. In order to include the title view at the beginning, the Notification.Builder has logic to hide that view whenever this title view is to be visible. --> <TextView android:id="@+id/title" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginEnd="@dimen/notification_header_separating_margin" android:ellipsize="end" android:fadingEdge="horizontal" android:singleLine="true" android:textAlignment="viewStart" android:textAppearance="@style/TextAppearance.DeviceDefault.Notification.Title" /> <include layout="@layout/notification_top_line_views" /> </NotificationTopLineView> <LinearLayout android:id="@+id/notification_main_column" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" android:clipChildren="false" > <com.android.internal.widget.MessagingLinearLayout android:id="@+id/notification_messaging" android:layout_width="match_parent" android:layout_height="wrap_content" android:clipChildren="false" android:spacing="@dimen/notification_messaging_spacing" /> </LinearLayout> </LinearLayout> <!-- Images --> <com.android.internal.widget.MessagingLinearLayout android:id="@+id/conversation_image_message_container" android:layout_width="@dimen/notification_right_icon_size" android:layout_height="@dimen/notification_right_icon_size" android:layout_gravity="center_vertical|end" android:layout_marginTop="@dimen/notification_right_icon_headerless_margin" android:layout_marginBottom="@dimen/notification_right_icon_headerless_margin" android:layout_marginStart="@dimen/notification_right_icon_content_margin" android:forceHasOverlappingRendering="false" android:spacing="0dp" android:clipChildren="false" android:visibility="gone" /> <ImageView android:id="@+id/right_icon" android:layout_width="@dimen/notification_right_icon_size" android:layout_height="@dimen/notification_right_icon_size" android:layout_gravity="center_vertical|end" android:layout_marginTop="@dimen/notification_right_icon_headerless_margin" android:layout_marginBottom="@dimen/notification_right_icon_headerless_margin" android:layout_marginStart="@dimen/notification_right_icon_content_margin" android:background="@drawable/notification_large_icon_outline" android:clipToOutline="true" android:importantForAccessibility="no" android:scaleType="centerCrop" /> <FrameLayout android:id="@+id/expand_button_touch_container" android:layout_width="wrap_content" android:layout_height="match_parent" android:minWidth="@dimen/notification_content_margin_end" > <include layout="@layout/notification_expand_button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_vertical|end" /> </FrameLayout> </LinearLayout> </com.android.internal.widget.NotificationMaxHeightFrameLayout> <LinearLayout android:id="@+id/notification_action_list_margin_target" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="-20dp" android:clipChildren="false" android:orientation="vertical"> <include layout="@layout/notification_template_smart_reply_container" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="@dimen/notification_content_margin" android:layout_marginStart="@dimen/notification_2025_content_margin_start" android:layout_marginEnd="@dimen/notification_content_margin_end" /> <include layout="@layout/notification_material_action_list" /> </LinearLayout> </LinearLayout> </com.android.internal.widget.MessagingLayout>
core/res/res/values/symbols.xml +2 −0 Original line number Diff line number Diff line Loading @@ -2393,6 +2393,8 @@ <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_2025_template_collapsed_messaging" /> <java-symbol type="layout" name="notification_2025_template_collapsed_media" /> <java-symbol type="layout" name="notification_template_material_base" /> <java-symbol type="layout" name="notification_template_material_heads_up_base" /> <java-symbol type="layout" name="notification_template_material_compact_heads_up_base" /> Loading