blob: e1e812bef258a5d88de0b8ec21ac0ea29403df38 [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"
27 android:background="@color/notification_guts_bg_color"
28 android:theme="@*android:style/Theme.DeviceDefault.Light">
Mady Mellor87d79452017-01-10 11:52:52 -080029
Geoffrey Pitschdf44b602017-02-03 13:31:50 -050030 <!-- Package Info -->
Julia Reynolds437cdb12018-01-03 12:27:24 -050031 <RelativeLayout
Julia Reynoldse0341482018-03-08 14:42:50 -050032 android:id="@+id/header"
Mady Mellor87d79452017-01-10 11:52:52 -080033 android:layout_width="match_parent"
Julia Reynolds6c238832018-02-15 09:49:27 -050034 android:layout_height="wrap_content"
Rohan Shahc032ac92018-05-03 16:58:37 -070035 android:layout_marginStart="@*android:dimen/notification_content_margin_start"
Geoffrey Pitschd0856f02017-02-16 10:51:18 -050036 android:clipChildren="false"
Rohan Shah75bb1282018-04-30 13:50:13 -070037 android:clipToPadding="false">
Geoffrey Pitschdf44b602017-02-03 13:31:50 -050038 <ImageView
39 android:id="@+id/pkgicon"
Julia Reynolds437cdb12018-01-03 12:27:24 -050040 android:layout_width="@dimen/notification_guts_header_height"
41 android:layout_height="@dimen/notification_guts_header_height"
Julia Reynolds6c238832018-02-15 09:49:27 -050042 android:layout_centerVertical="true"
Julia Reynolds437cdb12018-01-03 12:27:24 -050043 android:layout_marginEnd="3dp" />
Mady Mellor87d79452017-01-10 11:52:52 -080044 <TextView
45 android:id="@+id/pkgname"
46 android:layout_width="wrap_content"
47 android:layout_height="wrap_content"
Geoffrey Pitschd0856f02017-02-16 10:51:18 -050048 android:textAppearance="@*android:style/TextAppearance.Material.Notification.Info"
49 android:layout_marginStart="3dp"
50 android:layout_marginEnd="2dp"
Julia Reynolds437cdb12018-01-03 12:27:24 -050051 android:singleLine="true"
52 android:layout_centerVertical="true"
53 android:layout_toEndOf="@id/pkgicon" />
Mady Mellor87d79452017-01-10 11:52:52 -080054 <TextView
Geoffrey Pitschdf44b602017-02-03 13:31:50 -050055 android:id="@+id/pkg_group_divider"
56 android:layout_width="wrap_content"
57 android:layout_height="wrap_content"
Geoffrey Pitschd0856f02017-02-16 10:51:18 -050058 android:textAppearance="@*android:style/TextAppearance.Material.Notification.Info"
Geoffrey Pitschdf44b602017-02-03 13:31:50 -050059 android:layout_marginStart="2dp"
60 android:layout_marginEnd="2dp"
Julia Reynolds437cdb12018-01-03 12:27:24 -050061 android:text="@*android:string/notification_header_divider_symbol"
62 android:layout_centerVertical="true"
63 android:layout_toEndOf="@id/pkgname" />
Geoffrey Pitschdf44b602017-02-03 13:31:50 -050064 <TextView
65 android:id="@+id/group_name"
66 android:layout_width="wrap_content"
67 android:layout_height="wrap_content"
Geoffrey Pitschd0856f02017-02-16 10:51:18 -050068 android:textAppearance="@*android:style/TextAppearance.Material.Notification.Info"
69 android:layout_marginStart="2dp"
Julia Reynoldsb4309752017-09-01 16:09:25 -040070 android:layout_marginEnd="2dp"
71 android:ellipsize="end"
Julia Reynolds437cdb12018-01-03 12:27:24 -050072 android:maxLines="1"
73 android:layout_centerVertical="true"
74 android:layout_toEndOf="@id/pkg_group_divider" />
Rohan Shahc032ac92018-05-03 16:58:37 -070075 <!-- 24 dp icon with 16 dp padding all around to mirror notification content margins -->
Julia Reynolds437cdb12018-01-03 12:27:24 -050076 <ImageButton
77 android:id="@+id/info"
Rohan Shah75bb1282018-04-30 13:50:13 -070078 android:layout_width="56dp"
79 android:layout_height="56dp"
80 android:layout_alignParentEnd="true"
Julia Reynolds6c238832018-02-15 09:49:27 -050081 android:layout_centerVertical="true"
Julia Reynolds437cdb12018-01-03 12:27:24 -050082 android:background="@drawable/ripple_drawable"
Rohan Shah75bb1282018-04-30 13:50:13 -070083 android:contentDescription="@string/notification_more_settings"
84 android:padding="16dp"
85 android:src="@drawable/ic_info"
86 android:tint="?android:attr/colorAccent" />
Julia Reynolds437cdb12018-01-03 12:27:24 -050087 </RelativeLayout>
Geoffrey Pitschdf44b602017-02-03 13:31:50 -050088
Geoffrey Pitschdf44b602017-02-03 13:31:50 -050089 <LinearLayout
Julia Reynolds437cdb12018-01-03 12:27:24 -050090 android:id="@+id/prompt"
Geoffrey Pitschdf44b602017-02-03 13:31:50 -050091 android:layout_width="match_parent"
92 android:layout_height="wrap_content"
Julia Reynolds437cdb12018-01-03 12:27:24 -050093 android:layout_marginBottom="@dimen/notification_guts_button_spacing"
Rohan Shah75bb1282018-04-30 13:50:13 -070094 android:clipChildren="false"
95 android:clipToPadding="false"
Geoffrey Pitsch747f25c2017-05-12 14:19:29 -040096 android:orientation="vertical">
Julia Reynolds437cdb12018-01-03 12:27:24 -050097
98 <!-- Channel Info Block -->
Geoffrey Pitschd0856f02017-02-16 10:51:18 -050099 <LinearLayout
Geoffrey Pitsch747f25c2017-05-12 14:19:29 -0400100 android:layout_width="match_parent"
Mady Mellor87d79452017-01-10 11:52:52 -0800101 android:layout_height="wrap_content"
Rohan Shahc032ac92018-05-03 16:58:37 -0700102 android:layout_marginStart="@*android:dimen/notification_content_margin_start"
103 android:layout_marginEnd="@*android:dimen/notification_content_margin_start"
Julia Reynolds437cdb12018-01-03 12:27:24 -0500104 android:orientation="vertical">
Geoffrey Pitschd0856f02017-02-16 10:51:18 -0500105 <!-- Channel Name -->
106 <TextView
107 android:id="@+id/channel_name"
Julia Reynolds437cdb12018-01-03 12:27:24 -0500108 android:layout_width="wrap_content"
Geoffrey Pitschd0856f02017-02-16 10:51:18 -0500109 android:layout_height="wrap_content"
Geoffrey Pitsch747f25c2017-05-12 14:19:29 -0400110 android:layout_weight="1"
Rohan Shah75bb1282018-04-30 13:50:13 -0700111 style="@android:style/TextAppearance.Material.Notification.Title" />
Julia Reynolds437cdb12018-01-03 12:27:24 -0500112 <!-- Question prompt -->
113 <TextView
114 android:id="@+id/block_prompt"
Geoffrey Pitschd0856f02017-02-16 10:51:18 -0500115 android:layout_width="wrap_content"
116 android:layout_height="wrap_content"
Rohan Shah75bb1282018-04-30 13:50:13 -0700117 style="@android:style/TextAppearance.Material.Notification" />
Geoffrey Pitschd0856f02017-02-16 10:51:18 -0500118 </LinearLayout>
Geoffrey Pitschdf44b602017-02-03 13:31:50 -0500119
Julia Reynolds437cdb12018-01-03 12:27:24 -0500120 <!-- Settings and Done buttons -->
121 <LinearLayout
122 android:layout_width="match_parent"
123 android:layout_height="wrap_content"
Julia Reynolds437cdb12018-01-03 12:27:24 -0500124 android:layout_marginTop="@dimen/notification_guts_button_spacing"
Rohan Shahc032ac92018-05-03 16:58:37 -0700125 android:layout_marginStart="@dimen/notification_guts_button_side_margin"
126 android:layout_marginEnd="@dimen/notification_guts_button_side_margin"
127 android:gravity="end"
128 android:orientation="horizontal">
Julia Reynolds437cdb12018-01-03 12:27:24 -0500129
130 <!-- Optional link to app. Only appears if the channel is not disabled and the app
131 asked for it -->
132 <TextView
133 android:id="@+id/app_settings"
134 android:text="@string/notification_app_settings"
135 android:layout_width="wrap_content"
136 android:layout_height="wrap_content"
137 android:visibility="gone"
138 android:ellipsize="end"
139 android:maxLines="1"
140 style="@style/TextAppearance.NotificationInfo.Button"/>
141 <TextView
142 android:id="@+id/block"
143 android:text="@string/inline_stop_button"
144 android:layout_width="wrap_content"
145 android:layout_height="match_parent"
Rohan Shah75bb1282018-04-30 13:50:13 -0700146 android:layout_marginStart="@dimen/notification_guts_button_horizontal_spacing"
Julia Reynolds437cdb12018-01-03 12:27:24 -0500147 style="@style/TextAppearance.NotificationInfo.Button"/>
148 <TextView
Julia Reynoldse0341482018-03-08 14:42:50 -0500149 android:id="@+id/minimize"
150 android:text="@string/inline_minimize_button"
151 android:layout_width="wrap_content"
152 android:layout_height="match_parent"
Rohan Shah75bb1282018-04-30 13:50:13 -0700153 android:layout_marginStart="@dimen/notification_guts_button_horizontal_spacing"
Julia Reynoldse0341482018-03-08 14:42:50 -0500154 style="@style/TextAppearance.NotificationInfo.Button" />
155 <TextView
Julia Reynolds437cdb12018-01-03 12:27:24 -0500156 android:id="@+id/keep"
157 android:text="@string/inline_keep_button"
158 android:layout_width="wrap_content"
159 android:layout_height="match_parent"
Rohan Shah75bb1282018-04-30 13:50:13 -0700160 android:layout_marginStart="@dimen/notification_guts_button_horizontal_spacing"
Julia Reynolds437cdb12018-01-03 12:27:24 -0500161 style="@style/TextAppearance.NotificationInfo.Button"/>
162 </LinearLayout>
Mady Mellor87d79452017-01-10 11:52:52 -0800163 </LinearLayout>
Rohan Shah20790b82018-07-02 17:21:04 -0700164 <com.android.systemui.statusbar.notification.row.NotificationUndoLayout
Julia Reynolds437cdb12018-01-03 12:27:24 -0500165 android:id="@+id/confirmation"
166 android:layout_width="match_parent"
167 android:layout_height="wrap_content"
Julia Reynolds437cdb12018-01-03 12:27:24 -0500168 android:visibility="gone"
169 android:orientation="horizontal" >
170 <TextView
Julia Reynoldse0341482018-03-08 14:42:50 -0500171 android:id="@+id/confirmation_text"
Julia Reynolds437cdb12018-01-03 12:27:24 -0500172 android:layout_width="wrap_content"
173 android:layout_height="wrap_content"
Rohan Shah482193f2018-06-13 20:17:42 -0700174 android:layout_gravity="start|center_vertical"
175 android:layout_marginStart="@*android:dimen/notification_content_margin_start"
176 android:layout_marginEnd="@*android:dimen/notification_content_margin_start"
Julia Reynolds437cdb12018-01-03 12:27:24 -0500177 android:text="@string/notification_channel_disabled"
Julia Reynoldse0341482018-03-08 14:42:50 -0500178 style="@style/TextAppearance.NotificationInfo.Confirmation"/>
Julia Reynolds437cdb12018-01-03 12:27:24 -0500179 <TextView
180 android:id="@+id/undo"
181 android:layout_width="wrap_content"
182 android:layout_height="wrap_content"
Rohan Shah482193f2018-06-13 20:17:42 -0700183 android:layout_marginTop="@dimen/notification_guts_button_spacing"
184 android:layout_marginBottom="@dimen/notification_guts_button_spacing"
185 android:layout_marginStart="@dimen/notification_guts_button_side_margin"
186 android:layout_marginEnd="@dimen/notification_guts_button_side_margin"
187 android:layout_gravity="end|center_vertical"
Rohan Shah75bb1282018-04-30 13:50:13 -0700188 android:text="@string/inline_undo"
Julia Reynolds437cdb12018-01-03 12:27:24 -0500189 style="@style/TextAppearance.NotificationInfo.Button"/>
Rohan Shah20790b82018-07-02 17:21:04 -0700190 </com.android.systemui.statusbar.notification.row.NotificationUndoLayout>
191</com.android.systemui.statusbar.notification.row.NotificationInfo>