<?xml version="1.0" encoding="utf-8"?>
<FrameLayout 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/mediaListContainer"
    android:layout_width="match_parent"
    android:layout_height="wrap_content">

    <ProgressBar
        android:id="@+id/mediaListProgressBar"
        style="?android:attr/progressBarStyle"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:indeterminate="true"
        tools:visibility="invisible" />

    <LinearLayout
        android:id="@+id/mediaListLayout"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:visibility="invisible"
        tools:visibility="visible">

        <TextView
            android:id="@+id/searchSourceTitle"
            android:layout_width="match_parent"
            android:layout_height="48dp"
            android:fontFamily="@font/poppins"
            android:gravity="bottom|center_horizontal"
            android:text="@string/source"
            android:textSize="20sp"
            android:textStyle="bold" />

        <com.google.android.material.textfield.TextInputLayout
            android:id="@+id/searchBar"
            style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
            android:layout_width="match_parent"
            android:layout_height="56dp"
            android:layout_margin="16dp"
            android:hint="@string/search"
            android:transitionName="@string/search"
            app:boxBackgroundColor="?android:colorBackground"
            app:boxBackgroundMode="outline"
            app:boxCornerRadiusBottomEnd="28dp"
            app:boxCornerRadiusBottomStart="28dp"
            app:boxCornerRadiusTopEnd="28dp"
            app:boxCornerRadiusTopStart="28dp"
            app:endIconDrawable="@drawable/ic_round_search_24"
            app:boxStrokeColor="@color/text_input_layout_stroke_color"
            app:hintAnimationEnabled="true">

            <AutoCompleteTextView
                android:id="@+id/searchBarText"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:fontFamily="@font/poppins_bold"
                android:imeOptions="actionSearch"
                android:inputType="textPersonName"
                android:padding="8dp"
                android:selectAllOnFocus="true"
                android:textSize="14sp"
                tools:ignore="LabelFor,TextContrastCheck" />
        </com.google.android.material.textfield.TextInputLayout>

        <ProgressBar
            android:id="@+id/searchProgress"
            style="?android:attr/progressBarStyle"
            android:layout_width="match_parent"
            android:layout_height="48dp"
            android:layout_gravity="bottom"
            android:layout_margin="24dp"
            android:indeterminate="true"
            android:visibility="visible"
            tools:visibility="gone" />

        <ani.dantotsu.FadingEdgeRecyclerView
            android:id="@+id/searchRecyclerView"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:clipToPadding="false"
            android:padding="16dp"
            android:requiresFadingEdge="vertical"
            android:visibility="gone"
            app:spanCount="2"
            tools:itemCount="10"
            tools:layoutManager="GridLayoutManager"
            tools:listitem="@layout/item_media_compact"
            tools:orientation="vertical"
            tools:visibility="visible" />

    </LinearLayout>

</FrameLayout>