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="match_parent">
22
23    <com.android.car.ui.FocusParkingView
24        android:layout_width="wrap_content"
25        android:layout_height="wrap_content"/>
26
27    <com.android.car.ui.FocusArea
28        android:layout_width="match_parent"
29        android:layout_height="match_parent">
30
31        <com.android.car.notification.CarNotificationView
32            android:id="@+id/notification_view"
33            android:layout_width="match_parent"
34            android:layout_height="match_parent">
35
36            <FrameLayout
37                android:id="@+id/exit_button_container"
38                android:layout_width="@dimen/notification_scroll_margin"
39                android:layout_height="@dimen/notification_app_bar_height"
40                android:background="?android:attr/selectableItemBackground"
41                android:clickable="true"
42                android:focusable="true"
43                app:layout_constraintStart_toStartOf="parent"
44                app:layout_constraintTop_toTopOf="parent">
45                <ImageView
46                    android:layout_width="@dimen/notification_primary_icon_size"
47                    android:layout_height="@dimen/notification_primary_icon_size"
48                    android:layout_gravity="center"
49                    android:adjustViewBounds="true"
50                    android:background="@null"
51                    android:clickable="false"
52                    android:focusable="false"
53                    android:scaleType="fitXY"
54                    android:src="@drawable/ic_clear"/>
55            </FrameLayout>
56
57            <TextView
58                android:id="@+id/notification_center_title"
59                android:layout_width="wrap_content"
60                android:layout_height="@dimen/notification_app_bar_height"
61                android:gravity="center_vertical"
62                android:text="@string/notifications"
63                style="@style/NotificationCenterAppTitle"
64                app:layout_constraintStart_toEndOf="@+id/exit_button_container"/>
65
66            <Button
67                android:id="@+id/clear_all_button"
68                android:layout_width="wrap_content"
69                android:layout_height="@dimen/notification_app_bar_height"
70                android:text="@string/clear_all"
71                style="@style/ClearAllButtonHeader"
72                app:layout_constraintEnd_toEndOf="parent"/>
73
74            <androidx.recyclerview.widget.RecyclerView
75                android:id="@+id/notifications"
76                android:layout_width="0dp"
77                android:layout_height="0dp"
78                android:orientation="vertical"
79                app:layout_constraintBottom_toBottomOf="parent"
80                app:layout_constraintEnd_toEndOf="parent"
81                app:layout_constraintStart_toStartOf="parent"
82                app:layout_constraintTop_toBottomOf="@+id/notification_center_title"/>
83
84            <TextView
85                android:id="@+id/empty_notification_text"
86                android:layout_width="wrap_content"
87                android:layout_height="wrap_content"
88                app:layout_constraintBottom_toTopOf="@id/manage_button"
89                app:layout_constraintEnd_toEndOf="parent"
90                app:layout_constraintStart_toStartOf="parent"
91                app:layout_constraintTop_toTopOf="parent"
92                app:layout_constraintVertical_chainStyle="packed"
93                android:text="@string/empty_notification_header"
94                android:textAppearance="?android:attr/textAppearanceLarge"
95                android:visibility="gone"/>
96
97            <Button
98                android:id="@+id/manage_button"
99                style="@style/ManageButton"
100                android:layout_width="wrap_content"
101                android:layout_height="@dimen/manage_button_height"
102                android:layout_marginTop="@dimen/manage_button_top_margin"
103                app:layout_constraintBottom_toBottomOf="parent"
104                app:layout_constraintEnd_toEndOf="parent"
105                app:layout_constraintStart_toStartOf="parent"
106                app:layout_constraintTop_toBottomOf="@id/empty_notification_text"
107                app:layout_constraintVertical_chainStyle="packed"
108                android:text="@string/manage_text"
109                android:visibility="gone"/>
110        </com.android.car.notification.CarNotificationView>
111    </com.android.car.ui.FocusArea>
112</FrameLayout>
113