<?xml version="1.0" encoding="utf-8"?>
<eu.kanade.tachiyomi.ui.download.DownloadBottomSheet 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/dl_bottom_sheet"
    style="@style/BottomSheetDialogTheme"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@drawable/bottom_sheet_rounded_background"
    android:backgroundTint="?colorPrimaryVariant"
    android:orientation="vertical"
    app:behavior_peekHeight="48sp"
    app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior">

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/sheet_layout"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@drawable/bottom_sheet_rounded_background"
        android:backgroundTint="?attr/colorPrimaryVariant"
        android:orientation="vertical"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent">

        <ImageView
            android:id="@+id/pill"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:layout_marginTop="5dp"
            android:alpha="0.25"
            android:contentDescription="@string/drag_handle"
            android:src="@drawable/draggable_pill"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <com.google.android.material.textview.MaterialTextView
            android:id="@+id/title_text"
            style="?textAppearanceTitleLarge"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:layout_marginStart="10dp"
            android:paddingTop="6dp"
            android:layout_marginEnd="10dp"
            android:paddingBottom="10dp"
            app:layout_constraintTop_toBottomOf="@id/pill"
            android:ellipsize="end"
            android:gravity="center"
            android:maxLines="1"
            android:textAlignment="center"
            android:textColor="?actionBarTintColor"
            android:textSize="18sp"
            tools:text="Downloads" />

        <eu.kanade.tachiyomi.ui.base.CenteredToolbar
            android:id="@+id/sheet_toolbar"
            android:layout_width="match_parent"
            android:layout_height="?mainActionBarSize"
            android:background="@android:color/transparent"
            app:collapseIcon="@drawable/ic_arrow_back_24dp"
            app:layout_constraintTop_toBottomOf="@id/pill"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintVertical_bias="1.0"
            app:menu="@menu/download_queue"
            app:navigationIcon="@drawable/ic_close_24dp"
            app:navigationIconTint="?actionBarTintColor"
            app:titleTextColor="?actionBarTintColor" >

            <com.google.android.material.textview.MaterialTextView
                android:id="@+id/toolbar_title"
                style="?textAppearanceTitleLarge"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:drawableTint="?actionBarTintColor"
                android:ellipsize="end"
                android:maxLines="1"
                android:text="@string/extensions"
                android:textColor="?actionBarTintColor"
                android:textSize="20sp"
                tools:text="Title Text" />
        </eu.kanade.tachiyomi.ui.base.CenteredToolbar>
    </androidx.constraintlayout.widget.ConstraintLayout>

    <androidx.coordinatorlayout.widget.CoordinatorLayout
        android:id="@+id/recycler_layout"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="?attr/background">

        <androidx.recyclerview.widget.RecyclerView
            android:id="@+id/dl_recycler"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:clipToPadding="false"
            tools:listitem="@layout/download_item" />

        <eu.kanade.tachiyomi.widget.EmptyView
            android:id="@+id/empty_view"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:visibility="gone" />

        <eu.kanade.tachiyomi.ui.base.MaterialFastScroll
            android:id="@+id/fast_scroller"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            app:fastScrollerBubbleEnabled="true" />

        <com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
            android:id="@+id/download_fab"
            style="@style/Theme.Widget.FAB"
            android:text="@string/resume"
            app:icon="@drawable/ic_play_arrow_24dp"/>
    </androidx.coordinatorlayout.widget.CoordinatorLayout>
</eu.kanade.tachiyomi.ui.download.DownloadBottomSheet>