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:paddingStart="?android:attr/listPreferredItemPaddingStart" 26 android:paddingEnd="?android:attr/listPreferredItemPaddingEnd" 27 android:paddingTop="16dp" 28 android:paddingBottom="16dp" 29 android:orientation="vertical"> 30 31 <LinearLayout 32 android:layout_width="match_parent" 33 android:layout_height="wrap_content" 34 android:minHeight="@*android:dimen/status_bar_icon_size" 35 android:gravity="center_vertical" 36 android:layout_marginBottom="6dp"> 37 38 <ImageView 39 android:id="@+id/icon" 40 android:layout_height="@*android:dimen/status_bar_icon_size" 41 android:layout_width="@*android:dimen/status_bar_icon_size" 42 android:layout_centerVertical="true" 43 android:layout_marginStart="0dp" 44 android:layout_marginEnd="8dp" 45 android:contentDescription="@null" 46 android:adjustViewBounds="true" 47 android:tint="?android:attr/textColorPrimary" 48 android:scaleType="fitCenter" /> 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:textAppearance="@style/TextAppearance.NotificationHistory.AppName" 60 android:marqueeRepeatLimit = "marquee_forever" 61 android:scrollHorizontally = "true" 62 android:textAlignment="viewStart" /> 63 64 <ImageView 65 android:id="@+id/alerted_icon" 66 android:layout_width="wrap_content" 67 android:layout_height="wrap_content" 68 android:layout_centerVertical="true" 69 android:layout_marginStart="6dp" 70 android:scaleType="fitCenter" 71 android:visibility="gone" 72 android:tint="?android:attr/textColorSecondary" 73 android:src="@drawable/ic_notifications_alert" 74 /> 75 76 <ImageView 77 android:id="@+id/profile_badge" 78 android:layout_width="wrap_content" 79 android:layout_height="wrap_content" 80 android:layout_marginEnd="6dp" 81 android:scaleType="fitCenter" 82 android:contentDescription="@*android:string/notification_work_profile_content_description" 83 android:layout_toStartOf="@id/timestamp" 84 /> 85 86 <DateTimeView 87 android:id="@+id/timestamp" 88 android:layout_width="wrap_content" 89 android:layout_height="wrap_content" 90 android:layout_alignParentEnd="true" 91 android:ellipsize="end" 92 android:singleLine="true" 93 android:textAppearance="@style/TextAppearance.NotificationHistory.AppName" 94 android:textAlignment="viewEnd" 95 /> 96 </LinearLayout> 97 98 <LinearLayout 99 android:layout_width="match_parent" 100 android:layout_height="wrap_content" 101 android:orientation="vertical" 102 android:layout_marginBottom="6dp" 103 > 104 105 <TextView 106 android:id="@+id/title" 107 android:layout_width="match_parent" 108 android:layout_height="wrap_content" 109 android:layout_gravity="left|center_vertical" 110 android:ellipsize="end" 111 android:singleLine="true" 112 android:textAppearance="@style/TextAppearance.NotificationHistory.Title" 113 android:textAlignment="viewStart" 114 /> 115 116 <TextView 117 android:id="@+id/text" 118 android:layout_width="match_parent" 119 android:layout_height="wrap_content" 120 android:layout_gravity="left|center_vertical" 121 android:ellipsize="end" 122 android:maxLines="3" 123 android:textAppearance="@style/TextAppearance.NotificationHistory.Text" 124 android:textAlignment="viewStart" 125 /> 126 127 </LinearLayout> 128 129 </LinearLayout> 130 <View 131 android:id="@+id/divider" 132 android:layout_width="match_parent" 133 android:layout_height="0.5dp" 134 android:background="@color/material_grey_300" /> 135</LinearLayout>