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