1<?xml version="1.0" encoding="utf-8"?> 2<!-- 3 Copyright 2020, 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.NotificationConversationInfo 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="true" 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 <FrameLayout 40 android:layout_width="wrap_content" 41 android:layout_height="wrap_content" 42 android:clipChildren="false" 43 android:clipToPadding="false" 44 android:layout_centerVertical="false" 45 android:layout_alignParentStart="true" 46 android:layout_marginEnd="12dp" 47 > 48 49 <!-- Big icon: 48x48, 12dp padding top, 16dp padding sides --> 50 <ImageView 51 android:id="@+id/conversation_icon" 52 android:layout_width="@*android:dimen/conversation_avatar_size" 53 android:layout_height="@*android:dimen/conversation_avatar_size" 54 android:layout_marginLeft="@*android:dimen/conversation_badge_protrusion" 55 android:layout_marginRight="@*android:dimen/conversation_badge_protrusion" 56 android:layout_marginBottom="@*android:dimen/conversation_badge_protrusion" 57 android:scaleType="centerCrop" 58 android:importantForAccessibility="no" 59 /> 60 61 <FrameLayout 62 android:id="@+id/conversation_icon_badge" 63 android:layout_width="@*android:dimen/conversation_icon_size_badged" 64 android:layout_height="@*android:dimen/conversation_icon_size_badged" 65 android:layout_gravity="end|bottom" 66 android:clipChildren="false" 67 android:clipToPadding="false" 68 > 69 <ImageView 70 android:id="@+id/conversation_icon_badge_bg" 71 android:layout_width="match_parent" 72 android:layout_height="match_parent" 73 android:layout_gravity="center" 74 android:src="@*android:drawable/conversation_badge_background" 75 android:forceHasOverlappingRendering="false" 76 /> 77 <ImageView 78 android:id="@+id/conversation_icon_badge_icon" 79 android:layout_width="match_parent" 80 android:layout_height="match_parent" 81 android:layout_margin="4dp" 82 android:layout_gravity="center" 83 android:forceHasOverlappingRendering="false" 84 /> 85 <ImageView 86 android:id="@+id/conversation_icon_badge_ring" 87 android:layout_width="wrap_content" 88 android:layout_height="wrap_content" 89 android:layout_gravity="center" 90 android:src="@*android:drawable/conversation_badge_ring" 91 android:forceHasOverlappingRendering="false" 92 android:clipToPadding="false" 93 android:scaleType="center" 94 /> 95 </FrameLayout> 96 </FrameLayout> 97 <LinearLayout 98 android:id="@+id/names" 99 android:layout_weight="1" 100 android:layout_width="0dp" 101 android:orientation="vertical" 102 android:layout_height="wrap_content" 103 android:minHeight="@dimen/notification_guts_conversation_icon_size" 104 android:layout_centerVertical="true" 105 android:gravity="center_vertical" 106 android:layout_alignEnd="@id/conversation_icon" 107 android:layout_toEndOf="@id/conversation_icon"> 108 <LinearLayout 109 android:layout_width="match_parent" 110 android:layout_height="wrap_content" 111 android:gravity="start" 112 android:orientation="horizontal"> 113 <TextView 114 android:id="@+id/parent_channel_name" 115 android:layout_width="wrap_content" 116 android:layout_height="wrap_content" 117 android:ellipsize="end" 118 android:textDirection="locale" 119 android:layout_weight="1" 120 style="@style/TextAppearance.NotificationImportanceChannel"/> 121 <TextView 122 android:layout_width="wrap_content" 123 android:layout_height="wrap_content" 124 android:layout_centerVertical="true" 125 style="@style/TextAppearance.NotificationImportanceHeader" 126 android:visibility="gone" 127 android:layout_marginStart="2dp" 128 android:layout_marginEnd="2dp" 129 android:text="@*android:string/notification_header_divider_symbol" /> 130 <TextView 131 android:id="@+id/name" 132 android:visibility="gone" 133 android:layout_width="wrap_content" 134 android:layout_height="wrap_content" 135 android:layout_weight="1" 136 style="@style/TextAppearance.NotificationImportanceChannel"/> 137 </LinearLayout> 138 <TextView 139 android:id="@+id/group_name" 140 android:layout_width="match_parent" 141 android:layout_height="wrap_content" 142 android:ellipsize="end" 143 android:textDirection="locale" 144 style="@style/TextAppearance.NotificationImportanceChannelGroup"/> 145 <TextView 146 android:id="@+id/pkg_name" 147 android:layout_width="match_parent" 148 android:layout_height="wrap_content" 149 style="@style/TextAppearance.NotificationImportanceApp" 150 android:ellipsize="end" 151 android:textDirection="locale" 152 android:maxLines="1"/> 153 <TextView 154 android:id="@+id/delegate_name" 155 android:layout_width="match_parent" 156 android:layout_height="wrap_content" 157 android:layout_centerVertical="true" 158 style="@style/TextAppearance.NotificationImportanceHeader" 159 android:layout_marginStart="2dp" 160 android:layout_marginEnd="2dp" 161 android:ellipsize="end" 162 android:textDirection="locale" 163 android:text="@string/notification_delegate_header" 164 android:maxLines="1" /> 165 166 </LinearLayout> 167 168 <!-- end aligned fields --> 169 <ImageButton 170 android:id="@+id/info" 171 android:layout_width="@dimen/notification_importance_toggle_size" 172 android:layout_height="@dimen/notification_importance_toggle_size" 173 android:layout_centerVertical="true" 174 android:contentDescription="@string/notification_more_settings" 175 android:background="@drawable/ripple_drawable_20dp" 176 android:src="@drawable/ic_settings" 177 android:tint="?androidprv:attr/materialColorPrimary" 178 android:layout_alignParentEnd="true" /> 179 180 </LinearLayout> 181 182 <LinearLayout 183 android:id="@+id/inline_controls" 184 android:layout_width="match_parent" 185 android:layout_height="wrap_content" 186 android:paddingEnd="@*android:dimen/notification_content_margin_end" 187 android:layout_marginTop="@dimen/notification_guts_option_vertical_padding" 188 android:clipChildren="false" 189 android:clipToPadding="false" 190 android:orientation="vertical"> 191 192 <!-- Non configurable app/channel text. appears instead of @+id/interruptiveness_settings--> 193 <TextView 194 android:id="@+id/non_configurable_text" 195 android:text="@string/notification_unblockable_desc" 196 android:visibility="gone" 197 android:layout_width="match_parent" 198 android:layout_height="wrap_content" 199 style="@*android:style/TextAppearance.DeviceDefault.Notification" /> 200 201 <!-- Non configurable multichannel text. appears instead of @+id/interruptiveness_settings--> 202 <TextView 203 android:id="@+id/non_configurable_multichannel_text" 204 android:text="@string/notification_multichannel_desc" 205 android:visibility="gone" 206 android:layout_width="match_parent" 207 android:layout_height="wrap_content" 208 style="@*android:style/TextAppearance.DeviceDefault.Notification" /> 209 210 <LinearLayout 211 android:id="@+id/interruptiveness_settings" 212 android:layout_width="match_parent" 213 android:layout_height="wrap_content" 214 android:gravity="center" 215 android:orientation="vertical"> 216 217 <com.android.systemui.statusbar.notification.row.ButtonLinearLayout 218 android:id="@+id/priority" 219 android:layout_width="match_parent" 220 android:layout_height="wrap_content" 221 android:padding="@dimen/notification_importance_button_padding" 222 android:clickable="true" 223 android:focusable="true" 224 android:background="@drawable/notification_guts_priority_button_bg" 225 android:orientation="vertical"> 226 <LinearLayout 227 android:layout_width="match_parent" 228 android:layout_height="wrap_content" 229 android:orientation="horizontal" 230 android:gravity="center" 231 > 232 <ImageView 233 android:id="@+id/priority_icon" 234 android:layout_width="wrap_content" 235 android:layout_height="wrap_content" 236 android:src="@drawable/ic_important_outline" 237 android:background="@android:color/transparent" 238 android:tint="@color/notification_guts_priority_contents" 239 android:clickable="false" 240 android:focusable="false"/> 241 <TextView 242 android:id="@+id/priority_label" 243 android:layout_width="0dp" 244 android:layout_height="wrap_content" 245 android:layout_marginStart="@dimen/notification_importance_drawable_padding" 246 android:layout_weight="1" 247 android:ellipsize="end" 248 android:maxLines="1" 249 android:clickable="false" 250 android:focusable="false" 251 android:textAppearance="@style/TextAppearance.NotificationImportanceButton" 252 android:text="@string/notification_priority_title"/> 253 </LinearLayout> 254 <TextView 255 android:id="@+id/priority_summary" 256 android:layout_width="match_parent" 257 android:layout_height="wrap_content" 258 android:layout_marginTop="@dimen/notification_importance_button_description_top_margin" 259 android:visibility="gone" 260 android:clickable="false" 261 android:focusable="false" 262 android:ellipsize="end" 263 android:maxLines="4" 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/default_behavior" 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/default_icon" 285 android:layout_width="wrap_content" 286 android:layout_height="wrap_content" 287 android:src="@drawable/ic_notifications_alert" 288 android:background="@android:color/transparent" 289 android:tint="@color/notification_guts_priority_contents" 290 android:clickable="false" 291 android:focusable="false"/> 292 <TextView 293 android:id="@+id/default_label" 294 android:layout_width="0dp" 295 android:layout_height="wrap_content" 296 android:layout_marginStart="@dimen/notification_importance_drawable_padding" 297 android:layout_weight="1" 298 android:ellipsize="end" 299 android:maxLines="1" 300 android:clickable="false" 301 android:focusable="false" 302 android:textAppearance="@style/TextAppearance.NotificationImportanceButton" 303 android:text="@string/notification_alert_title"/> 304 </LinearLayout> 305 <TextView 306 android:id="@+id/default_summary" 307 android:layout_width="match_parent" 308 android:layout_height="wrap_content" 309 android:layout_marginTop="@dimen/notification_importance_button_description_top_margin" 310 android:visibility="gone" 311 android:text="@string/notification_channel_summary_default" 312 android:clickable="false" 313 android:focusable="false" 314 android:ellipsize="end" 315 android:maxLines="4" 316 android:textAppearance="@style/TextAppearance.NotificationImportanceDetail"/> 317 </com.android.systemui.statusbar.notification.row.ButtonLinearLayout> 318 319 <com.android.systemui.statusbar.notification.row.ButtonLinearLayout 320 android:id="@+id/silence" 321 android:layout_width="match_parent" 322 android:layout_height="wrap_content" 323 android:layout_marginTop="@dimen/notification_importance_button_separation" 324 android:padding="@dimen/notification_importance_button_padding" 325 android:clickable="true" 326 android:focusable="true" 327 android:background="@drawable/notification_guts_priority_button_bg" 328 android:orientation="vertical"> 329 <LinearLayout 330 android:layout_width="match_parent" 331 android:layout_height="wrap_content" 332 android:orientation="horizontal" 333 android:gravity="center" 334 > 335 <ImageView 336 android:id="@+id/silence_icon" 337 android:src="@drawable/ic_notifications_silence" 338 android:background="@android:color/transparent" 339 android:tint="@color/notification_guts_priority_contents" 340 android:layout_gravity="center" 341 android:layout_width="wrap_content" 342 android:layout_height="wrap_content" 343 android:clickable="false" 344 android:focusable="false"/> 345 <TextView 346 android:id="@+id/silence_label" 347 android:layout_width="match_parent" 348 android:layout_height="wrap_content" 349 android:ellipsize="end" 350 android:maxLines="1" 351 android:clickable="false" 352 android:focusable="false" 353 android:layout_toEndOf="@id/silence_icon" 354 android:layout_marginStart="@dimen/notification_importance_drawable_padding" 355 android:textAppearance="@style/TextAppearance.NotificationImportanceButton" 356 android:text="@string/notification_silence_title"/> 357 </LinearLayout> 358 <TextView 359 android:id="@+id/silence_summary" 360 android:layout_width="match_parent" 361 android:layout_height="wrap_content" 362 android:layout_marginTop="@dimen/notification_importance_button_description_top_margin" 363 android:visibility="gone" 364 android:text="@string/notification_conversation_summary_low" 365 android:clickable="false" 366 android:focusable="false" 367 android:ellipsize="end" 368 android:maxLines="4" 369 android:textAppearance="@style/TextAppearance.NotificationImportanceDetail"/> 370 </com.android.systemui.statusbar.notification.row.ButtonLinearLayout> 371 372 </LinearLayout> 373 374 <RelativeLayout 375 android:id="@+id/bottom_buttons" 376 android:layout_width="match_parent" 377 android:layout_height="60dp" 378 android:gravity="center_vertical" 379 android:paddingStart="4dp" 380 android:paddingEnd="4dp" 381 > 382 <TextView 383 android:id="@+id/done" 384 android:text="@string/inline_ok_button" 385 android:layout_width="wrap_content" 386 android:layout_height="wrap_content" 387 android:layout_alignParentEnd="true" 388 android:gravity="end|center_vertical" 389 android:minWidth="@dimen/notification_importance_toggle_size" 390 android:minHeight="@dimen/notification_importance_toggle_size" 391 style="@style/TextAppearance.NotificationInfo.Button"/> 392 </RelativeLayout> 393 </LinearLayout> 394 395</com.android.systemui.statusbar.notification.row.NotificationConversationInfo> 396