blob: bbd315ee8776955ae0122d90fc3cd128b275a928 [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
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"
Mady Mellor87d79452017-01-10 11:52:52 -080024 android:orientation="vertical"
25 android:paddingStart="@*android:dimen/notification_content_margin_start"
Mady Mellor87d79452017-01-10 11:52:52 -080026 android:background="@color/notification_guts_bg_color"
27 android:theme="@*android:style/Theme.DeviceDefault.Light">
28
Geoffrey Pitschdf44b602017-02-03 13:31:50 -050029 <!-- Package Info -->
30 <LinearLayout
Mady Mellor87d79452017-01-10 11:52:52 -080031 android:layout_width="match_parent"
Geoffrey Pitschd0856f02017-02-16 10:51:18 -050032 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" >
Geoffrey Pitschdf44b602017-02-03 13:31:50 -050038 <ImageView
39 android:id="@+id/pkgicon"
Geoffrey Pitschd0856f02017-02-16 10:51:18 -050040 android:layout_width="@*android:dimen/notification_header_icon_size"
41 android:layout_height="@*android:dimen/notification_header_icon_size"
42 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"
50 android:singleLine="true"/>
Mady Mellor87d79452017-01-10 11:52:52 -080051 <TextView
Geoffrey Pitschdf44b602017-02-03 13:31:50 -050052 android:id="@+id/pkg_group_divider"
53 android:layout_width="wrap_content"
54 android:layout_height="wrap_content"
Geoffrey Pitschd0856f02017-02-16 10:51:18 -050055 android:textAppearance="@*android:style/TextAppearance.Material.Notification.Info"
Geoffrey Pitschdf44b602017-02-03 13:31:50 -050056 android:layout_marginStart="2dp"
57 android:layout_marginEnd="2dp"
Geoffrey Pitschd0856f02017-02-16 10:51:18 -050058 android:text="@*android:string/notification_header_divider_symbol"/>
Geoffrey Pitschdf44b602017-02-03 13:31:50 -050059 <TextView
60 android:id="@+id/group_name"
61 android:layout_width="wrap_content"
62 android:layout_height="wrap_content"
Geoffrey Pitschd0856f02017-02-16 10:51:18 -050063 android:textAppearance="@*android:style/TextAppearance.Material.Notification.Info"
64 android:layout_marginStart="2dp"
65 android:layout_marginEnd="2dp"/>
Geoffrey Pitschdf44b602017-02-03 13:31:50 -050066 </LinearLayout>
67
Geoffrey Pitschd0856f02017-02-16 10:51:18 -050068 <!-- Channel Info Block -->
Geoffrey Pitschdf44b602017-02-03 13:31:50 -050069 <LinearLayout
70 android:layout_width="match_parent"
71 android:layout_height="wrap_content"
Geoffrey Pitschd0856f02017-02-16 10:51:18 -050072 android:layout_marginBottom="20dp"
73 android:layout_marginEnd="@*android:dimen/notification_content_margin_end"
Geoffrey Pitsch747f25c2017-05-12 14:19:29 -040074 android:orientation="vertical">
Geoffrey Pitschd0856f02017-02-16 10:51:18 -050075 <!-- Channel Text -->
76 <LinearLayout
Geoffrey Pitsch747f25c2017-05-12 14:19:29 -040077 android:layout_width="match_parent"
Mady Mellor87d79452017-01-10 11:52:52 -080078 android:layout_height="wrap_content"
Geoffrey Pitsch747f25c2017-05-12 14:19:29 -040079 android:orientation="horizontal">
Geoffrey Pitschd0856f02017-02-16 10:51:18 -050080 <!-- Channel Name -->
81 <TextView
82 android:id="@+id/channel_name"
Geoffrey Pitsch747f25c2017-05-12 14:19:29 -040083 android:layout_width="0dp"
Geoffrey Pitschd0856f02017-02-16 10:51:18 -050084 android:layout_height="wrap_content"
Geoffrey Pitsch747f25c2017-05-12 14:19:29 -040085 android:layout_weight="1"
Geoffrey Pitschd0856f02017-02-16 10:51:18 -050086 android:layout_marginBottom="6dp"
87 style="@style/TextAppearance.NotificationInfo.Primary" />
Geoffrey Pitsch747f25c2017-05-12 14:19:29 -040088 <!-- Ban Channel Switch -->
89 <Switch
90 android:id="@+id/channel_enabled_switch"
Geoffrey Pitschd0856f02017-02-16 10:51:18 -050091 android:layout_width="wrap_content"
92 android:layout_height="wrap_content"
Geoffrey Pitsch747f25c2017-05-12 14:19:29 -040093 android:layout_gravity="end|center_vertical"
94 android:contentDescription="@string/notification_channel_switch_accessibility"
95 android:background="@null" />
Geoffrey Pitschd0856f02017-02-16 10:51:18 -050096 </LinearLayout>
Geoffrey Pitsch747f25c2017-05-12 14:19:29 -040097 <!-- Secondary Text - only one shows at a time -->
98 <TextView
99 android:id="@+id/channel_disabled"
Mady Mellor87d79452017-01-10 11:52:52 -0800100 android:layout_width="wrap_content"
101 android:layout_height="wrap_content"
Geoffrey Pitsch747f25c2017-05-12 14:19:29 -0400102 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"/>
Mady Mellor87d79452017-01-10 11:52:52 -0800119 </LinearLayout>
Geoffrey Pitschdf44b602017-02-03 13:31:50 -0500120
Mady Mellor87d79452017-01-10 11:52:52 -0800121 <!-- Settings and Done buttons -->
122 <LinearLayout
123 android:layout_width="match_parent"
Geoffrey Pitschd0856f02017-02-16 10:51:18 -0500124 android:layout_height="48dp"
125 android:orientation="horizontal"
Mady Mellor87d79452017-01-10 11:52:52 -0800126 android:gravity="end"
Geoffrey Pitschd0856f02017-02-16 10:51:18 -0500127 android:layout_marginBottom="8dp" >
Mady Mellor87d79452017-01-10 11:52:52 -0800128 <TextView
129 android:id="@+id/more_settings"
130 android:text="@string/notification_more_settings"
131 android:layout_width="wrap_content"
Geoffrey Pitschd0856f02017-02-16 10:51:18 -0500132 android:layout_height="match_parent"
133 android:layout_marginEnd="8dp"
134 style="@style/TextAppearance.NotificationInfo.Button"/>
Mady Mellor87d79452017-01-10 11:52:52 -0800135 <TextView
136 android:id="@+id/done"
137 android:text="@string/notification_done"
138 android:layout_width="wrap_content"
Geoffrey Pitschd0856f02017-02-16 10:51:18 -0500139 android:layout_height="match_parent"
Mady Mellor87d79452017-01-10 11:52:52 -0800140 android:layout_marginEnd="8dp"
Geoffrey Pitschd0856f02017-02-16 10:51:18 -0500141 style="@style/TextAppearance.NotificationInfo.Button"/>
Mady Mellor87d79452017-01-10 11:52:52 -0800142 </LinearLayout>
143</com.android.systemui.statusbar.NotificationInfo>