<?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:id="@+id/top_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="com.free.video.wallpaper.uipage.PageSetLive">

    <androidx.media3.ui.PlayerView
        android:id="@+id/player_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_gravity="center"
        android:background="@color/white"
        app:resize_mode="zoom"
        app:show_buffering="never"
        app:show_shuffle_button="false"
        app:show_subtitle_button="false"
        app:show_vr_button="false"
        app:use_controller="false">

        <RelativeLayout
            android:id="@+id/relative_loading"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="@color/color_white_80"
            android:clickable="true"
            android:focusable="true"
            android:visibility="visible">

            <LinearLayout
                android:id="@+id/horizontal_layout"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerInParent="true"
                android:gravity="center"
                android:orientation="vertical">

                <com.free.video.wallpaper.helper.MyText
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:gravity="center"
                    android:lineSpacingExtra="4dp"
                    android:text="@string/loading_wait"
                    android:textColor="@color/black"
                    android:textSize="16sp"
                    app:apply_font="true" />

                <ProgressBar
                    android:id="@+id/horizontal_progress"
                    style="?android:attr/progressBarStyleHorizontal"
                    android:layout_width="270dp"
                    android:layout_height="4dp"
                    android:layout_marginTop="10dp"
                    android:max="100"
                    android:progress="100"
                    android:progressDrawable="@drawable/bg_layer_list" />
            </LinearLayout>

            <ProgressBar
                android:id="@+id/normal_progress"
                android:layout_width="50dp"
                android:layout_height="50dp"
                android:layout_centerInParent="true"
                android:indeterminateTint="@color/white"
                android:visibility="visible" />


            <LinearLayout
                android:id="@+id/layout_retry"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerInParent="true"
                android:orientation="vertical"
                android:visibility="gone">

                <com.free.video.wallpaper.helper.MyText
                    android:id="@+id/tv_load_fail"
                    android:layout_width="260dp"
                    android:layout_height="wrap_content"
                    android:gravity="center"
                    android:lineSpacingExtra="4dp"
                    android:text="@string/load_fail_describe"
                    android:textColor="@color/black"
                    android:textSize="16sp"
                    app:apply_font="true" />

                <com.free.video.wallpaper.helper.MyText
                    android:id="@+id/tv_retry"
                    android:layout_width="120dp"
                    android:layout_height="40dp"
                    android:layout_gravity="center"
                    android:layout_marginTop="20dp"
                    android:background="@drawable/bg_shape_retry"
                    android:gravity="center"
                    android:text="@string/Retry"
                    android:textColor="@color/white"
                    android:textSize="17sp"
                    app:apply_font="true" />
            </LinearLayout>


        </RelativeLayout>
    </androidx.media3.ui.PlayerView>


    <androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="100dp"
        android:layout_alignParentBottom="true"
        android:layout_marginStart="20dp"
        android:layout_marginEnd="20dp"
        android:layout_marginBottom="10dp"
        android:paddingStart="10dp"
        android:paddingTop="8dp"
        android:paddingEnd="10dp">

        <com.free.video.wallpaper.helper.MyText
            android:id="@+id/tv_describe"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:padding="5dp"
            android:text="Eternal hues dance in the void's embrace 🎗️"
            android:textColor="@color/white"
            android:textSize="14sp"
            app:apply_font="true"
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintRight_toRightOf="parent"
            app:layout_constraintTop_toTopOf="parent" />


        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:gravity="center"
            android:orientation="horizontal"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintTop_toBottomOf="@id/tv_describe">

            <FrameLayout
                android:id="@+id/layout_set"
                android:layout_width="wrap_content"
                android:layout_height="37dp"
                android:background="@drawable/bg_rect_16"
                android:padding="6dp">

                <com.free.video.wallpaper.helper.MyText
                    android:id="@+id/i_favorite"
                    android:layout_width="120dp"
                    android:layout_height="25dp"
                    android:gravity="center"
                    android:text="@string/set"
                    android:textColor="@color/white"
                    android:textSize="17sp"
                    app:apply_font="true" />
            </FrameLayout>

            <FrameLayout
                android:id="@+id/like"
                android:layout_width="45dp"
                android:layout_height="45dp"
                android:layout_marginStart="9dp"
                android:layout_marginEnd="12dp"
                android:background="@drawable/bg_oval_alah">

                <ImageView
                    android:id="@+id/im_favorite"
                    android:layout_width="26dp"
                    android:layout_height="26dp"
                    android:layout_gravity="center"
                    android:src="@drawable/selector_favorite" />
            </FrameLayout>
        </LinearLayout>

    </androidx.constraintlayout.widget.ConstraintLayout>

    <FrameLayout
        android:id="@+id/layout_back"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="12dp"
        android:layout_marginTop="45dp"
        android:background="@drawable/bg_oval_alah"
        android:padding="11dp">

        <ImageView
            android:layout_width="20dp"
            android:layout_height="20dp"
            android:src="@drawable/im_white_back" />
    </FrameLayout>


</RelativeLayout>