Julia Reynolds | b37d565 | 2019-12-12 08:12:29 -0500 | [diff] [blame] | 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" |
Julia Reynolds | 9a6e732 | 2020-05-13 14:03:40 -0400 | [diff] [blame] | 17 | android:layout_width="match_parent" |
| 18 | android:layout_height="wrap_content" |
Julia Reynolds | 9a6e732 | 2020-05-13 14:03:40 -0400 | [diff] [blame] | 19 | android:minHeight="48dp" |
| 20 | android:orientation="vertical" |
Julia Reynolds | 2679bf5 | 2020-05-21 12:02:33 -0400 | [diff] [blame] | 21 | android:background="?android:attr/selectableItemBackground"> |
| 22 | <LinearLayout |
Julia Reynolds | b37d565 | 2019-12-12 08:12:29 -0500 | [diff] [blame] | 23 | android:layout_width="match_parent" |
| 24 | android:layout_height="wrap_content" |
Julia Reynolds | 9a6e732 | 2020-05-13 14:03:40 -0400 | [diff] [blame] | 25 | android:paddingStart="?android:attr/listPreferredItemPaddingStart" |
| 26 | android:paddingEnd="?android:attr/listPreferredItemPaddingEnd" |
Julia Reynolds | 2679bf5 | 2020-05-21 12:02:33 -0400 | [diff] [blame] | 27 | android:paddingTop="16dp" |
| 28 | android:paddingBottom="16dp" |
| 29 | android:orientation="vertical"> |
Julia Reynolds | b37d565 | 2019-12-12 08:12:29 -0500 | [diff] [blame] | 30 | |
Julia Reynolds | 9a6e732 | 2020-05-13 14:03:40 -0400 | [diff] [blame] | 31 | <LinearLayout |
Julia Reynolds | b37d565 | 2019-12-12 08:12:29 -0500 | [diff] [blame] | 32 | android:layout_width="match_parent" |
| 33 | android:layout_height="wrap_content" |
Julia Reynolds | 9a6e732 | 2020-05-13 14:03:40 -0400 | [diff] [blame] | 34 | android:minHeight="@*android:dimen/status_bar_icon_size" |
Julia Reynolds | e32e6cc | 2020-06-01 14:57:30 -0400 | [diff] [blame] | 35 | android:gravity="center_vertical" |
| 36 | android:layout_marginBottom="6dp"> |
Julia Reynolds | b37d565 | 2019-12-12 08:12:29 -0500 | [diff] [blame] | 37 | |
Julia Reynolds | 9a6e732 | 2020-05-13 14:03:40 -0400 | [diff] [blame] | 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" |
Julia Reynolds | 2679bf5 | 2020-05-21 12:02:33 -0400 | [diff] [blame] | 59 | android:textAppearance="@style/TextAppearance.NotificationHistory.AppName" |
Julia Reynolds | 9a6e732 | 2020-05-13 14:03:40 -0400 | [diff] [blame] | 60 | android:marqueeRepeatLimit = "marquee_forever" |
| 61 | android:scrollHorizontally = "true" |
Julia Reynolds | 9a6e732 | 2020-05-13 14:03:40 -0400 | [diff] [blame] | 62 | android:textAlignment="viewStart" /> |
| 63 | |
| 64 | <ImageView |
| 65 | android:id="@+id/alerted_icon" |
Julia Reynolds | e32e6cc | 2020-06-01 14:57:30 -0400 | [diff] [blame] | 66 | android:layout_width="wrap_content" |
| 67 | android:layout_height="wrap_content" |
Julia Reynolds | 9a6e732 | 2020-05-13 14:03:40 -0400 | [diff] [blame] | 68 | android:layout_centerVertical="true" |
| 69 | android:layout_marginStart="6dp" |
Julia Reynolds | 9a6e732 | 2020-05-13 14:03:40 -0400 | [diff] [blame] | 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" |
Julia Reynolds | e32e6cc | 2020-06-01 14:57:30 -0400 | [diff] [blame] | 78 | android:layout_width="wrap_content" |
| 79 | android:layout_height="wrap_content" |
Julia Reynolds | 9a6e732 | 2020-05-13 14:03:40 -0400 | [diff] [blame] | 80 | android:layout_marginEnd="6dp" |
Julia Reynolds | 9a6e732 | 2020-05-13 14:03:40 -0400 | [diff] [blame] | 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" |
Julia Reynolds | 9a6e732 | 2020-05-13 14:03:40 -0400 | [diff] [blame] | 90 | android:layout_alignParentEnd="true" |
Julia Reynolds | 9a6e732 | 2020-05-13 14:03:40 -0400 | [diff] [blame] | 91 | android:ellipsize="end" |
| 92 | android:singleLine="true" |
Julia Reynolds | 2679bf5 | 2020-05-21 12:02:33 -0400 | [diff] [blame] | 93 | android:textAppearance="@style/TextAppearance.NotificationHistory.AppName" |
Julia Reynolds | 9a6e732 | 2020-05-13 14:03:40 -0400 | [diff] [blame] | 94 | android:textAlignment="viewEnd" |
| 95 | /> |
| 96 | </LinearLayout> |
| 97 | |
| 98 | <LinearLayout |
Julia Reynolds | b37d565 | 2019-12-12 08:12:29 -0500 | [diff] [blame] | 99 | android:layout_width="match_parent" |
| 100 | android:layout_height="wrap_content" |
Julia Reynolds | 9a6e732 | 2020-05-13 14:03:40 -0400 | [diff] [blame] | 101 | android:orientation="vertical" |
Julia Reynolds | 9a6e732 | 2020-05-13 14:03:40 -0400 | [diff] [blame] | 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" |
Julia Reynolds | 2679bf5 | 2020-05-21 12:02:33 -0400 | [diff] [blame] | 112 | android:textAppearance="@style/TextAppearance.NotificationHistory.Title" |
Julia Reynolds | 9a6e732 | 2020-05-13 14:03:40 -0400 | [diff] [blame] | 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" |
Julia Reynolds | ef4c044 | 2020-05-27 09:45:32 -0400 | [diff] [blame] | 122 | android:maxLines="3" |
Julia Reynolds | 2679bf5 | 2020-05-21 12:02:33 -0400 | [diff] [blame] | 123 | android:textAppearance="@style/TextAppearance.NotificationHistory.Text" |
Julia Reynolds | 9a6e732 | 2020-05-13 14:03:40 -0400 | [diff] [blame] | 124 | android:textAlignment="viewStart" |
| 125 | /> |
| 126 | |
| 127 | </LinearLayout> |
Julia Reynolds | b37d565 | 2019-12-12 08:12:29 -0500 | [diff] [blame] | 128 | |
| 129 | </LinearLayout> |
Julia Reynolds | 9a6e732 | 2020-05-13 14:03:40 -0400 | [diff] [blame] | 130 | <View |
| 131 | android:id="@+id/divider" |
| 132 | android:layout_width="match_parent" |
Julia Reynolds | 52cf852 | 2020-07-16 12:56:37 -0400 | [diff] [blame] | 133 | android:layout_height="wrap_content" |
| 134 | android:background="?android:attr/listDivider" /> |
Julia Reynolds | 9a6e732 | 2020-05-13 14:03:40 -0400 | [diff] [blame] | 135 | </LinearLayout> |