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.NotificationInfo
19        xmlns:android="http://schemas.android.com/apk/res/android"
20        android:layout_width="match_parent"
21        android:layout_height="wrap_content"
22        android:id="@+id/notification_guts"
23        android:clickable="true"
24        android:orientation="vertical"
25        android:paddingStart="@*android:dimen/notification_content_margin_start"
26        android:background="@color/notification_guts_bg_color"
27        android:theme="@*android:style/Theme.DeviceDefault.Light">
28
29    <!-- Package Info -->
30    <LinearLayout
31        android:layout_width="match_parent"
32        android:layout_height="@*android:dimen/notification_header_height"
33        android:clipChildren="false"
34        android:paddingTop="@*android:dimen/notification_header_padding_top"
35        android:paddingBottom="@*android:dimen/notification_header_padding_bottom"
36        android:gravity="center_vertical"
37        android:orientation="horizontal" >
38        <ImageView
39            android:id="@+id/pkgicon"
40            android:layout_width="@*android:dimen/notification_header_icon_size"
41            android:layout_height="@*android:dimen/notification_header_icon_size"
42            android:layout_marginEnd="3dp"/>
43        <TextView
44            android:id="@+id/pkgname"
45            android:layout_width="wrap_content"
46            android:layout_height="wrap_content"
47            android:textAppearance="@*android:style/TextAppearance.Material.Notification.Info"
48            android:layout_marginStart="3dp"
49            android:layout_marginEnd="2dp"
50            android:singleLine="true"/>
51        <TextView
52            android:id="@+id/pkg_group_divider"
53            android:layout_width="wrap_content"
54            android:layout_height="wrap_content"
55            android:textAppearance="@*android:style/TextAppearance.Material.Notification.Info"
56            android:layout_marginStart="2dp"
57            android:layout_marginEnd="2dp"
58            android:text="@*android:string/notification_header_divider_symbol"/>
59        <TextView
60            android:id="@+id/group_name"
61            android:layout_width="wrap_content"
62            android:layout_height="wrap_content"
63            android:textAppearance="@*android:style/TextAppearance.Material.Notification.Info"
64            android:layout_marginStart="2dp"
65            android:layout_marginEnd="2dp"/>
66    </LinearLayout>
67
68    <!-- Channel Info Block -->
69    <LinearLayout
70        android:layout_width="match_parent"
71        android:layout_height="wrap_content"
72        android:layout_marginBottom="20dp"
73        android:layout_marginEnd="@*android:dimen/notification_content_margin_end"
74        android:orientation="vertical">
75        <!-- Channel Text -->
76        <LinearLayout
77            android:layout_width="match_parent"
78            android:layout_height="wrap_content"
79            android:orientation="horizontal">
80            <!-- Channel Name -->
81            <TextView
82                android:id="@+id/channel_name"
83                android:layout_width="0dp"
84                android:layout_height="wrap_content"
85                android:layout_weight="1"
86                android:layout_marginBottom="6dp"
87                style="@style/TextAppearance.NotificationInfo.Primary" />
88            <!-- Ban Channel Switch -->
89            <Switch
90                android:id="@+id/channel_enabled_switch"
91                android:layout_width="wrap_content"
92                android:layout_height="wrap_content"
93                android:layout_gravity="end|center_vertical"
94                android:contentDescription="@string/notification_channel_switch_accessibility"
95                android:background="@null" />
96        </LinearLayout>
97        <!-- Secondary Text - only one shows at a time -->
98        <TextView
99            android:id="@+id/channel_disabled"
100            android:layout_width="wrap_content"
101            android:layout_height="wrap_content"
102            android:text="@string/notification_channel_disabled"
103            style="@style/TextAppearance.NotificationInfo.Secondary.Warning" />
104        <TextView
105            android:id="@+id/num_channels_desc"
106            android:layout_width="wrap_content"
107            android:layout_height="wrap_content"
108            android:text="@string/notification_channel_disabled"
109            style="@style/TextAppearance.NotificationInfo.Secondary" />
110        <!-- Optional link to app. Only appears if the channel is not disabled -->
111        <TextView
112            android:id="@+id/app_settings"
113            android:layout_width="wrap_content"
114            android:layout_height="wrap_content"
115            android:visibility="gone"
116            android:ellipsize="end"
117            android:maxLines="1"
118            style="@style/TextAppearance.NotificationInfo.Secondary.Link"/>
119    </LinearLayout>
120
121    <!-- Settings and Done buttons -->
122    <LinearLayout
123        android:layout_width="match_parent"
124        android:layout_height="48dp"
125        android:orientation="horizontal"
126        android:gravity="end"
127        android:layout_marginBottom="8dp" >
128        <TextView
129            android:id="@+id/more_settings"
130            android:text="@string/notification_more_settings"
131            android:layout_width="wrap_content"
132            android:layout_height="match_parent"
133            android:layout_marginEnd="8dp"
134            style="@style/TextAppearance.NotificationInfo.Button"/>
135        <TextView
136            android:id="@+id/done"
137            android:text="@string/notification_done"
138            android:layout_width="wrap_content"
139            android:layout_height="match_parent"
140            android:layout_marginEnd="8dp"
141            style="@style/TextAppearance.NotificationInfo.Button"/>
142    </LinearLayout>
143</com.android.systemui.statusbar.NotificationInfo>
144