1<?xml version="1.0" encoding="utf-8"?>
2<!--
3    Copyright 2020, 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
18<com.android.systemui.statusbar.notification.row.NotificationConversationInfo
19    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:focusable="true"
24    android:clipChildren="true"
25    android:clipToPadding="true"
26    android:orientation="vertical"
27    android:background="@color/notification_material_background_color"
28    android:paddingStart="12dp">
29
30    <!-- Package Info -->
31    <LinearLayout
32        android:id="@+id/header"
33        android:layout_width="match_parent"
34        android:layout_height="wrap_content"
35        android:gravity="center_vertical"
36        android:clipChildren="false"
37        android:paddingTop="11dp"
38        android:clipToPadding="true">
39        <ImageView
40            android:id="@+id/conversation_icon"
41            android:layout_width="@dimen/notification_guts_conversation_icon_size"
42            android:layout_height="@dimen/notification_guts_conversation_icon_size"
43            android:layout_centerVertical="false"
44            android:layout_alignParentStart="true"
45            android:layout_marginEnd="12dp" />
46        <LinearLayout
47            android:id="@+id/names"
48            android:layout_weight="1"
49            android:layout_width="0dp"
50            android:orientation="vertical"
51            android:layout_height="wrap_content"
52            android:minHeight="@dimen/notification_guts_conversation_icon_size"
53            android:layout_centerVertical="true"
54            android:gravity="center_vertical"
55            android:layout_alignEnd="@id/conversation_icon"
56            android:layout_toEndOf="@id/conversation_icon">
57            <LinearLayout
58                android:layout_width="match_parent"
59                android:layout_height="wrap_content"
60                android:gravity="start"
61                android:orientation="horizontal">
62                <TextView
63                    android:id="@+id/parent_channel_name"
64                    android:layout_width="wrap_content"
65                    android:layout_height="wrap_content"
66                    android:ellipsize="end"
67                    android:textDirection="locale"
68                    android:layout_weight="1"
69                    style="@style/TextAppearance.NotificationImportanceChannel"/>
70                <TextView
71                    android:layout_width="wrap_content"
72                    android:layout_height="wrap_content"
73                    android:layout_centerVertical="true"
74                    style="@style/TextAppearance.NotificationImportanceHeader"
75                    android:visibility="gone"
76                    android:layout_marginStart="2dp"
77                    android:layout_marginEnd="2dp"
78                    android:text="@*android:string/notification_header_divider_symbol" />
79                <TextView
80                    android:id="@+id/name"
81                    android:visibility="gone"
82                    android:layout_width="wrap_content"
83                    android:layout_height="wrap_content"
84                    android:layout_weight="1"
85                    style="@style/TextAppearance.NotificationImportanceChannel"/>
86            </LinearLayout>
87            <TextView
88                android:id="@+id/group_name"
89                android:layout_width="match_parent"
90                android:layout_height="wrap_content"
91                android:ellipsize="end"
92                android:textDirection="locale"
93                style="@style/TextAppearance.NotificationImportanceChannelGroup"/>
94            <TextView
95                android:id="@+id/pkg_name"
96                android:layout_width="match_parent"
97                android:layout_height="wrap_content"
98                style="@style/TextAppearance.NotificationImportanceApp"
99                android:ellipsize="end"
100                android:textDirection="locale"
101                android:maxLines="1"/>
102            <TextView
103                android:id="@+id/delegate_name"
104                android:layout_width="match_parent"
105                android:layout_height="wrap_content"
106                android:layout_centerVertical="true"
107                style="@style/TextAppearance.NotificationImportanceHeader"
108                android:layout_marginStart="2dp"
109                android:layout_marginEnd="2dp"
110                android:ellipsize="end"
111                android:textDirection="locale"
112                android:text="@string/notification_delegate_header"
113                android:maxLines="1" />
114
115        </LinearLayout>
116
117        <!-- end aligned fields -->
118        <ImageButton
119            android:id="@+id/info"
120            android:layout_width="@dimen/notification_importance_toggle_size"
121            android:layout_height="@dimen/notification_importance_toggle_size"
122            android:layout_centerVertical="true"
123            android:background="@drawable/ripple_drawable"
124            android:contentDescription="@string/notification_more_settings"
125            android:src="@drawable/ic_settings"
126            android:layout_alignParentEnd="true"
127            android:tint="@color/notification_guts_link_icon_tint"/>
128
129    </LinearLayout>
130
131    <LinearLayout
132        android:id="@+id/inline_controls"
133        android:layout_width="match_parent"
134        android:layout_height="wrap_content"
135        android:paddingEnd="@*android:dimen/notification_content_margin_end"
136        android:layout_marginTop="@dimen/notification_guts_option_vertical_padding"
137        android:clipChildren="false"
138        android:clipToPadding="false"
139        android:orientation="vertical">
140
141        <!-- Non configurable app/channel text. appears instead of @+id/interruptiveness_settings-->
142        <TextView
143            android:id="@+id/non_configurable_text"
144            android:text="@string/notification_unblockable_desc"
145            android:visibility="gone"
146            android:layout_width="match_parent"
147            android:layout_height="wrap_content"
148            style="@*android:style/TextAppearance.DeviceDefault.Notification" />
149
150        <!-- Non configurable multichannel text. appears instead of @+id/interruptiveness_settings-->
151        <TextView
152            android:id="@+id/non_configurable_multichannel_text"
153            android:text="@string/notification_multichannel_desc"
154            android:visibility="gone"
155            android:layout_width="match_parent"
156            android:layout_height="wrap_content"
157            style="@*android:style/TextAppearance.DeviceDefault.Notification" />
158
159        <LinearLayout
160            android:id="@+id/interruptiveness_settings"
161            android:layout_width="match_parent"
162            android:layout_height="wrap_content"
163            android:gravity="center"
164            android:orientation="vertical">
165
166            <com.android.systemui.statusbar.notification.row.ButtonLinearLayout
167                android:id="@+id/priority"
168                android:layout_width="match_parent"
169                android:layout_height="wrap_content"
170                android:padding="@dimen/notification_importance_button_padding"
171                android:clickable="true"
172                android:focusable="true"
173                android:background="@drawable/notification_guts_priority_button_bg"
174                android:orientation="vertical">
175                <LinearLayout
176                    android:layout_width="match_parent"
177                    android:layout_height="wrap_content"
178                    android:orientation="horizontal"
179                    android:gravity="center"
180                >
181                    <ImageView
182                        android:id="@+id/priority_icon"
183                        android:layout_width="wrap_content"
184                        android:layout_height="wrap_content"
185                        android:src="@drawable/ic_important_outline"
186                        android:background="@android:color/transparent"
187                        android:tint="@color/notification_guts_priority_contents"
188                        android:clickable="false"
189                        android:focusable="false"/>
190                    <TextView
191                        android:id="@+id/priority_label"
192                        android:layout_width="0dp"
193                        android:layout_height="wrap_content"
194                        android:layout_marginStart="@dimen/notification_importance_drawable_padding"
195                        android:layout_weight="1"
196                        android:ellipsize="end"
197                        android:maxLines="1"
198                        android:clickable="false"
199                        android:focusable="false"
200                        android:textAppearance="@style/TextAppearance.NotificationImportanceButton"
201                        android:text="@string/notification_priority_title"/>
202                </LinearLayout>
203                <TextView
204                    android:id="@+id/priority_summary"
205                    android:layout_width="match_parent"
206                    android:layout_height="wrap_content"
207                    android:layout_marginTop="@dimen/notification_importance_button_description_top_margin"
208                    android:visibility="gone"
209                    android:text="@string/notification_channel_summary_priority"
210                    android:clickable="false"
211                    android:focusable="false"
212                    android:ellipsize="end"
213                    android:maxLines="3"
214                    android:textAppearance="@style/TextAppearance.NotificationImportanceDetail"/>
215            </com.android.systemui.statusbar.notification.row.ButtonLinearLayout>
216
217            <com.android.systemui.statusbar.notification.row.ButtonLinearLayout
218                android:id="@+id/default_behavior"
219                android:layout_width="match_parent"
220                android:layout_height="wrap_content"
221                android:layout_marginTop="@dimen/notification_importance_button_separation"
222                android:padding="@dimen/notification_importance_button_padding"
223                android:clickable="true"
224                android:focusable="true"
225                android:background="@drawable/notification_guts_priority_button_bg"
226                android:orientation="vertical">
227                <LinearLayout
228                    android:layout_width="match_parent"
229                    android:layout_height="wrap_content"
230                    android:orientation="horizontal"
231                    android:gravity="center"
232                >
233                    <ImageView
234                        android:id="@+id/default_icon"
235                        android:layout_width="wrap_content"
236                        android:layout_height="wrap_content"
237                        android:src="@drawable/ic_notifications_alert"
238                        android:background="@android:color/transparent"
239                        android:tint="@color/notification_guts_priority_contents"
240                        android:clickable="false"
241                        android:focusable="false"/>
242                    <TextView
243                        android:id="@+id/default_label"
244                        android:layout_width="0dp"
245                        android:layout_height="wrap_content"
246                        android:layout_marginStart="@dimen/notification_importance_drawable_padding"
247                        android:layout_weight="1"
248                        android:ellipsize="end"
249                        android:maxLines="1"
250                        android:clickable="false"
251                        android:focusable="false"
252                        android:textAppearance="@style/TextAppearance.NotificationImportanceButton"
253                        android:text="@string/notification_alert_title"/>
254                </LinearLayout>
255                <TextView
256                    android:id="@+id/default_summary"
257                    android:layout_width="match_parent"
258                    android:layout_height="wrap_content"
259                    android:layout_marginTop="@dimen/notification_importance_button_description_top_margin"
260                    android:visibility="gone"
261                    android:text="@string/notification_channel_summary_default"
262                    android:clickable="false"
263                    android:focusable="false"
264                    android:ellipsize="end"
265                    android:maxLines="3"
266                    android:textAppearance="@style/TextAppearance.NotificationImportanceDetail"/>
267            </com.android.systemui.statusbar.notification.row.ButtonLinearLayout>
268
269            <com.android.systemui.statusbar.notification.row.ButtonLinearLayout
270                android:id="@+id/silence"
271                android:layout_width="match_parent"
272                android:layout_height="wrap_content"
273                android:layout_marginTop="@dimen/notification_importance_button_separation"
274                android:padding="@dimen/notification_importance_button_padding"
275                android:clickable="true"
276                android:focusable="true"
277                android:background="@drawable/notification_guts_priority_button_bg"
278                android:orientation="vertical">
279                <LinearLayout
280                    android:layout_width="match_parent"
281                    android:layout_height="wrap_content"
282                    android:orientation="horizontal"
283                    android:gravity="center"
284                >
285                    <ImageView
286                        android:id="@+id/silence_icon"
287                        android:src="@drawable/ic_notifications_silence"
288                        android:background="@android:color/transparent"
289                        android:tint="@color/notification_guts_priority_contents"
290                        android:layout_gravity="center"
291                        android:layout_width="wrap_content"
292                        android:layout_height="wrap_content"
293                        android:clickable="false"
294                        android:focusable="false"/>
295                    <TextView
296                        android:id="@+id/silence_label"
297                        android:layout_width="match_parent"
298                        android:layout_height="wrap_content"
299                        android:ellipsize="end"
300                        android:maxLines="1"
301                        android:clickable="false"
302                        android:focusable="false"
303                        android:layout_toEndOf="@id/silence_icon"
304                        android:layout_marginStart="@dimen/notification_importance_drawable_padding"
305                        android:textAppearance="@style/TextAppearance.NotificationImportanceButton"
306                        android:text="@string/notification_silence_title"/>
307                </LinearLayout>
308                <TextView
309                    android:id="@+id/silence_summary"
310                    android:layout_width="match_parent"
311                    android:layout_height="wrap_content"
312                    android:layout_marginTop="@dimen/notification_importance_button_description_top_margin"
313                    android:visibility="gone"
314                    android:text="@string/notification_conversation_summary_low"
315                    android:clickable="false"
316                    android:focusable="false"
317                    android:ellipsize="end"
318                    android:maxLines="3"
319                    android:textAppearance="@style/TextAppearance.NotificationImportanceDetail"/>
320            </com.android.systemui.statusbar.notification.row.ButtonLinearLayout>
321
322        </LinearLayout>
323
324        <RelativeLayout
325            android:id="@+id/bottom_buttons"
326            android:layout_width="match_parent"
327            android:layout_height="60dp"
328            android:gravity="center_vertical"
329            android:paddingStart="4dp"
330            android:paddingEnd="4dp"
331        >
332            <TextView
333                android:id="@+id/done"
334                android:text="@string/inline_ok_button"
335                android:layout_width="wrap_content"
336                android:layout_height="wrap_content"
337                android:layout_alignParentEnd="true"
338                android:gravity="end|center_vertical"
339                android:minWidth="@dimen/notification_importance_toggle_size"
340                android:minHeight="@dimen/notification_importance_toggle_size"
341                style="@style/TextAppearance.NotificationInfo.Button"/>
342        </RelativeLayout>
343    </LinearLayout>
344
345</com.android.systemui.statusbar.notification.row.NotificationConversationInfo>
346