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: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"> 29 30 <!-- Package Info --> 31 <RelativeLayout 32 android:id="@+id/header" 33 android:layout_width="match_parent" 34 android:layout_height="wrap_content" 35 android:layout_marginStart="@*android:dimen/notification_content_margin_start" 36 android:clipChildren="false" 37 android:clipToPadding="false"> 38 <ImageView 39 android:id="@+id/pkgicon" 40 android:layout_width="@dimen/notification_guts_header_height" 41 android:layout_height="@dimen/notification_guts_header_height" 42 android:layout_centerVertical="true" 43 android:layout_marginEnd="3dp" /> 44 <TextView 45 android:id="@+id/pkgname" 46 android:layout_width="wrap_content" 47 android:layout_height="wrap_content" 48 android:textAppearance="@*android:style/TextAppearance.Material.Notification.Info" 49 android:layout_marginStart="3dp" 50 android:layout_marginEnd="2dp" 51 android:singleLine="true" 52 android:layout_centerVertical="true" 53 android:layout_toEndOf="@id/pkgicon" /> 54 <TextView 55 android:id="@+id/pkg_group_divider" 56 android:layout_width="wrap_content" 57 android:layout_height="wrap_content" 58 android:textAppearance="@*android:style/TextAppearance.Material.Notification.Info" 59 android:layout_marginStart="2dp" 60 android:layout_marginEnd="2dp" 61 android:text="@*android:string/notification_header_divider_symbol" 62 android:layout_centerVertical="true" 63 android:layout_toEndOf="@id/pkgname" /> 64 <TextView 65 android:id="@+id/group_name" 66 android:layout_width="wrap_content" 67 android:layout_height="wrap_content" 68 android:textAppearance="@*android:style/TextAppearance.Material.Notification.Info" 69 android:layout_marginStart="2dp" 70 android:layout_marginEnd="2dp" 71 android:ellipsize="end" 72 android:maxLines="1" 73 android:layout_centerVertical="true" 74 android:layout_toEndOf="@id/pkg_group_divider" /> 75 <!-- 24 dp icon with 16 dp padding all around to mirror notification content margins --> 76 <ImageButton 77 android:id="@+id/info" 78 android:layout_width="56dp" 79 android:layout_height="56dp" 80 android:layout_alignParentEnd="true" 81 android:layout_centerVertical="true" 82 android:background="@drawable/ripple_drawable" 83 android:contentDescription="@string/notification_more_settings" 84 android:padding="16dp" 85 android:src="@drawable/ic_info" 86 android:tint="?android:attr/colorAccent" /> 87 </RelativeLayout> 88 89 <LinearLayout 90 android:id="@+id/prompt" 91 android:layout_width="match_parent" 92 android:layout_height="wrap_content" 93 android:layout_marginBottom="@dimen/notification_guts_button_spacing" 94 android:clipChildren="false" 95 android:clipToPadding="false" 96 android:orientation="vertical"> 97 98 <!-- Channel Info Block --> 99 <LinearLayout 100 android:layout_width="match_parent" 101 android:layout_height="wrap_content" 102 android:layout_marginStart="@*android:dimen/notification_content_margin_start" 103 android:layout_marginEnd="@*android:dimen/notification_content_margin_start" 104 android:orientation="vertical"> 105 <!-- Channel Name --> 106 <TextView 107 android:id="@+id/channel_name" 108 android:layout_width="wrap_content" 109 android:layout_height="wrap_content" 110 android:layout_weight="1" 111 style="@android:style/TextAppearance.Material.Notification.Title" /> 112 <!-- Question prompt --> 113 <TextView 114 android:id="@+id/block_prompt" 115 android:layout_width="wrap_content" 116 android:layout_height="wrap_content" 117 style="@android:style/TextAppearance.Material.Notification" /> 118 </LinearLayout> 119 120 <!-- Settings and Done buttons --> 121 <LinearLayout 122 android:layout_width="match_parent" 123 android:layout_height="wrap_content" 124 android:layout_marginTop="@dimen/notification_guts_button_spacing" 125 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"> 129 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" 146 android:layout_marginStart="@dimen/notification_guts_button_horizontal_spacing" 147 style="@style/TextAppearance.NotificationInfo.Button"/> 148 <TextView 149 android:id="@+id/minimize" 150 android:text="@string/inline_minimize_button" 151 android:layout_width="wrap_content" 152 android:layout_height="match_parent" 153 android:layout_marginStart="@dimen/notification_guts_button_horizontal_spacing" 154 style="@style/TextAppearance.NotificationInfo.Button" /> 155 <TextView 156 android:id="@+id/keep" 157 android:text="@string/inline_keep_button" 158 android:layout_width="wrap_content" 159 android:layout_height="match_parent" 160 android:layout_marginStart="@dimen/notification_guts_button_horizontal_spacing" 161 style="@style/TextAppearance.NotificationInfo.Button"/> 162 </LinearLayout> 163 </LinearLayout> 164 <RelativeLayout 165 android:id="@+id/confirmation" 166 android:layout_width="match_parent" 167 android:layout_height="wrap_content" 168 android:layout_marginBottom="@dimen/notification_guts_button_spacing" 169 android:layout_marginTop="@dimen/notification_guts_button_spacing" 170 android:layout_marginStart="@dimen/notification_guts_button_side_margin" 171 android:layout_marginEnd="@dimen/notification_guts_button_side_margin" 172 android:visibility="gone" 173 android:orientation="horizontal" > 174 <TextView 175 android:id="@+id/confirmation_text" 176 android:layout_width="wrap_content" 177 android:layout_height="wrap_content" 178 android:layout_centerVertical="true" 179 android:text="@string/notification_channel_disabled" 180 style="@style/TextAppearance.NotificationInfo.Confirmation"/> 181 <TextView 182 android:id="@+id/undo" 183 android:layout_width="wrap_content" 184 android:layout_height="wrap_content" 185 android:layout_alignParentEnd="true" 186 android:layout_centerVertical="true" 187 android:text="@string/inline_undo" 188 style="@style/TextAppearance.NotificationInfo.Button"/> 189 </RelativeLayout> 190</com.android.systemui.statusbar.NotificationInfo> 191