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