<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout 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:id="@+id/coordinatorLayout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="?android:colorBackground">

    <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/spaceExploreCollapsingToolbarLayout"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            app:contentScrim="?android:colorBackground"
            app:layout_scrollFlags="scroll|exitUntilCollapsed|snap"
            app:scrimAnimationDuration="250"
            app:scrimVisibleHeightTrigger="120dp"
            app:titleEnabled="false"
            app:toolbarId="@+id/toolbar">

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

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="vertical"
                    android:padding="8dp">

                    <TextView
                        style="@style/Widget.Vector.TextView.ActionBarTitle"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:text="@string/select_spaces" />

                    <TextView
                        style="@style/Widget.Vector.TextView.Body"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:paddingTop="8dp"
                        android:text="@string/decide_which_spaces_can_access"
                        android:textColor="?vctr_content_secondary" />
                </LinearLayout>

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


            <!--            <com.google.android.material.appbar.MaterialToolbar-->
            <!--                android:id="@+id/toolbar"-->
            <!--                android:layout_width="match_parent"-->
            <!--                android:layout_height="wrap_content"-->
            <!--                app:layout_collapseMode="pin"-->
            <!--                app:title="@string/select_spaces" />-->

            <!--            <TextView-->
            <!--                style="@style/Widget.Vector.TextView.Body"-->
            <!--                android:layout_width="match_parent"-->
            <!--                android:layout_height="wrap_content"-->
            <!--                android:text="@string/decide_which_spaces_can_access" />-->


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

        <androidx.appcompat.widget.SearchView
            android:id="@+id/roomsFilter"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="8dp"
            android:layout_marginBottom="8dp"
            app:queryHint="@string/search_hint_room_name" />
    </com.google.android.material.appbar.AppBarLayout>


    <androidx.recyclerview.widget.RecyclerView
        android:id="@+id/recyclerView"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="?android:colorBackground"
        app:layout_behavior="@string/appbar_scrolling_view_behavior"
        tools:listitem="@layout/item_room_to_add_in_space" />

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom"
        android:background="?vctr_toolbar_background"
        android:elevation="4dp"
        android:gravity="end"
        android:paddingStart="16dp"
        android:paddingEnd="16dp">

        <Button
            style="@style/Widget.Vector.Button.Positive"
            android:id="@+id/okButton"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/ok" />
    </LinearLayout>


</androidx.coordinatorlayout.widget.CoordinatorLayout>