| <?xml version="1.0" encoding="utf-8"?> |
| <!-- |
| Copyright 2020, 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. |
| --> |
| |
| <com.android.systemui.statusbar.notification.row.NotificationConversationInfo |
| xmlns:android="http://schemas.android.com/apk/res/android" |
| android:id="@+id/notification_guts" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| android:clickable="true" |
| android:clipChildren="false" |
| android:clipToPadding="true" |
| android:orientation="vertical" |
| android:background="@color/notification_material_background_color" |
| android:paddingStart="@*android:dimen/notification_content_margin_start"> |
| |
| <!-- Package Info --> |
| <RelativeLayout |
| android:id="@+id/header" |
| android:layout_width="match_parent" |
| android:layout_height="@dimen/notification_guts_conversation_header_height" |
| android:gravity="center_vertical" |
| android:clipChildren="false" |
| android:clipToPadding="false"> |
| <ImageView |
| android:id="@+id/conversation_icon" |
| android:layout_width="@dimen/notification_guts_conversation_icon_size" |
| android:layout_height="@dimen/notification_guts_conversation_icon_size" |
| android:layout_centerVertical="true" |
| android:layout_alignParentStart="true" |
| android:layout_marginEnd="6dp" /> |
| <LinearLayout |
| android:id="@+id/names" |
| android:orientation="vertical" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:minHeight="@dimen/notification_guts_conversation_icon_size" |
| android:layout_centerVertical="true" |
| android:gravity="center_vertical" |
| android:layout_toEndOf="@id/conversation_icon"> |
| <LinearLayout |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| android:gravity="start" |
| android:orientation="horizontal"> |
| <TextView |
| android:id="@+id/parent_channel_name" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:layout_weight="1" |
| style="@style/TextAppearance.NotificationImportanceChannel"/> |
| <TextView |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:layout_centerVertical="true" |
| style="@style/TextAppearance.NotificationImportanceHeader" |
| android:layout_marginStart="2dp" |
| android:layout_marginEnd="2dp" |
| android:text="@*android:string/notification_header_divider_symbol" /> |
| <TextView |
| android:id="@+id/name" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:layout_weight="1" |
| style="@style/TextAppearance.NotificationImportanceChannel"/> |
| </LinearLayout> |
| <LinearLayout |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| android:gravity="start" |
| android:orientation="horizontal"> |
| <TextView |
| android:id="@+id/pkg_name" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| style="@style/TextAppearance.NotificationImportanceChannelGroup" |
| android:ellipsize="end" |
| android:maxLines="1"/> |
| <TextView |
| android:id="@+id/group_divider" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:layout_centerVertical="true" |
| style="@style/TextAppearance.NotificationImportanceHeader" |
| android:layout_marginStart="2dp" |
| android:layout_marginEnd="2dp" |
| android:text="@*android:string/notification_header_divider_symbol" /> |
| <TextView |
| android:id="@+id/group_name" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:layout_weight="1" |
| style="@style/TextAppearance.NotificationImportanceChannel"/> |
| </LinearLayout> |
| |
| </LinearLayout> |
| |
| <TextView |
| android:id="@+id/pkg_divider" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:layout_centerVertical="true" |
| style="@style/TextAppearance.NotificationImportanceHeader" |
| android:layout_marginStart="2dp" |
| android:layout_marginEnd="2dp" |
| android:layout_toEndOf="@id/name" |
| android:text="@*android:string/notification_header_divider_symbol" /> |
| <TextView |
| android:id="@+id/delegate_name" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:layout_centerVertical="true" |
| style="@style/TextAppearance.NotificationImportanceHeader" |
| android:layout_marginStart="2dp" |
| android:layout_marginEnd="2dp" |
| android:ellipsize="end" |
| android:text="@string/notification_delegate_header" |
| android:layout_toEndOf="@id/pkg_divider" |
| android:maxLines="1" /> |
| |
| <!-- end aligned fields --> |
| <ImageButton |
| android:id="@+id/demote" |
| android:layout_width="@dimen/notification_importance_toggle_size" |
| android:layout_height="@dimen/notification_importance_toggle_size" |
| android:layout_centerVertical="true" |
| android:background="@drawable/ripple_drawable" |
| android:contentDescription="@string/demote" |
| android:src="@drawable/ic_demote_conversation" |
| android:layout_toStartOf="@id/app_settings" |
| android:tint="@color/notification_guts_link_icon_tint"/> |
| <!-- Optional link to app. Only appears if the channel is not disabled and the app |
| asked for it --> |
| <ImageButton |
| android:id="@+id/app_settings" |
| android:layout_width="@dimen/notification_importance_toggle_size" |
| android:layout_height="@dimen/notification_importance_toggle_size" |
| android:layout_centerVertical="true" |
| android:visibility="gone" |
| android:background="@drawable/ripple_drawable" |
| android:contentDescription="@string/notification_app_settings" |
| android:src="@drawable/ic_info" |
| android:layout_toStartOf="@id/info" |
| android:tint="@color/notification_guts_link_icon_tint"/> |
| <ImageButton |
| android:id="@+id/info" |
| android:layout_width="@dimen/notification_importance_toggle_size" |
| android:layout_height="@dimen/notification_importance_toggle_size" |
| android:layout_centerVertical="true" |
| android:background="@drawable/ripple_drawable" |
| android:contentDescription="@string/notification_more_settings" |
| android:src="@drawable/ic_settings" |
| android:layout_alignParentEnd="true" |
| android:tint="@color/notification_guts_link_icon_tint"/> |
| </RelativeLayout> |
| |
| <LinearLayout |
| android:id="@+id/actions" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| android:layout_marginEnd="@*android:dimen/notification_content_margin_end" |
| android:clipChildren="false" |
| android:clipToPadding="false" |
| android:orientation="vertical"> |
| |
| <View |
| android:layout_width="match_parent" |
| android:layout_height="0.5dp" |
| android:background="@color/GM2_grey_300" /> |
| <Button |
| android:id="@+id/bubble" |
| android:layout_height="@dimen/notification_guts_conversation_action_height" |
| android:layout_width="match_parent" |
| style="?android:attr/borderlessButtonStyle" |
| android:text="@string/notification_conversation_favorite" |
| android:gravity="left|center_vertical" |
| android:drawableStart="@drawable/ic_create_bubble" |
| android:drawablePadding="@dimen/notification_guts_conversation_action_text_padding_start" |
| android:drawableTint="@color/notification_guts_link_icon_tint"/> |
| |
| <View |
| android:layout_width="match_parent" |
| android:layout_height="0.5dp" |
| android:background="@color/GM2_grey_300" /> |
| <Button |
| android:id="@+id/home" |
| android:layout_height="@dimen/notification_guts_conversation_action_height" |
| android:layout_width="match_parent" |
| style="?android:attr/borderlessButtonStyle" |
| android:text="@string/notification_conversation_home_screen" |
| android:gravity="left|center_vertical" |
| android:drawableStart="@drawable/ic_add_to_home" |
| android:drawablePadding="@dimen/notification_guts_conversation_action_text_padding_start" |
| android:drawableTint="@color/notification_guts_link_icon_tint"/> |
| |
| <View |
| android:layout_width="match_parent" |
| android:layout_height="0.5dp" |
| android:background="@color/GM2_grey_300" /> |
| <Button |
| android:id="@+id/fave" |
| android:layout_height="@dimen/notification_guts_conversation_action_height" |
| android:layout_width="match_parent" |
| style="?android:attr/borderlessButtonStyle" |
| android:gravity="left|center_vertical" |
| android:drawablePadding="@dimen/notification_guts_conversation_action_text_padding_start" |
| android:drawableTint="@color/notification_guts_link_icon_tint"/> |
| |
| <View |
| android:layout_width="match_parent" |
| android:layout_height="0.5dp" |
| android:background="@color/GM2_grey_300" /> |
| <Button |
| android:id="@+id/snooze" |
| android:layout_height="@dimen/notification_guts_conversation_action_height" |
| android:layout_width="match_parent" |
| style="?android:attr/borderlessButtonStyle" |
| android:text="@string/notification_menu_snooze_action" |
| android:gravity="left|center_vertical" |
| android:drawableStart="@drawable/ic_snooze" |
| android:drawablePadding="@dimen/notification_guts_conversation_action_text_padding_start" |
| android:drawableTint="@color/notification_guts_link_icon_tint"/> |
| |
| <View |
| android:layout_width="match_parent" |
| android:layout_height="0.5dp" |
| android:background="@color/GM2_grey_300" /> |
| <Button |
| android:id="@+id/mute" |
| android:layout_height="@dimen/notification_guts_conversation_action_height" |
| android:layout_width="match_parent" |
| style="?android:attr/borderlessButtonStyle" |
| android:text="@string/notification_conversation_mute" |
| android:gravity="left|center_vertical" |
| android:drawableStart="@drawable/ic_notifications_silence" |
| android:drawablePadding="@dimen/notification_guts_conversation_action_text_padding_start" |
| android:drawableTint="@color/notification_guts_link_icon_tint"/> |
| |
| </LinearLayout> |
| |
| </com.android.systemui.statusbar.notification.row.NotificationConversationInfo> |