<?xml version="1.0" encoding="utf-8"?>
<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">

    <com.google.android.material.appbar.AppBarLayout
        android:id="@+id/appbar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:fitsSystemWindows="true">

        <com.google.android.material.appbar.MaterialToolbar
            android:id="@+id/toolbar"
            android:layout_width="match_parent"
            android:layout_height="?attr/actionBarSize"
            app:layout_collapseMode="pin"
            app:title="@string/subscriptions_label"
            app:navigationContentDescription="@string/toolbar_back_button_content_description"
            app:navigationIcon="?homeAsUpIndicator" />

    </com.google.android.material.appbar.AppBarLayout>

    <androidx.coordinatorlayout.widget.CoordinatorLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <com.google.android.material.appbar.AppBarLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <com.google.android.material.appbar.CollapsingToolbarLayout
                android:id="@+id/collapsing_container"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                app:titleEnabled="false"
                app:contentScrim="#00000000"
                app:layout_scrollFlags="scroll|snap|enterAlways|exitUntilCollapsed">

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="vertical"
                    android:minHeight="1dp"
                    app:layout_collapseMode="pin">

                    <androidx.recyclerview.widget.RecyclerView
                        android:id="@+id/tags_recycler"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:paddingHorizontal="12dp"
                        android:clipToPadding="false"
                        android:visibility="visible"
                        tools:orientation="horizontal"
                        tools:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
                        tools:listitem="@layout/item_tag_chip" />

                    <TextView
                        android:id="@+id/feeds_filtered_message"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:paddingHorizontal="16dp"
                        android:paddingVertical="4dp"
                        android:background="?android:attr/selectableItemBackground"
                        android:text="@string/filtered_label" />

                </LinearLayout>

            </com.google.android.material.appbar.CollapsingToolbarLayout>

        </com.google.android.material.appbar.AppBarLayout>

        <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
            android:id="@+id/swipeRefresh"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            app:layout_behavior="@string/appbar_scrolling_view_behavior">

            <androidx.recyclerview.widget.RecyclerView
                android:id="@+id/subscriptions_grid"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:clipToPadding="false"
                android:layout_gravity="center_horizontal"
                android:paddingBottom="88dp"
                tools:itemCount="2"
                tools:listitem="@layout/subscription_grid_item" />

        </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>

        <ProgressBar
            android:id="@+id/progressBar"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:indeterminateOnly="true"
            android:visibility="visible" />

        <com.google.android.material.floatingactionbutton.FloatingActionButton
            android:id="@+id/subscriptions_add"
            android:layout_width="56dp"
            android:layout_height="56dp"
            android:layout_margin="16dp"
            android:layout_gravity="bottom|end"
            android:contentDescription="@string/add_feed_label"
            app:srcCompat="@drawable/ic_add" />

        <de.danoeh.antennapod.ui.view.FloatingSelectMenu
            android:id="@+id/floatingSelectMenu"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="bottom" />

    </androidx.coordinatorlayout.widget.CoordinatorLayout>

</LinearLayout>
