| <?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" |
| xmlns:androidprv="http://schemas.android.com/apk/prv/res/android" |
| android:id="@+id/notification_guts" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| android:focusable="true" |
| android:clipChildren="false" |
| android:clipToPadding="true" |
| android:orientation="vertical" |
| android:paddingStart="@dimen/notification_shade_content_margin_horizontal"> |
| |
| <!-- Package Info --> |
| <LinearLayout |
| android:id="@+id/header" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| android:gravity="center_vertical" |
| android:clipChildren="false" |
| android:paddingTop="@dimen/notification_guts_header_top_padding" |
| android:clipToPadding="true"> |
| <ImageView |
| android:id="@+id/pkg_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="15dp" /> |
| <LinearLayout |
| android:id="@+id/names" |
| android:layout_weight="1" |
| android:layout_width="0dp" |
| android:orientation="vertical" |
| android:layout_height="wrap_content" |
| android:minHeight="@dimen/notification_guts_conversation_icon_size" |
| android:layout_centerVertical="true" |
| android:gravity="center_vertical" |
| android:layout_alignEnd="@id/pkg_icon" |
| android:layout_toEndOf="@id/pkg_icon"> |
| <TextView |
| android:id="@+id/channel_name" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| android:textDirection="locale" |
| style="@style/TextAppearance.NotificationImportanceChannel"/> |
| <TextView |
| android:id="@+id/group_name" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| android:textDirection="locale" |
| android:ellipsize="end" |
| style="@style/TextAppearance.NotificationImportanceChannelGroup"/> |
| <TextView |
| android:id="@+id/pkg_name" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| style="@style/TextAppearance.NotificationImportanceApp" |
| android:ellipsize="end" |
| android:textDirection="locale" |
| android:maxLines="1"/> |
| <TextView |
| android:id="@+id/delegate_name" |
| android:layout_width="match_parent" |
| 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:textDirection="locale" |
| android:text="@string/notification_delegate_header" |
| android:maxLines="1" /> |
| |
| </LinearLayout> |
| |
| <!-- end aligned fields --> |
| <!-- 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="?androidprv:attr/materialColorPrimary"/> |
| <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:contentDescription="@string/notification_more_settings" |
| android:background="@drawable/ripple_drawable_20dp" |
| android:src="@drawable/ic_settings" |
| android:tint="?androidprv:attr/materialColorPrimary" |
| android:layout_alignParentEnd="true" /> |
| |
| </LinearLayout> |
| |
| <LinearLayout |
| android:id="@+id/inline_controls" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| android:paddingEnd="@dimen/notification_shade_content_margin_horizontal" |
| 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 app/channel text. appears instead of @+id/interruptiveness_settings--> |
| <TextView |
| android:id="@+id/non_configurable_call_text" |
| android:text="@string/notification_unblockable_call_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"> |
| <com.android.systemui.statusbar.notification.row.ButtonLinearLayout |
| android:id="@+id/automatic" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| android:layout_marginBottom="@dimen/notification_importance_button_separation" |
| android:padding="@dimen/notification_importance_button_padding" |
| android:clickable="true" |
| android:focusable="true" |
| android:background="@drawable/notification_guts_priority_button_bg" |
| android:orientation="vertical" |
| android:visibility="gone"> |
| <LinearLayout |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| android:orientation="horizontal" |
| android:gravity="center" |
| > |
| <ImageView |
| android:id="@+id/automatic_icon" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:src="@drawable/ic_notifications_automatic" |
| android:background="@android:color/transparent" |
| android:tint="@color/notification_guts_priority_contents" |
| android:clickable="false" |
| android:focusable="false"/> |
| <TextView |
| android:id="@+id/automatic_label" |
| android:layout_width="0dp" |
| android:layout_height="wrap_content" |
| android:layout_marginStart="@dimen/notification_importance_drawable_padding" |
| android:layout_weight="1" |
| android:ellipsize="end" |
| android:maxLines="1" |
| android:clickable="false" |
| android:focusable="false" |
| android:textAppearance="@style/TextAppearance.NotificationImportanceButton" |
| android:text="@string/notification_automatic_title"/> |
| </LinearLayout> |
| <TextView |
| android:id="@+id/automatic_summary" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| android:layout_marginTop="@dimen/notification_importance_button_description_top_margin" |
| android:visibility="gone" |
| android:text="@string/notification_channel_summary_automatic" |
| android:clickable="false" |
| android:focusable="false" |
| android:ellipsize="end" |
| android:maxLines="2" |
| android:textAppearance="@style/TextAppearance.NotificationImportanceDetail"/> |
| </com.android.systemui.statusbar.notification.row.ButtonLinearLayout> |
| |
| <com.android.systemui.statusbar.notification.row.ButtonLinearLayout |
| 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" |
| android:background="@drawable/notification_guts_priority_button_bg" |
| android:orientation="vertical"> |
| <LinearLayout |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| android:orientation="horizontal" |
| android:gravity="center" |
| > |
| <ImageView |
| android:id="@+id/alert_icon" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:src="@drawable/ic_notifications_alert" |
| android:background="@android:color/transparent" |
| android:tint="@color/notification_guts_priority_contents" |
| android:clickable="false" |
| android:focusable="false"/> |
| <TextView |
| android:id="@+id/alert_label" |
| android:layout_width="0dp" |
| android:layout_height="wrap_content" |
| android:layout_marginStart="@dimen/notification_importance_drawable_padding" |
| android:layout_weight="1" |
| android:ellipsize="end" |
| android:maxLines="1" |
| android:clickable="false" |
| android:focusable="false" |
| android:textAppearance="@style/TextAppearance.NotificationImportanceButton" |
| android:text="@string/notification_alert_title"/> |
| </LinearLayout> |
| <TextView |
| android:id="@+id/alert_summary" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| android:layout_marginTop="@dimen/notification_importance_button_description_top_margin" |
| android:visibility="gone" |
| android:text="@string/notification_channel_summary_default" |
| android:clickable="false" |
| android:focusable="false" |
| android:ellipsize="end" |
| android:maxLines="2" |
| android:textAppearance="@style/TextAppearance.NotificationImportanceDetail"/> |
| </com.android.systemui.statusbar.notification.row.ButtonLinearLayout> |
| |
| <com.android.systemui.statusbar.notification.row.ButtonLinearLayout |
| android:id="@+id/silence" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| android:layout_marginTop="@dimen/notification_importance_button_separation" |
| android:padding="@dimen/notification_importance_button_padding" |
| android:clickable="true" |
| android:focusable="true" |
| android:background="@drawable/notification_guts_priority_button_bg" |
| android:orientation="vertical"> |
| <LinearLayout |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| android:orientation="horizontal" |
| android:gravity="center" |
| > |
| <ImageView |
| android:id="@+id/silence_icon" |
| android:src="@drawable/ic_notifications_silence" |
| android:background="@android:color/transparent" |
| android:tint="@color/notification_guts_priority_contents" |
| 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" |
| android:text="@string/notification_silence_title"/> |
| </LinearLayout> |
| <TextView |
| android:id="@+id/silence_summary" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| android:layout_marginTop="@dimen/notification_importance_button_description_top_margin" |
| android:visibility="gone" |
| android:text="@string/notification_channel_summary_low" |
| android:clickable="false" |
| android:focusable="false" |
| android:ellipsize="end" |
| android:maxLines="2" |
| android:textAppearance="@style/TextAppearance.NotificationImportanceDetail"/> |
| </com.android.systemui.statusbar.notification.row.ButtonLinearLayout> |
| |
| </LinearLayout> |
| |
| <RelativeLayout |
| android:id="@+id/bottom_buttons" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| android:minHeight="60dp" |
| android:gravity="center_vertical" |
| android:paddingStart="4dp" |
| android:paddingEnd="4dp" |
| > |
| <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:gravity="start|center_vertical" |
| 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="end|center_vertical" |
| android:minWidth="@dimen/notification_importance_toggle_size" |
| android:minHeight="@dimen/notification_importance_toggle_size" |
| android:maxWidth="125dp" |
| style="@style/TextAppearance.NotificationInfo.Button"/> |
| </RelativeLayout> |
| </LinearLayout> |
| </com.android.systemui.statusbar.notification.row.NotificationInfo> |