<?xml version="1.0" encoding="utf-8"?>
<!--
    Copyright (C) 2018 The Android Open Source Project

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
-->
<com.android.car.notification.CarNotificationView
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/notification_view"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <FrameLayout
        android:id="@+id/exit_button_container"
        android:layout_width="@dimen/notification_scroll_margin"
        android:layout_height="@dimen/notification_app_bar_height"
        android:background="?android:attr/selectableItemBackground"
        android:clickable="true"
        android:focusable="true"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent">
        <ImageButton
            android:layout_width="@dimen/notification_primary_icon_size"
            android:layout_height="@dimen/notification_primary_icon_size"
            android:layout_gravity="center"
            android:adjustViewBounds="true"
            android:background="@null"
            android:clickable="false"
            android:focusable="false"
            android:scaleType="fitXY"
            android:src="@drawable/ic_clear"/>
    </FrameLayout>

    <TextView
        android:id="@+id/notification_center_title"
        android:layout_width="wrap_content"
        android:layout_height="@dimen/notification_app_bar_height"
        android:gravity="center_vertical"
        android:text="@string/notifications"
        style="@style/NotificationCenterAppTitle"
        app:layout_constraintStart_toEndOf="@+id/exit_button_container"/>

    <Button
        android:id="@+id/clear_all_button"
        android:layout_width="wrap_content"
        android:layout_height="@dimen/notification_app_bar_height"
        android:text="@string/clear_all"
        style="@style/ClearAllButtonHeader"
        app:layout_constraintEnd_toEndOf="parent"/>

    <com.android.car.apps.common.widget.PagedRecyclerView
        android:id="@+id/notifications"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:orientation="vertical"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/notification_center_title"/>

</com.android.car.notification.CarNotificationView>