<?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:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".fragments.LibraryFragment">

    <RelativeLayout
        android:id="@+id/loginOrRegister"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <ImageView
            android:id="@+id/boogh"
            android:layout_width="100dp"
            android:layout_height="100dp"
            android:layout_centerInParent="true"
            android:layout_marginBottom="16dp"
            android:src="@drawable/ic_login" />

        <TextView
            android:id="@+id/text_like"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@id/boogh"
            android:layout_centerHorizontal="true"
            android:layout_marginHorizontal="10dp"
            android:gravity="center"
            android:text="@string/please_login"
            android:textSize="20sp"
            android:textStyle="bold" />
    </RelativeLayout>

    <com.github.libretube.views.CustomSwipeToRefresh
        android:id="@+id/playlist_refresh"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <ScrollView
            android:id="@+id/scrollview_playlist"
            android:layout_width="match_parent"
            android:layout_height="match_parent">

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

                <LinearLayout
                    android:id="@+id/showWatchHistory"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginBottom="10dp"
                    android:background="?attr/selectableItemBackground"
                    android:orientation="horizontal"
                    android:padding="10dp">

                    <ImageView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_gravity="center"
                        android:layout_marginStart="10dp"
                        android:src="@drawable/ic_time_outlined" />

                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginStart="15dp"
                        android:text="@string/watch_history"
                        android:textSize="18sp"
                        android:textStyle="bold" />

                </LinearLayout>

                <RelativeLayout
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:descendantFocusability="blocksDescendants">

                    <androidx.recyclerview.widget.RecyclerView
                        android:id="@+id/playlist_recView"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:nestedScrollingEnabled="false" />

                </RelativeLayout>
            </LinearLayout>
        </ScrollView>
    </com.github.libretube.views.CustomSwipeToRefresh>

    <com.google.android.material.floatingactionbutton.FloatingActionButton
        android:id="@+id/create_playlist"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom|end"
        android:layout_margin="16dp"
        app:backgroundTint="?attr/colorSecondary"
        app:srcCompat="@drawable/ic_add"
        app:tint="?android:attr/colorBackground" />

</FrameLayout>