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