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<FrameLayout 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 23 <androidx.cardview.widget.CardView 24 android:id="@+id/card_view" 25 android:layout_width="match_parent" 26 android:layout_height="wrap_content" 27 android:layout_gravity="center_horizontal" 28 android:layout_marginEnd="@dimen/notification_card_margin_horizontal" 29 android:layout_marginStart="@dimen/notification_card_margin_horizontal" 30 app:cardBackgroundColor="?android:attr/colorPrimary" 31 app:cardCornerRadius="@dimen/notification_card_radius"> 32 33 <RelativeLayout 34 android:layout_width="match_parent" 35 android:layout_height="wrap_content"> 36 37 <com.android.car.notification.template.CarNotificationHeaderView 38 android:id="@+id/group_header" 39 android:layout_width="match_parent" 40 android:layout_height="@dimen/notification_card_header_height" 41 android:layout_alignParentStart="true" 42 android:layout_alignParentTop="true" 43 android:layout_marginBottom="@dimen/card_header_margin_bottom" 44 android:layout_toStartOf="@+id/group_toggle_button" 45 android:paddingStart="@dimen/card_start_margin" 46 android:gravity="center_vertical"/> 47 48 <View 49 android:id="@+id/header_divider" 50 android:layout_width="match_parent" 51 android:layout_height="@dimen/notification_list_divider_height" 52 android:layout_below="@id/group_header" 53 android:background="@color/notification_list_divider_color"/> 54 55 <ImageView 56 android:id="@+id/group_toggle_icon" 57 android:layout_width="wrap_content" 58 android:layout_height="@dimen/notification_card_header_height" 59 android:layout_alignParentEnd="true" 60 android:layout_alignParentTop="true" 61 android:layout_marginEnd="@dimen/card_end_margin" 62 android:focusable="false" 63 android:tint="@color/icon_tint"/> 64 65 <androidx.recyclerview.widget.RecyclerView 66 android:id="@+id/notification_list" 67 android:layout_width="match_parent" 68 android:layout_height="wrap_content" 69 android:layout_below="@id/header_divider" 70 android:background="@color/group_notification_background_color"/> 71 72 <View 73 android:id="@+id/footer_divider" 74 android:layout_width="match_parent" 75 android:layout_height="@dimen/notification_list_divider_height" 76 android:layout_below="@id/notification_list" 77 android:background="@color/notification_list_divider_color"/> 78 79 <LinearLayout 80 android:layout_width="match_parent" 81 android:layout_height="wrap_content" 82 android:layout_below="@id/footer_divider" 83 android:orientation="horizontal" 84 android:layoutDirection="ltr"> 85 86 <TextView 87 android:id="@+id/expansion_footer" 88 android:layout_width="match_parent" 89 android:layout_height="@dimen/notification_card_footer_height" 90 android:layout_weight="1" 91 android:layout_marginEnd="@dimen/card_end_margin" 92 android:layout_marginStart="@dimen/card_start_margin" 93 android:gravity="center_vertical" 94 android:textDirection="locale" 95 android:textAlignment="gravity" 96 style="@style/NotificationBodyContentText"/> 97 98 <include 99 layout="@layout/dismiss_button" 100 android:layout_width="wrap_content" 101 android:layout_height="wrap_content" 102 android:layout_weight="0"/> 103 104 </LinearLayout> 105 106 </RelativeLayout> 107 108 <!-- This view intercepts all clicks on the card in the collapsed state --> 109 <View 110 android:id="@+id/touch_interceptor_view" 111 android:layout_width="match_parent" 112 android:layout_height="match_parent" 113 android:focusable="false"/> 114 </androidx.cardview.widget.CardView> 115</FrameLayout> 116