<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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=".activivty.SetWallpaperActivity">

    <ImageView
        android:id="@+id/preview"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:scaleType="centerCrop" />

    <ImageView
        android:id="@+id/back"
        android:layout_width="40dp"
        android:layout_height="40dp"
        android:layout_marginStart="12dp"
        android:layout_marginTop="36dp"
        android:padding="8dp"
         android:background="@drawable/back_bg"
        android:src="@drawable/back"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginStart="25dp"
        android:layout_marginEnd="25dp"
        android:id="@+id/relayout"
        android:background="@drawable/set_wallpaper_shape"
        android:padding="20dp"
        app:layout_constraintBottom_toBottomOf="parent">

        <androidx.cardview.widget.CardView
            android:id="@+id/header_card"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            app:cardCornerRadius="8dp">

            <ImageView
                android:id="@+id/header"
                android:layout_width="33dp"
                android:layout_height="33dp"
                android:src="@mipmap/ic_launcher" />
        </androidx.cardview.widget.CardView>

        <TextView
            android:id="@+id/author_name"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignTop="@id/header_card"
            android:layout_alignBottom="@id/header_card"
            android:layout_marginStart="12dp"
            android:layout_toEndOf="@id/header_card"
            android:gravity="center"
            android:text="@string/app_name"
            android:textColor="@color/black"
            android:textSize="18sp"
            android:textStyle="bold" />

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_below="@id/header_card"
            android:layout_marginTop="10dp"
            android:orientation="horizontal">


            <ImageView
                android:id="@+id/im_download"
                android:layout_width="35dp"
                android:layout_height="45dp"
                android:layout_weight="1"
                android:paddingTop="10dp"
                android:paddingBottom="10dp"
                android:src="@drawable/icon_download" />

            <ImageView
                android:id="@+id/im_set_wallpaper"
                android:layout_width="35dp"
                android:layout_height="45dp"
                android:layout_weight="1"
                android:paddingTop="10dp"
                android:paddingBottom="10dp"
                android:src="@drawable/icon_set_wallapper" />

            <ImageView
                android:id="@+id/im_love"
                android:layout_width="35dp"
                android:layout_height="45dp"
                android:layout_weight="1"
                android:paddingTop="10dp"
                android:paddingBottom="10dp"
                android:src="@drawable/love_selector" />
        </LinearLayout>

    </RelativeLayout>

    <FrameLayout
        android:id="@+id/loading_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:visibility="gone"
        android:clickable="true"
        android:background="@color/set_loading_color">

        <ProgressBar
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:indeterminateTint="@color/white" />
    </FrameLayout>

</androidx.constraintlayout.widget.ConstraintLayout>