1<!-- 2 Copyright (C) 2020 The Android Open Source Project 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15--> 16<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 17 android:layout_width="match_parent" 18 android:layout_height="wrap_content" 19 android:minHeight="48dp" 20 android:orientation="vertical" 21 android:background="?android:attr/selectableItemBackground"> 22 <LinearLayout 23 android:layout_width="match_parent" 24 android:layout_height="wrap_content" 25 android:layout_marginStart="?android:attr/listPreferredItemPaddingStart" 26 android:layout_marginEnd="?android:attr/listPreferredItemPaddingEnd" 27 android:paddingStart="16dp" 28 android:paddingEnd="?android:attr/listPreferredItemPaddingEnd" 29 android:paddingTop="16dp" 30 android:paddingBottom="16dp" 31 android:orientation="vertical"> 32 33 <LinearLayout 34 android:layout_width="match_parent" 35 android:layout_height="wrap_content" 36 android:minHeight="@*android:dimen/status_bar_icon_size" 37 android:gravity="center_vertical" 38 android:layout_marginBottom="11dp"> 39 40 <ImageView 41 android:id="@+id/icon" 42 android:layout_height="24dp" 43 android:layout_width="24dp" 44 android:padding="4dp" 45 android:layout_centerVertical="true" 46 android:layout_marginEnd="14dp" 47 android:contentDescription="@null" 48 android:scaleType="centerInside" /> 49 50 <TextView 51 android:id="@+id/pkgname" 52 android:layout_weight="1" 53 android:layout_width="0dp" 54 android:layout_height="wrap_content" 55 android:layout_centerVertical="true" 56 android:ellipsize="end" 57 android:singleLine="true" 58 android:textColor="?android:attr/textColorPrimary" 59 android:textSize="12sp" 60 android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Notification" 61 android:marqueeRepeatLimit = "marquee_forever" 62 android:scrollHorizontally = "true" 63 android:textAlignment="viewStart" /> 64 65 <ImageView 66 android:id="@+id/alerted_icon" 67 android:layout_width="wrap_content" 68 android:layout_height="wrap_content" 69 android:layout_centerVertical="true" 70 android:layout_marginStart="6dp" 71 android:scaleType="fitCenter" 72 android:visibility="gone" 73 android:tint="?android:attr/textColorSecondary" 74 android:src="@drawable/ic_notifications_alert" 75 /> 76 77 <ImageView 78 android:id="@+id/profile_badge" 79 android:layout_width="16dp" 80 android:layout_height="16dp" 81 android:layout_marginEnd="6dp" 82 android:scaleType="fitCenter" 83 android:contentDescription="@*android:string/notification_work_profile_content_description" 84 android:layout_toStartOf="@id/timestamp" 85 /> 86 87 <DateTimeView 88 android:id="@+id/timestamp" 89 android:layout_width="wrap_content" 90 android:layout_height="wrap_content" 91 android:layout_alignParentEnd="true" 92 android:ellipsize="end" 93 android:singleLine="true" 94 android:textSize="12sp" 95 android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Notification" 96 android:textAlignment="viewEnd" 97 /> 98 </LinearLayout> 99 100 <LinearLayout 101 android:layout_width="match_parent" 102 android:layout_height="wrap_content" 103 android:paddingStart="38dp" 104 android:orientation="vertical" 105 android:layout_marginBottom="6dp" 106 > 107 108 <TextView 109 android:id="@+id/title" 110 android:layout_width="match_parent" 111 android:layout_height="wrap_content" 112 android:layout_gravity="left|center_vertical" 113 android:ellipsize="end" 114 android:singleLine="true" 115 android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Notification.Title" 116 android:textAlignment="viewStart" 117 /> 118 119 <TextView 120 android:id="@+id/text" 121 android:layout_width="match_parent" 122 android:layout_height="wrap_content" 123 android:layout_gravity="left|center_vertical" 124 android:ellipsize="end" 125 android:paddingTop="4dp" 126 android:maxLines="7" 127 android:textColor="?android:attr/textColorSecondary" 128 android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Notification" 129 android:textAlignment="viewStart" 130 /> 131 132 </LinearLayout> 133 </LinearLayout> 134</LinearLayout>