<?xml version="1.0" encoding="utf-8"?>
<layout>
    <data>
        <variable
            name="viewModel"
            type="com.tommasoberlose.anotherwidget.ui.viewmodels.tabs.AppNotificationsViewModel" />
    </data>

    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:app="http://schemas.android.com/apk/res-auto"
        xmlns:tools="http://schemas.android.com/tools"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"
        android:background="@color/colorPrimaryDark"
        tools:context="com.tommasoberlose.anotherwidget.ui.activities.tabs.AppNotificationsFilterActivity">
        <com.google.android.material.card.MaterialCardView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:cardElevation="2dp"
            app:cardCornerRadius="0dp"
            android:id="@+id/toolbar"
            app:cardBackgroundColor="@color/colorPrimary">
            <RelativeLayout
                android:layout_width="match_parent"
                android:layout_height="56dp"
                android:gravity="center_vertical"
                android:paddingLeft="8dp"
                android:paddingRight="8dp">
                <androidx.appcompat.widget.AppCompatImageView
                    android:layout_width="48dp"
                    android:layout_height="48dp"
                    android:padding="12dp"
                    android:layout_marginTop="2dp"
                    android:layout_centerVertical="true"
                    android:layout_alignParentLeft="true"
                    android:background="?attr/selectableItemBackgroundBorderless"
                    android:id="@+id/action_back"
                    app:tint="@color/colorPrimaryText"
                    android:src="@drawable/round_arrow_back_24" />
                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="match_parent"
                    android:layout_centerInParent="true"
                    android:text="@string/applications_filter_title"
                    android:gravity="center"
                    style="@style/AnotherWidget.Main.Title"/>
                <androidx.appcompat.widget.AppCompatImageView
                    android:layout_width="48dp"
                    android:layout_height="48dp"
                    android:padding="12dp"
                    android:clickable="true"
                    android:focusable="true"
                    android:background="?attr/selectableItemBackgroundBorderless"
                    android:src="@drawable/round_clear_all_24"
                    app:tint="@color/colorPrimaryText"
                    android:layout_alignParentRight="true"
                    android:layout_centerVertical="true"
                    android:id="@+id/clear_selection" />
            </RelativeLayout>
        </com.google.android.material.card.MaterialCardView>
        <com.google.android.material.card.MaterialCardView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:cardElevation="2dp"
            app:cardBackgroundColor="@color/colorPrimary">
            <com.google.android.material.card.MaterialCardView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                app:cardBackgroundColor="@color/colorPrimaryDark"
                app:cardCornerRadius="9dp"
                app:cardElevation="0dp"
                android:layout_marginTop="8dp"
                android:layout_marginLeft="16dp"
                android:layout_marginRight="16dp"
                android:layout_marginBottom="16dp">
                <EditText
                    android:layout_width="match_parent"
                    android:layout_height="48dp"
                    android:background="@color/colorPrimaryDark"
                    android:paddingStart="16dp"
                    android:paddingEnd="64dp"
                    android:inputType="textCapWords"
                    android:textColor="@color/colorPrimaryText"
                    android:textColorHint="@color/colorSecondaryText"
                    android:textAlignment="viewStart"
                    android:id="@+id/search"
                    android:fontFamily="@font/google_sans"
                    android:gravity="center_vertical|start"
                    android:hint="@string/search"
                    android:text="@={viewModel.searchInput}"
                    android:autofillHints="" />
                <androidx.appcompat.widget.AppCompatImageView
                    android:layout_width="48dp"
                    android:layout_height="48dp"
                    android:padding="12dp"
                    android:src="@drawable/round_close"
                    app:tint="@color/colorPrimaryText"
                    android:layout_gravity="center_vertical|end"
                    android:id="@+id/clear_search" />
            </com.google.android.material.card.MaterialCardView>
        </com.google.android.material.card.MaterialCardView>
        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="1">
            <androidx.core.widget.ContentLoadingProgressBar
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:indeterminate="true"
                android:indeterminateTint="@color/colorAccent"
                android:layout_marginTop="-7dp"
                android:id="@+id/loader"
                style="@style/Widget.AppCompat.ProgressBar.Horizontal" />
            <androidx.recyclerview.widget.RecyclerView
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:paddingTop="8dp"
                android:paddingBottom="8dp"
                android:clipToPadding="false"
                android:id="@+id/list_view" />
        </RelativeLayout>
    </LinearLayout>

</layout>