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

    <androidx.coordinatorlayout.widget.CoordinatorLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical">

        <com.google.android.material.appbar.AppBarLayout
            android:id="@+id/app_bar"
            android:layout_width="match_parent"
            android:layout_height="230dp"
            android:background="@color/transparent"
            app:elevation="0dp">

            <com.google.android.material.appbar.CollapsingToolbarLayout
                android:id="@+id/toolbar_layout"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                app:contentScrim="@color/transparent"
                app:layout_scrollFlags="scroll|exitUntilCollapsed"
                app:toolbarId="@+id/toolbar">

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

                    <ImageView
                        android:id="@+id/image_history"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:contentDescription="@string/cd_icon_history"
                        app:srcCompat="@drawable/ic_clock_white"
                        app:layout_constraintLeft_toLeftOf="parent"
                        app:layout_constraintTop_toTopOf="parent"
                        app:layout_constraintBottom_toBottomOf="@id/text_watch_later"
                        android:paddingTop="10dp"
                        android:paddingBottom="10dp"
                        android:paddingStart="15dp" />

                    <TextView
                        android:id="@+id/text_watch_later"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:textSize="16dp"
                        android:textColor="@color/white"
                        android:fontFamily="@font/inter_light"
                        android:text="@string/watch_later"
                        android:paddingStart="10dp"
                        android:paddingTop="10dp"
                        android:paddingBottom="10dp"
                        app:layout_constraintLeft_toRightOf="@id/image_history"
                        app:layout_constraintTop_toTopOf="parent" />

                    <TextView
                        android:id="@+id/text_view_all"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="@string/view_all"
                        android:fontFamily="@font/inter_regular"
                        android:textSize="14dp"
                        android:textColor="@color/gray_56"
                        android:gravity="center_vertical"
                        android:paddingTop="10dp"
                        android:paddingBottom="10dp"
                        android:paddingEnd="25dp"
                        app:layout_constraintRight_toRightOf="parent"
                        app:layout_constraintTop_toTopOf="parent"
                        app:layout_constraintBottom_toBottomOf="@id/text_watch_later" />

                    <androidx.recyclerview.widget.RecyclerView
                        android:id="@+id/recycler_watch_later"
                        android:layout_width="match_parent"
                        android:layout_height="150dp"
                        app:layout_constraintTop_toBottomOf="@id/text_view_all"
                        app:layout_constraintLeft_toLeftOf="parent"
                        app:layout_constraintRight_toRightOf="parent"
                        android:orientation="horizontal" />

                </androidx.constraintlayout.widget.ConstraintLayout>

                <androidx.appcompat.widget.Toolbar
                    android:id="@+id/toolbar"
                    android:layout_width="match_parent"
                    android:layout_height="25dp"
                    android:minHeight="0dp"
                    app:contentInsetStart="0dp"
                    app:contentInsetEnd="0dp"
                    app:layout_collapseMode="pin"
                    android:layout_gravity="bottom">

                    <LinearLayout
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:gravity="center_vertical">

                        <TextView
                            android:id="@+id/text_playlists"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:textSize="16dp"
                            android:textColor="@color/white"
                            android:fontFamily="@font/inter_light"
                            android:text="@string/playlists"
                            android:paddingStart="15dp"
                            app:layout_constraintLeft_toLeftOf="parent"
                            app:layout_constraintTop_toBottomOf="@id/recycler_watch_later" />

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

                        <ImageButton
                            android:id="@+id/button_create_playlist"
                            android:layout_width="35dp"
                            android:layout_height="20dp"
                            android:contentDescription="@string/cd_button_create_playlist"
                            app:srcCompat="@drawable/ic_add_white_16dp"
                            android:paddingEnd="15dp"
                            android:paddingStart="15dp"
                            android:layout_marginEnd="12dp" />
                    </LinearLayout>

                </androidx.appcompat.widget.Toolbar>
            </com.google.android.material.appbar.CollapsingToolbarLayout>
        </com.google.android.material.appbar.AppBarLayout>

        <androidx.recyclerview.widget.RecyclerView
            android:id="@+id/recycler_playlists"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            app:layout_behavior="@string/appbar_scrolling_view_behavior"
            app:layout_constraintTop_toBottomOf="@id/text_view_all"
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintRight_toRightOf="parent"
            android:paddingTop="10dp"
            android:paddingStart="15dp"
            android:paddingEnd="15dp"
            android:paddingBottom="15dp" />
    </androidx.coordinatorlayout.widget.CoordinatorLayout>

    <FrameLayout
        android:id="@+id/overlay_create_playlist"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:visibility="gone" />
</FrameLayout>