| <?xml version="1.0" encoding="utf-8"?> |
| <!-- |
| Copyright 2017, 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.NotificationInfo |
| 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:paddingStart="@*android:dimen/notification_content_margin_start" |
| android:background="@color/notification_guts_bg_color"> |
| |
| <!-- Package Info --> |
| <RelativeLayout |
| android:id="@+id/header" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| android:clipChildren="false" |
| android:clipToPadding="false"> |
| <ImageView |
| android:id="@+id/pkgicon" |
| android:layout_width="@dimen/notification_guts_header_height" |
| android:layout_height="@dimen/notification_guts_header_height" |
| android:layout_centerVertical="true" |
| android:layout_alignParentStart="true" |
| android:layout_marginEnd="3dp" /> |
| <TextView |
| android:id="@+id/pkgname" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:layout_centerVertical="true" |
| style="@style/TextAppearance.NotificationImportanceHeader" |
| android:layout_marginStart="3dp" |
| android:layout_marginEnd="2dp" |
| android:layout_toEndOf="@id/pkgicon" |
| android:singleLine="true" /> |
| <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/pkgname" |
| 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" /> |
| <!-- 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> |
| |
| <!-- Channel Info Block --> |
| <LinearLayout |
| android:id="@+id/channel_info" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| android:paddingEnd="@*android:dimen/notification_content_margin_end" |
| android:gravity="center" |
| android:orientation="vertical"> |
| <!-- Channel Name --> |
| <TextView |
| android:id="@+id/channel_name" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:layout_weight="1" |
| style="@style/TextAppearance.NotificationImportanceChannel"/> |
| <TextView |
| android:id="@+id/group_name" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| style="@style/TextAppearance.NotificationImportanceChannelGroup" |
| android:ellipsize="end" |
| android:maxLines="1"/> |
| </LinearLayout> |
| |
| <LinearLayout |
| android:id="@+id/blocking_helper" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| android:layout_marginTop="@dimen/notification_guts_button_spacing" |
| android:layout_marginBottom="@dimen/notification_guts_button_spacing" |
| android:paddingEnd="@*android:dimen/notification_content_margin_end" |
| android:clipChildren="false" |
| android:clipToPadding="false" |
| android:orientation="vertical"> |
| <!-- blocking helper text. no need for non-configurable check b/c controls won't be |
| activated in that case --> |
| <TextView |
| android:id="@+id/blocking_helper_text" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:layout_marginTop="2dp" |
| android:text="@string/inline_blocking_helper" |
| style="@*android:style/TextAppearance.DeviceDefault.Notification" /> |
| <RelativeLayout |
| android:id="@+id/block_buttons" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| android:layout_marginTop="@dimen/notification_guts_button_spacing"> |
| <TextView |
| android:id="@+id/blocking_helper_turn_off_notifications" |
| android:text="@string/inline_turn_off_notifications" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:layout_centerVertical="true" |
| android:layout_alignParentStart="true" |
| android:width="110dp" |
| android:paddingEnd="15dp" |
| android:breakStrategy="simple" |
| style="@style/TextAppearance.NotificationInfo.Button"/> |
| <TextView |
| android:id="@+id/deliver_silently" |
| android:text="@string/inline_deliver_silently_button" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:layout_centerVertical="true" |
| android:layout_marginStart="@dimen/notification_guts_button_horizontal_spacing" |
| android:paddingEnd="15dp" |
| android:width="110dp" |
| android:breakStrategy="simple" |
| android:layout_toStartOf="@+id/keep_showing" |
| style="@style/TextAppearance.NotificationInfo.Button"/> |
| <TextView |
| android:id="@+id/keep_showing" |
| android:text="@string/inline_keep_button" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:layout_centerVertical="true" |
| android:layout_marginStart="@dimen/notification_guts_button_horizontal_spacing" |
| android:width="110dp" |
| android:breakStrategy="simple" |
| android:layout_alignParentEnd="true" |
| style="@style/TextAppearance.NotificationInfo.Button"/> |
| </RelativeLayout> |
| |
| </LinearLayout> |
| |
| <LinearLayout |
| android:id="@+id/inline_controls" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| android:paddingEnd="@*android:dimen/notification_content_margin_end" |
| android:layout_marginTop="@dimen/notification_guts_option_vertical_padding" |
| android:clipChildren="false" |
| android:clipToPadding="false" |
| android:orientation="vertical"> |
| |
| <!-- Non configurable app/channel text. appears instead of @+id/interruptiveness_settings--> |
| <TextView |
| android:id="@+id/non_configurable_text" |
| android:text="@string/notification_unblockable_desc" |
| android:visibility="gone" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| style="@*android:style/TextAppearance.DeviceDefault.Notification" /> |
| |
| <!-- Non configurable multichannel text. appears instead of @+id/interruptiveness_settings--> |
| <TextView |
| android:id="@+id/non_configurable_multichannel_text" |
| android:text="@string/notification_multichannel_desc" |
| android:visibility="gone" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| style="@*android:style/TextAppearance.DeviceDefault.Notification" /> |
| |
| <LinearLayout |
| android:id="@+id/interruptiveness_settings" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| android:gravity="center" |
| android:orientation="vertical"> |
| |
| <RelativeLayout |
| android:id="@+id/alert" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| android:padding="@dimen/notification_importance_button_padding" |
| android:clickable="true" |
| android:focusable="true"> |
| <ImageView |
| android:id="@+id/alert_icon" |
| android:src="@drawable/ic_notification_interruptive" |
| android:background="@android:color/transparent" |
| android:layout_gravity="center" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:clickable="false" |
| android:focusable="false"/> |
| <TextView |
| android:id="@+id/alert_label" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| android:ellipsize="end" |
| android:maxLines="1" |
| android:clickable="false" |
| android:focusable="false" |
| android:layout_toEndOf="@id/alert_icon" |
| android:layout_marginStart="@dimen/notification_importance_drawable_padding" |
| android:textAppearance="@style/TextAppearance.NotificationImportanceButton.Unselected" |
| android:text="@string/notification_alert_title"/> |
| <TextView |
| android:id="@+id/alert_summary" |
| android:paddingTop="@dimen/notification_importance_button_padding" |
| android:text="@string/notification_channel_summary_default" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| android:clickable="false" |
| android:focusable="false" |
| android:ellipsize="end" |
| android:maxLines="2" |
| android:layout_below="@id/alert_icon" |
| android:textAppearance="@style/TextAppearance.NotificationImportanceDetail"/> |
| </RelativeLayout> |
| |
| <RelativeLayout |
| android:id="@+id/silence" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| android:padding="@dimen/notification_importance_button_padding" |
| android:layout_marginTop="@dimen/notification_importance_button_separation" |
| android:clickable="true" |
| android:focusable="true"> |
| <ImageView |
| android:id="@+id/silence_icon" |
| android:src="@drawable/ic_notification_gentle" |
| android:background="@android:color/transparent" |
| android:layout_gravity="center" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:clickable="false" |
| android:focusable="false"/> |
| <TextView |
| android:id="@+id/silence_label" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| android:ellipsize="end" |
| android:maxLines="1" |
| android:clickable="false" |
| android:focusable="false" |
| android:layout_toEndOf="@id/silence_icon" |
| android:layout_marginStart="@dimen/notification_importance_drawable_padding" |
| android:textAppearance="@style/TextAppearance.NotificationImportanceButton.Unselected" |
| android:text="@string/notification_silence_title"/> |
| <TextView |
| android:id="@+id/silence_summary" |
| android:paddingTop="@dimen/notification_importance_button_padding" |
| android:text="@string/notification_channel_summary_default" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| android:clickable="false" |
| android:focusable="false" |
| android:ellipsize="end" |
| android:maxLines="2" |
| android:layout_below="@id/silence_icon" |
| android:textAppearance="@style/TextAppearance.NotificationImportanceDetail"/> |
| </RelativeLayout> |
| |
| </LinearLayout> |
| |
| <RelativeLayout |
| android:id="@+id/bottom_buttons" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| android:layout_marginTop="@dimen/notification_guts_button_spacing" > |
| <TextView |
| android:id="@+id/turn_off_notifications" |
| android:text="@string/inline_turn_off_notifications" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:layout_alignParentStart="true" |
| android:minWidth="@dimen/notification_importance_toggle_size" |
| android:minHeight="@dimen/notification_importance_toggle_size" |
| android:maxWidth="200dp" |
| style="@style/TextAppearance.NotificationInfo.Button"/> |
| <TextView |
| android:id="@+id/done" |
| android:text="@string/inline_ok_button" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:layout_alignParentEnd="true" |
| android:gravity="center_vertical|end" |
| android:maxWidth="125dp" |
| android:minWidth="@dimen/notification_importance_toggle_size" |
| android:minHeight="@dimen/notification_importance_toggle_size" |
| style="@style/TextAppearance.NotificationInfo.Button"/> |
| </RelativeLayout> |
| |
| </LinearLayout> |
| |
| <com.android.systemui.statusbar.notification.row.NotificationUndoLayout |
| android:id="@+id/confirmation" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| android:visibility="gone" |
| android:orientation="horizontal" > |
| <TextView |
| android:id="@+id/confirmation_text" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:layout_gravity="start|center_vertical" |
| android:layout_marginStart="@*android:dimen/notification_content_margin_start" |
| android:layout_marginEnd="@*android:dimen/notification_content_margin_start" |
| android:text="@string/notification_channel_disabled" |
| style="@style/TextAppearance.NotificationInfo.Confirmation"/> |
| <TextView |
| android:id="@+id/undo" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:minWidth="@dimen/notification_importance_toggle_size" |
| android:minHeight="@dimen/notification_importance_toggle_size" |
| android:layout_marginTop="@dimen/notification_guts_button_spacing" |
| android:layout_marginBottom="@dimen/notification_guts_button_spacing" |
| android:layout_marginStart="@dimen/notification_guts_button_side_margin" |
| android:layout_marginEnd="@dimen/notification_guts_button_side_margin" |
| android:layout_gravity="end|center_vertical" |
| android:text="@string/inline_undo" |
| style="@style/TextAppearance.NotificationInfo.Button"/> |
| </com.android.systemui.statusbar.notification.row.NotificationUndoLayout> |
| </com.android.systemui.statusbar.notification.row.NotificationInfo> |