1<?xml version="1.0" encoding="utf-8"?> 2<!-- 3 Copyright (C) 2018 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<LinearLayout 18 xmlns:android="http://schemas.android.com/apk/res/android" 19 xmlns:app="http://schemas.android.com/apk/res-auto" 20 android:layout_width="match_parent" 21 android:layout_height="wrap_content" 22 android:orientation="vertical"> 23 24 <LinearLayout 25 android:id="@+id/expanded_group_header" 26 android:layout_width="wrap_content" 27 android:layout_height="wrap_content" 28 android:layout_marginStart="@dimen/notification_card_margin_horizontal" 29 android:orientation="horizontal" 30 android:gravity="center_vertical" 31 android:layoutDirection="locale"> 32 33 <TextView 34 android:id="@+id/expanded_group_header_text" 35 android:layout_width="wrap_content" 36 android:layout_height="wrap_content" 37 android:layout_marginEnd="@dimen/expanded_package_name_margin" 38 android:gravity="center_vertical" 39 android:textDirection="locale" 40 android:textAlignment="gravity" 41 android:focusable="false" 42 style="@style/ExpandedGroupNotificationHeaderText"/> 43 44 <ImageView 45 android:id="@+id/expanded_group_header_toggle_icon" 46 android:layout_width="wrap_content" 47 android:layout_height="@dimen/notification_card_header_height" 48 android:layout_marginEnd="@dimen/card_end_margin" 49 android:src="@drawable/expand_less" 50 android:focusable="false" 51 android:tint="@color/icon_tint"/> 52 </LinearLayout> 53 54 <androidx.cardview.widget.CardView 55 android:id="@+id/card_view" 56 android:layout_width="match_parent" 57 android:layout_height="wrap_content" 58 android:layout_gravity="center_horizontal" 59 android:layout_marginEnd="@dimen/notification_card_margin_horizontal" 60 android:layout_marginStart="@dimen/notification_card_margin_horizontal" 61 app:cardBackgroundColor="@color/notification_background_color" 62 app:cardCornerRadius="@dimen/notification_card_radius"> 63 64 <RelativeLayout 65 android:layout_width="match_parent" 66 android:layout_height="wrap_content"> 67 68 <com.android.car.notification.template.CarNotificationHeaderView 69 android:id="@+id/group_header" 70 android:layout_width="match_parent" 71 android:layout_height="@dimen/notification_card_header_height" 72 android:layout_alignParentStart="true" 73 android:layout_alignParentTop="true" 74 android:layout_marginBottom="@dimen/card_header_margin_bottom" 75 android:layout_toStartOf="@+id/group_toggle_icon" 76 android:paddingStart="@dimen/card_start_margin" 77 android:gravity="center_vertical"/> 78 79 <View 80 android:id="@+id/header_divider" 81 android:layout_width="match_parent" 82 android:layout_height="@dimen/notification_list_divider_height" 83 android:layout_below="@id/group_header" 84 android:background="@color/notification_list_divider_color"/> 85 86 <ImageView 87 android:id="@+id/group_toggle_icon" 88 android:layout_width="wrap_content" 89 android:layout_height="@dimen/notification_card_header_height" 90 android:layout_alignParentEnd="true" 91 android:layout_alignParentTop="true" 92 android:layout_marginEnd="@dimen/card_end_margin" 93 android:focusable="false" 94 android:tint="@color/icon_tint"/> 95 96 <androidx.recyclerview.widget.RecyclerView 97 android:id="@+id/notification_list" 98 android:layout_width="match_parent" 99 android:layout_height="wrap_content" 100 android:layout_below="@id/header_divider" 101 android:background="@color/group_notification_background_color"/> 102 103 <View 104 android:id="@+id/footer_divider" 105 android:layout_width="match_parent" 106 android:layout_height="@dimen/notification_list_divider_height" 107 android:layout_below="@id/notification_list" 108 android:background="@color/notification_list_divider_color"/> 109 110 <FrameLayout 111 android:id="@+id/expansion_footer_holder" 112 android:layout_width="match_parent" 113 android:layout_height="wrap_content" 114 android:layout_below="@id/footer_divider"> 115 116 <TextView 117 android:id="@+id/expansion_footer" 118 android:layout_width="match_parent" 119 android:layout_height="@dimen/notification_card_footer_height" 120 android:layout_marginEnd="@dimen/card_end_margin" 121 android:layout_marginStart="@dimen/card_start_margin" 122 android:layout_gravity="center" 123 android:gravity="center" 124 android:textDirection="locale" 125 android:textAlignment="gravity" 126 style="@style/GroupNotificationFooterText"/> 127 128 <include 129 layout="@layout/dismiss_button" 130 android:layout_width="wrap_content" 131 android:layout_height="wrap_content" 132 android:layout_gravity="end"/> 133 134 </FrameLayout> 135 136 </RelativeLayout> 137 138 <!-- This view intercepts all clicks on the card in the collapsed state --> 139 <View 140 android:id="@+id/touch_interceptor_view" 141 android:layout_width="match_parent" 142 android:layout_height="match_parent" 143 android:focusable="false"/> 144 </androidx.cardview.widget.CardView> 145</LinearLayout> 146