<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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:clickable="true"
    android:focusable="true">

    <View
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="?attr/colorSurface" />

    <View
        android:id="@+id/colorGradientBackground"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

    <include layout="@layout/shadow_statusbar_toolbar" />


    <androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical">


        <FrameLayout
            android:id="@+id/statusBarContainer"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent">

            <include layout="@layout/status_bar" />
        </FrameLayout>

        <com.google.android.material.appbar.MaterialToolbar
            android:id="@+id/playerToolbar"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:navigationIcon="@drawable/ic_keyboard_arrow_down_black_24dp"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/statusBarContainer"
            app:navigationIcon="@drawable/ic_keyboard_arrow_down_black_24dp" />

        <LinearLayout
            android:id="@+id/albumCoverContainer"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:orientation="horizontal"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/playerToolbar">

            <code.name.monkey.retromusic.views.WidthFitSquareLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_weight="1">

                <fragment
                    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" />
            </code.name.monkey.retromusic.views.WidthFitSquareLayout>

            <Space
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_weight="1" />

            <Space
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_weight="1" />
        </LinearLayout>

        <fragment
            android:id="@+id/playbackControlsFragment"
            android:name="code.name.monkey.retromusic.fragments.player.normal.PlayerPlaybackControlsFragment"
            android:layout_width="0dp"
            android:layout_height="0dp"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/albumCoverContainer"
            tools:layout="@layout/fragment_player_playback_controls" />

    </androidx.constraintlayout.widget.ConstraintLayout>
</RelativeLayout>