blob: c86ebe70db5c42c0d137fe2159e39d9e5ec352d6 [file] [log] [blame]
Mady Mellor87d79452017-01-10 11:52:52 -08001<?xml version="1.0" encoding="utf-8"?>
2<!--
3 Copyright 2017, The Android Open Source Project
4
5 Licensed under the Apache License, Version 2.0 (the "License");
6 you may not use this file except in compliance with the License.
7 You may obtain a copy of the License at
8
9 http://www.apache.org/licenses/LICENSE-2.0
10
11 Unless required by applicable law or agreed to in writing, software
12 distributed under the License is distributed on an "AS IS" BASIS,
13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 See the License for the specific language governing permissions and
15 limitations under the License.
16-->
17
Rohan Shah20790b82018-07-02 17:21:04 -070018<com.android.systemui.statusbar.notification.row.NotificationInfo
Rohan Shahc032ac92018-05-03 16:58:37 -070019 xmlns:android="http://schemas.android.com/apk/res/android"
20 android:id="@+id/notification_guts"
21 android:layout_width="match_parent"
22 android:layout_height="wrap_content"
23 android:clickable="true"
24 android:clipChildren="false"
25 android:clipToPadding="false"
26 android:orientation="vertical"
Lucas Dupin957a3f42018-10-11 13:48:30 -070027 android:background="@color/notification_guts_bg_color">
Mady Mellor87d79452017-01-10 11:52:52 -080028
Geoffrey Pitschdf44b602017-02-03 13:31:50 -050029 <!-- Package Info -->
Julia Reynolds437cdb12018-01-03 12:27:24 -050030 <RelativeLayout
Julia Reynoldse0341482018-03-08 14:42:50 -050031 android:id="@+id/header"
Mady Mellor87d79452017-01-10 11:52:52 -080032 android:layout_width="match_parent"
Julia Reynolds6c238832018-02-15 09:49:27 -050033 android:layout_height="wrap_content"
Rohan Shahc032ac92018-05-03 16:58:37 -070034 android:layout_marginStart="@*android:dimen/notification_content_margin_start"
Geoffrey Pitschd0856f02017-02-16 10:51:18 -050035 android:clipChildren="false"
Rohan Shah75bb1282018-04-30 13:50:13 -070036 android:clipToPadding="false">
Geoffrey Pitschdf44b602017-02-03 13:31:50 -050037 <ImageView
38 android:id="@+id/pkgicon"
Julia Reynolds437cdb12018-01-03 12:27:24 -050039 android:layout_width="@dimen/notification_guts_header_height"
40 android:layout_height="@dimen/notification_guts_header_height"
Julia Reynolds6c238832018-02-15 09:49:27 -050041 android:layout_centerVertical="true"
Julia Reynolds437cdb12018-01-03 12:27:24 -050042 android:layout_marginEnd="3dp" />
Mady Mellor87d79452017-01-10 11:52:52 -080043 <TextView
44 android:id="@+id/pkgname"
45 android:layout_width="wrap_content"
46 android:layout_height="wrap_content"
Geoffrey Pitschd0856f02017-02-16 10:51:18 -050047 android:textAppearance="@*android:style/TextAppearance.Material.Notification.Info"
48 android:layout_marginStart="3dp"
49 android:layout_marginEnd="2dp"
Julia Reynolds437cdb12018-01-03 12:27:24 -050050 android:singleLine="true"
51 android:layout_centerVertical="true"
52 android:layout_toEndOf="@id/pkgicon" />
Mady Mellor87d79452017-01-10 11:52:52 -080053 <TextView
Daniel Sandlerd0a52b62018-10-31 20:13:22 +000054 android:id="@+id/pkg_group_divider"
Geoffrey Pitschdf44b602017-02-03 13:31:50 -050055 android:layout_width="wrap_content"
56 android:layout_height="wrap_content"
Geoffrey Pitschd0856f02017-02-16 10:51:18 -050057 android:textAppearance="@*android:style/TextAppearance.Material.Notification.Info"
Geoffrey Pitschdf44b602017-02-03 13:31:50 -050058 android:layout_marginStart="2dp"
59 android:layout_marginEnd="2dp"
Julia Reynolds437cdb12018-01-03 12:27:24 -050060 android:text="@*android:string/notification_header_divider_symbol"
61 android:layout_centerVertical="true"
62 android:layout_toEndOf="@id/pkgname" />
Geoffrey Pitschdf44b602017-02-03 13:31:50 -050063 <TextView
Daniel Sandlerd0a52b62018-10-31 20:13:22 +000064 android:id="@+id/group_name"
Geoffrey Pitschdf44b602017-02-03 13:31:50 -050065 android:layout_width="wrap_content"
66 android:layout_height="wrap_content"
Geoffrey Pitschd0856f02017-02-16 10:51:18 -050067 android:textAppearance="@*android:style/TextAppearance.Material.Notification.Info"
68 android:layout_marginStart="2dp"
Julia Reynoldsb4309752017-09-01 16:09:25 -040069 android:layout_marginEnd="2dp"
70 android:ellipsize="end"
Julia Reynolds437cdb12018-01-03 12:27:24 -050071 android:maxLines="1"
72 android:layout_centerVertical="true"
Daniel Sandlerd0a52b62018-10-31 20:13:22 +000073 android:layout_toEndOf="@id/pkg_group_divider" />
Rohan Shahc032ac92018-05-03 16:58:37 -070074 <!-- 24 dp icon with 16 dp padding all around to mirror notification content margins -->
Julia Reynolds437cdb12018-01-03 12:27:24 -050075 <ImageButton
76 android:id="@+id/info"
Rohan Shah75bb1282018-04-30 13:50:13 -070077 android:layout_width="56dp"
78 android:layout_height="56dp"
79 android:layout_alignParentEnd="true"
Julia Reynolds6c238832018-02-15 09:49:27 -050080 android:layout_centerVertical="true"
Julia Reynolds437cdb12018-01-03 12:27:24 -050081 android:background="@drawable/ripple_drawable"
Rohan Shah75bb1282018-04-30 13:50:13 -070082 android:contentDescription="@string/notification_more_settings"
83 android:padding="16dp"
84 android:src="@drawable/ic_info"
85 android:tint="?android:attr/colorAccent" />
Julia Reynolds437cdb12018-01-03 12:27:24 -050086 </RelativeLayout>
Geoffrey Pitschdf44b602017-02-03 13:31:50 -050087
Geoffrey Pitschdf44b602017-02-03 13:31:50 -050088 <LinearLayout
Julia Reynolds437cdb12018-01-03 12:27:24 -050089 android:id="@+id/prompt"
Geoffrey Pitschdf44b602017-02-03 13:31:50 -050090 android:layout_width="match_parent"
91 android:layout_height="wrap_content"
Julia Reynolds437cdb12018-01-03 12:27:24 -050092 android:layout_marginBottom="@dimen/notification_guts_button_spacing"
Rohan Shah75bb1282018-04-30 13:50:13 -070093 android:clipChildren="false"
94 android:clipToPadding="false"
Geoffrey Pitsch747f25c2017-05-12 14:19:29 -040095 android:orientation="vertical">
Julia Reynolds437cdb12018-01-03 12:27:24 -050096
97 <!-- Channel Info Block -->
Geoffrey Pitschd0856f02017-02-16 10:51:18 -050098 <LinearLayout
Geoffrey Pitsch747f25c2017-05-12 14:19:29 -040099 android:layout_width="match_parent"
Mady Mellor87d79452017-01-10 11:52:52 -0800100 android:layout_height="wrap_content"
Rohan Shahc032ac92018-05-03 16:58:37 -0700101 android:layout_marginStart="@*android:dimen/notification_content_margin_start"
102 android:layout_marginEnd="@*android:dimen/notification_content_margin_start"
Julia Reynolds437cdb12018-01-03 12:27:24 -0500103 android:orientation="vertical">
Daniel Sandlerd0a52b62018-10-31 20:13:22 +0000104 <!-- Channel Name -->
105 <TextView
106 android:id="@+id/channel_name"
107 android:layout_width="wrap_content"
108 android:layout_height="wrap_content"
109 android:layout_weight="1"
110 style="@android:style/TextAppearance.Material.Notification.Title" />
Julia Reynolds437cdb12018-01-03 12:27:24 -0500111 <!-- Question prompt -->
112 <TextView
113 android:id="@+id/block_prompt"
Geoffrey Pitschd0856f02017-02-16 10:51:18 -0500114 android:layout_width="wrap_content"
115 android:layout_height="wrap_content"
Rohan Shah75bb1282018-04-30 13:50:13 -0700116 style="@android:style/TextAppearance.Material.Notification" />
Geoffrey Pitschd0856f02017-02-16 10:51:18 -0500117 </LinearLayout>
Geoffrey Pitschdf44b602017-02-03 13:31:50 -0500118
Julia Reynolds437cdb12018-01-03 12:27:24 -0500119 <!-- Settings and Done buttons -->
120 <LinearLayout
121 android:layout_width="match_parent"
122 android:layout_height="wrap_content"
Julia Reynolds437cdb12018-01-03 12:27:24 -0500123 android:layout_marginTop="@dimen/notification_guts_button_spacing"
Rohan Shahc032ac92018-05-03 16:58:37 -0700124 android:layout_marginStart="@dimen/notification_guts_button_side_margin"
125 android:layout_marginEnd="@dimen/notification_guts_button_side_margin"
126 android:gravity="end"
127 android:orientation="horizontal">
Julia Reynolds437cdb12018-01-03 12:27:24 -0500128
129 <!-- Optional link to app. Only appears if the channel is not disabled and the app
130 asked for it -->
131 <TextView
132 android:id="@+id/app_settings"
133 android:text="@string/notification_app_settings"
134 android:layout_width="wrap_content"
135 android:layout_height="wrap_content"
136 android:visibility="gone"
137 android:ellipsize="end"
138 android:maxLines="1"
139 style="@style/TextAppearance.NotificationInfo.Button"/>
140 <TextView
141 android:id="@+id/block"
142 android:text="@string/inline_stop_button"
143 android:layout_width="wrap_content"
144 android:layout_height="match_parent"
Rohan Shah75bb1282018-04-30 13:50:13 -0700145 android:layout_marginStart="@dimen/notification_guts_button_horizontal_spacing"
Julia Reynolds437cdb12018-01-03 12:27:24 -0500146 style="@style/TextAppearance.NotificationInfo.Button"/>
147 <TextView
Julia Reynoldse0341482018-03-08 14:42:50 -0500148 android:id="@+id/minimize"
149 android:text="@string/inline_minimize_button"
150 android:layout_width="wrap_content"
151 android:layout_height="match_parent"
Rohan Shah75bb1282018-04-30 13:50:13 -0700152 android:layout_marginStart="@dimen/notification_guts_button_horizontal_spacing"
Julia Reynoldse0341482018-03-08 14:42:50 -0500153 style="@style/TextAppearance.NotificationInfo.Button" />
154 <TextView
Gus Prevas9abc5062018-10-31 16:11:04 -0400155 android:id="@+id/toggle_silent"
156 android:text="@string/inline_silent_button_silent"
157 android:layout_width="wrap_content"
158 android:layout_height="match_parent"
159 android:layout_marginStart="@dimen/notification_guts_button_horizontal_spacing"
160 style="@style/TextAppearance.NotificationInfo.Button" />
161 <TextView
Julia Reynolds437cdb12018-01-03 12:27:24 -0500162 android:id="@+id/keep"
Julia Reynoldsb1e57ea2018-09-07 15:14:32 -0400163 android:minWidth="48dp"
Julia Reynolds437cdb12018-01-03 12:27:24 -0500164 android:text="@string/inline_keep_button"
165 android:layout_width="wrap_content"
166 android:layout_height="match_parent"
Rohan Shah75bb1282018-04-30 13:50:13 -0700167 android:layout_marginStart="@dimen/notification_guts_button_horizontal_spacing"
Julia Reynolds437cdb12018-01-03 12:27:24 -0500168 style="@style/TextAppearance.NotificationInfo.Button"/>
169 </LinearLayout>
Mady Mellor87d79452017-01-10 11:52:52 -0800170 </LinearLayout>
Rohan Shah20790b82018-07-02 17:21:04 -0700171 <com.android.systemui.statusbar.notification.row.NotificationUndoLayout
Julia Reynolds437cdb12018-01-03 12:27:24 -0500172 android:id="@+id/confirmation"
173 android:layout_width="match_parent"
174 android:layout_height="wrap_content"
Julia Reynolds437cdb12018-01-03 12:27:24 -0500175 android:visibility="gone"
176 android:orientation="horizontal" >
177 <TextView
Julia Reynoldse0341482018-03-08 14:42:50 -0500178 android:id="@+id/confirmation_text"
Julia Reynolds437cdb12018-01-03 12:27:24 -0500179 android:layout_width="wrap_content"
180 android:layout_height="wrap_content"
Rohan Shah482193f2018-06-13 20:17:42 -0700181 android:layout_gravity="start|center_vertical"
182 android:layout_marginStart="@*android:dimen/notification_content_margin_start"
183 android:layout_marginEnd="@*android:dimen/notification_content_margin_start"
Julia Reynolds437cdb12018-01-03 12:27:24 -0500184 android:text="@string/notification_channel_disabled"
Julia Reynoldse0341482018-03-08 14:42:50 -0500185 style="@style/TextAppearance.NotificationInfo.Confirmation"/>
Julia Reynolds437cdb12018-01-03 12:27:24 -0500186 <TextView
187 android:id="@+id/undo"
188 android:layout_width="wrap_content"
189 android:layout_height="wrap_content"
Rohan Shah482193f2018-06-13 20:17:42 -0700190 android:layout_marginTop="@dimen/notification_guts_button_spacing"
191 android:layout_marginBottom="@dimen/notification_guts_button_spacing"
192 android:layout_marginStart="@dimen/notification_guts_button_side_margin"
193 android:layout_marginEnd="@dimen/notification_guts_button_side_margin"
194 android:layout_gravity="end|center_vertical"
Rohan Shah75bb1282018-04-30 13:50:13 -0700195 android:text="@string/inline_undo"
Julia Reynolds437cdb12018-01-03 12:27:24 -0500196 style="@style/TextAppearance.NotificationInfo.Button"/>
Rohan Shah20790b82018-07-02 17:21:04 -0700197 </com.android.systemui.statusbar.notification.row.NotificationUndoLayout>
198</com.android.systemui.statusbar.notification.row.NotificationInfo>