<?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"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/page_background">

    <com.google.android.material.appbar.AppBarLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@color/surface_background"
        app:elevation="0dp">

        <androidx.appcompat.widget.Toolbar
            android:id="@+id/toolbar"
            android:layout_width="match_parent"
            android:layout_height="?attr/actionBarSize"
            android:background="@color/surface_background"
            app:navigationIcon="@drawable/ic_round_back_button">

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Saved Cow Profiles"
                android:textSize="20sp"
                android:textStyle="bold"
                android:textColor="@color/text_primary"/>

        </androidx.appcompat.widget.Toolbar>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:paddingStart="16dp"
            android:paddingEnd="16dp"
            android:paddingBottom="16dp">

            <com.google.android.material.textfield.TextInputLayout
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                app:boxBackgroundColor="@color/input_background"
                app:boxCornerRadiusTopStart="24dp"
                app:boxCornerRadiusTopEnd="24dp"
                app:boxCornerRadiusBottomStart="24dp"
                app:boxCornerRadiusBottomEnd="24dp"
                app:boxStrokeWidth="0dp"
                app:startIconDrawable="@android:drawable/ic_menu_search"
                app:startIconTint="@color/text_secondary"
                android:hint="Search profiles..."
                android:textColorHint="@color/text_secondary">

                <com.google.android.material.textfield.TextInputEditText
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:paddingTop="12dp"
                    android:paddingBottom="12dp"
                    android:textColor="@color/text_primary"/>
            </com.google.android.material.textfield.TextInputLayout>

            <com.google.android.material.button.MaterialButton
                android:layout_width="52dp"
                android:layout_height="52dp"
                android:layout_marginStart="12dp"
                app:icon="@android:drawable/ic_menu_sort_by_size"
                app:iconTint="@color/icon_tint_primary"
                app:backgroundTint="@color/input_background"
                app:cornerRadius="12dp"
                app:iconGravity="textStart"
                app:iconPadding="0dp"
                android:insetTop="0dp"
                android:insetBottom="0dp"/>

        </LinearLayout>

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

    <androidx.core.widget.NestedScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:layout_behavior="@string/appbar_scrolling_view_behavior">

        <LinearLayout
            android:id="@+id/galleryContainer"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:padding="16dp"/>

    </androidx.core.widget.NestedScrollView>

    <com.google.android.material.floatingactionbutton.FloatingActionButton
        android:id="@+id/fabAddCow"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom|end"
        android:layout_margin="24dp"
        app:srcCompat="@android:drawable/ic_input_add"
        app:tint="@color/white"
        app:backgroundTint="@color/earthy"/>

</androidx.coordinatorlayout.widget.CoordinatorLayout>