<?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">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical">

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

            <com.google.android.material.appbar.MaterialToolbar
                android:id="@+id/roomPreviewNoPreviewToolbar"
                android:layout_width="match_parent"
                android:layout_height="?actionBarSize"
                app:navigationIcon="@drawable/ic_x_18dp"
                app:navigationIconTint="?vctr_content_secondary">

                <androidx.constraintlayout.widget.ConstraintLayout
                    android:layout_width="match_parent"
                    android:layout_height="match_parent">

                    <ImageView
                        android:id="@+id/spacePreviewToolbarAvatar"
                        android:layout_width="40dp"
                        android:layout_height="40dp"
                        android:layout_marginTop="8dp"
                        android:layout_marginBottom="8dp"
                        android:importantForAccessibility="no"
                        app:layout_constraintBottom_toBottomOf="parent"
                        app:layout_constraintStart_toStartOf="parent"
                        app:layout_constraintTop_toTopOf="parent"
                        tools:src="@sample/space_avatars" />

                    <TextView
                        android:id="@+id/roomPreviewNoPreviewToolbarTitle"
                        style="@style/Widget.Vector.TextView.HeadlineMedium"
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_marginStart="8dp"
                        android:layout_marginEnd="8dp"
                        android:ellipsize="end"
                        android:maxLines="1"
                        android:textColor="?vctr_content_primary"
                        app:layout_constraintBottom_toBottomOf="parent"
                        app:layout_constraintEnd_toEndOf="parent"
                        app:layout_constraintHorizontal_bias="0.0"
                        app:layout_constraintStart_toEndOf="@+id/spacePreviewToolbarAvatar"
                        app:layout_constraintTop_toTopOf="parent"
                        tools:text="@sample/users.json/data/displayName" />

                </androidx.constraintlayout.widget.ConstraintLayout>

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

            <ProgressBar
                android:id="@+id/spacePreviewPeekingProgress"
                style="@style/Widget.Vector.ProgressBar.Horizontal"
                android:layout_width="match_parent"
                android:layout_height="14dp"
                android:layout_gravity="center"
                android:indeterminate="true" />

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

        <androidx.recyclerview.widget.RecyclerView
            android:id="@+id/spacePreviewRecyclerView"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="1"
            android:fastScrollEnabled="true"
            android:overScrollMode="always"
            android:scrollbars="vertical"
            app:layout_behavior="@string/appbar_scrolling_view_behavior"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/spacePreviewPeekingProgress"
            tools:listitem="@layout/item_space_subspace" />

        <View
            android:layout_width="match_parent"
            android:layout_height="1dp"
            android:background="?vctr_list_separator" />

        <LinearLayout
            android:id="@+id/spacePreviewButtonBar"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_margin="8dp"
            android:elevation="2dp"
            android:gravity="center_horizontal"
            android:orientation="horizontal">

            <Button
                android:id="@+id/spacePreviewDeclineInviteButton"
                style="@style/Widget.Vector.Button.Destructive"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginEnd="16dp"
                android:layout_weight="1"
                android:text="@string/decline" />

            <Button
                android:id="@+id/spacePreviewAcceptInviteButton"
                style="@style/Widget.Vector.Button.Positive"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:text="@string/accept" />

        </LinearLayout>

    </LinearLayout>

</androidx.coordinatorlayout.widget.CoordinatorLayout>
