<?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:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="?attr/colorSurface">

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/playerContainer"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical">

        <FrameLayout
            android:id="@+id/albumCoverContainer"
            android:layout_width="0dp"
            android:layout_height="0dp"
            app:layout_constraintDimensionRatio="1:1"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent">

            <androidx.fragment.app.FragmentContainerView
                android:id="@+id/playerAlbumCoverFragment"
                android:name="code.name.monkey.retromusic.fragments.player.PlayerAlbumCoverFragment"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                tools:layout="@layout/fragment_album_cover" />
        </FrameLayout>


        <View
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:background="@drawable/shadow_down_strong"
            app:layout_constraintBottom_toBottomOf="@id/toolbarContainer"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="@id/toolbarContainer" />

        <LinearLayout
            android:id="@+id/toolbarContainer"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent">

            <code.name.monkey.retromusic.views.StatusBarView
                android:id="@+id/status_bar"
                android:layout_width="match_parent"
                android:layout_height="@dimen/status_bar_padding" />

            <com.google.android.material.appbar.MaterialToolbar
                android:id="@+id/playerToolbar"
                style="@style/Toolbar"
                android:layout_gravity="bottom"
                android:navigationIcon="@drawable/ic_keyboard_arrow_down_black"
                app:navigationIcon="@drawable/ic_keyboard_arrow_down_black" />
        </LinearLayout>


        <include
            android:id="@+id/playerControlsContainer"
            layout="@layout/fragment_classic_controls"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:elevation="24dp"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/albumCoverContainer" />
    </androidx.constraintlayout.widget.ConstraintLayout>

    <com.google.android.material.card.MaterialCardView
        android:id="@+id/playerQueueSheet"
        style="@style/BottomSheetStyle"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:gravity="bottom"
        android:theme="@style/TopCornerCardView"
        app:behavior_hideable="false"
        app:cardElevation="24dp"
        app:layout_behavior="code.name.monkey.retromusic.RetroBottomSheetBehavior"
        tools:peekHeight="0dp">

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

            <com.google.android.material.textview.MaterialTextView
                android:id="@+id/title"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginHorizontal="16dp"
                android:layout_marginTop="16dp"
                android:clickable="true"
                android:ellipsize="marquee"
                android:focusable="true"
                android:freezesText="true"
                android:marqueeRepeatLimit="marquee_forever"
                android:scrollHorizontally="true"
                android:singleLine="true"
                android:textAppearance="@style/TextViewHeadline6"
                android:textColor="?android:attr/textColorPrimary"
                android:textStyle="bold"
                tools:text="@tools:sample/lorem[5]" />

            <com.google.android.material.textview.MaterialTextView
                android:id="@+id/text"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginHorizontal="16dp"
                android:clickable="true"
                android:ellipsize="end"
                android:focusable="true"
                android:maxLines="1"
                android:textAppearance="@style/TextViewBody1"
                android:textColor="?android:attr/textColorSecondary"
                tools:text="@tools:sample/full_names[0]" />

            <com.google.android.material.textview.MaterialTextView
                android:id="@+id/player_queue_sub_header"
                android:layout_width="match_parent"
                android:layout_height="?attr/listPreferredItemHeightSmall"
                android:gravity="center_vertical"
                android:paddingLeft="16dp"
                android:paddingRight="16dp"
                android:text="@string/up_next"
                android:textAppearance="@style/TextAppearance.AppCompat.Body2"
                android:textColor="?android:attr/textColorSecondary" />

            <androidx.recyclerview.widget.RecyclerView
                android:id="@+id/recyclerView"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:overScrollMode="@integer/overScrollMode"
                tools:listitem="@layout/item_list" />
        </LinearLayout>

    </com.google.android.material.card.MaterialCardView>
</androidx.coordinatorlayout.widget.CoordinatorLayout>