<?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"
    tools:context=".ui.ActivitySet">

<!--    <HorizontalScrollView-->
<!--        android:layout_width="match_parent"-->
<!--        android:layout_height="match_parent">-->

        <ImageView
            android:id="@+id/imageview_preview"
            android:layout_width="match_parent"
            android:layout_height="match_parent" />
<!--    </HorizontalScrollView>-->

    <ImageView
        android:id="@+id/imageview_back"
        android:layout_width="55dp"
        android:layout_height="55dp"
        android:layout_gravity="center"
        android:layout_marginTop="30dp"
        android:padding="16dp"
        android:src="@drawable/icon_back" />

    <ProgressBar
        android:id="@+id/progressbar"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerInParent="true"
        android:indeterminateTint="@color/color_main"
        android:visibility="gone" />


    <androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_centerHorizontal="true"
        android:layout_marginStart="32dp"
        android:layout_marginEnd="32dp"
        android:layout_marginBottom="50dp"
        android:background="@drawable/author_bg"
        android:padding="12dp">

        <RelativeLayout
            android:id="@+id/layout_author"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:gravity="center_vertical"
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintRight_toLeftOf="@id/layout_set"
            app:layout_constraintTop_toTopOf="parent">

            <ImageView
                android:id="@+id/image_header"
                android:layout_width="45dp"
                android:layout_height="45dp"
                android:layout_centerVertical="true" />

            <LinearLayout
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerVertical="true"
                android:layout_marginStart="15dp"
                android:layout_marginEnd="10dp"
                android:layout_toEndOf="@id/image_header"
                android:orientation="vertical">

                <com.hd.wallpaper.free.walls.utils.CustomerTv
                    android:id="@+id/text_name"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="@string/app_name"
                    app:apply_font="true"
                    android:textColor="@color/black"
                    android:textSize="15sp" />


                <TextView
                    android:id="@+id/text_html"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="@string/app_name"
                    android:textColor="@color/sub_title_color"
                    android:textSize="13sp"
                    android:visibility="gone" />
            </LinearLayout>
        </RelativeLayout>


        <RelativeLayout
            android:id="@+id/layout_set"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            app:layout_constraintBottom_toBottomOf="@id/layout_download"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintTop_toTopOf="@id/layout_author">

            <com.google.android.material.floatingactionbutton.FloatingActionButton
                android:id="@+id/button_set"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:backgroundTint="@color/color_7d67ec"
                android:contentDescription="@string/app_name"
                android:src="@mipmap/set_wallpaper"
                app:shapeAppearance="@style/ShapeAppearanceOverlay.Material3.Button"
                app:tint="@null" />

            <ProgressBar
                android:id="@+id/pb_set"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignTop="@id/button_set"
                android:layout_alignBottom="@id/button_set"
                android:indeterminateDrawable="@drawable/loading_pb"
                android:visibility="gone" />
        </RelativeLayout>


        <RelativeLayout
            android:id="@+id/layout_download"
            android:layout_width="0dp"
            android:layout_height="40dp"
            android:paddingTop="10dp"
            android:paddingBottom="10dp"
            app:layout_constraintLeft_toLeftOf="@id/layout_author"
            app:layout_constraintRight_toLeftOf="@id/image_favorite"
            app:layout_constraintTop_toBottomOf="@id/layout_author">

            <ImageView
                android:id="@+id/image_download"
                android:layout_width="24dp"
                android:layout_height="24dp"
                android:layout_centerInParent="true"
                android:src="@drawable/im_download" />

            <ProgressBar
                android:id="@+id/pb_download"
                android:layout_width="24dp"
                android:layout_height="24dp"
                android:layout_centerInParent="true"
                android:indeterminateTint="@color/black"
                android:visibility="gone" />
        </RelativeLayout>


        <ImageView
            android:id="@+id/image_favorite"
            android:layout_width="0dp"
            android:layout_height="40dp"
            android:layout_alignParentEnd="true"
            android:paddingTop="10dp"
            android:paddingBottom="10dp"
            android:src="@drawable/selector_favorite"
            app:layout_constraintLeft_toRightOf="@id/layout_download"
            app:layout_constraintRight_toRightOf="@id/layout_author"
            app:layout_constraintTop_toTopOf="@id/layout_download" />

    </androidx.constraintlayout.widget.ConstraintLayout>

   <FrameLayout
       android:id="@+id/loading"
       android:layout_width="match_parent"
       android:layout_below="@id/imageview_back"
       android:background="@color/view_color"
       android:focusable="true"
       android:clickable="true"
       android:visibility="gone"
       android:layout_height="match_parent">
       <ProgressBar
           android:layout_width="wrap_content"
           android:layout_height="wrap_content"
           android:layout_gravity="center"
           android:indeterminateDrawable="@drawable/loading_pb" />
   </FrameLayout>

</RelativeLayout>