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

    <org.thoughtcrime.securesms.util.views.DarkOverflowToolbar
        android:id="@+id/toolbar"
        android:layout_width="match_parent"
        android:layout_height="@dimen/signal_m3_toolbar_height"
        android:background="@null"
        android:minHeight="@dimen/signal_m3_toolbar_height"
        android:theme="?attr/settingsToolbarStyle"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:navigationContentDescription="@string/DSLSettingsToolbar__navigate_up"
        app:navigationIcon="@drawable/symbol_arrow_start_24"
        app:titleTextAppearance="@style/Signal.Text.TitleLarge"
        tools:title="Settings" />

    <androidx.coordinatorlayout.widget.CoordinatorLayout
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1"
        tools:viewBindingIgnore="true">

        <com.google.android.material.appbar.AppBarLayout
            android:id="@+id/app_bar_layout"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="?attr/colorSurface"
            app:elevation="0dp">

            <com.google.android.material.appbar.CollapsingToolbarLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                app:layout_scrollFlags="scroll|exitUntilCollapsed">

                <include
                    android:id="@+id/name_field"
                    layout="@layout/stories_create_story_name_field_item" />

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

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

        <androidx.recyclerview.widget.RecyclerView
            android:id="@+id/recycler"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical"
            app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
            app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/name_field" />

        <com.google.android.material.button.MaterialButton
            android:id="@+id/create"
            style="@style/Signal.Widget.Button.Large.Primary"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="bottom|end"
            android:layout_marginEnd="16dp"
            android:layout_marginBottom="16dp"
            android:text="@string/CreateStoryWithViewersFragment__create"
            android:textColor="?attr/colorOnPrimaryContainer"
            app:backgroundTint="?attr/colorPrimaryContainer"
            app:cornerRadius="80dp"
            app:elevation="4dp"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent" />
    </androidx.coordinatorlayout.widget.CoordinatorLayout>
</LinearLayout>
