<?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:id="@+id/activity_pre"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".activity.PreviewActivity">

    <TextView
        android:id="@+id/pre_title"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="14dp"
        android:textColor="@color/text_color"
        android:textSize="20sp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <ImageView
        android:id="@+id/pre_back"
        android:layout_width="30dp"
        android:layout_height="30dp"
        android:layout_marginStart="12dp"
        android:src="@drawable/icon_back"
        app:layout_constraintBottom_toBottomOf="@id/pre_title"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="@id/pre_title" />

    <ImageView
        android:id="@+id/pre_like"
        android:layout_width="30dp"
        android:layout_height="30dp"
        android:layout_marginEnd="32dp"
        android:background="@drawable/icon_pre_like_uncheck"
        app:layout_constraintBottom_toBottomOf="@id/pre_title"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="@id/pre_title" />

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/pre_cons"
        android:layout_width="match_parent"
        android:layout_height="250dp"
        android:layout_marginStart="12dp"
        android:layout_marginTop="14dp"
        android:layout_marginEnd="12dp"
        app:layout_constraintTop_toBottomOf="@id/pre_title">

        <ProgressBar
            android:id="@+id/image_progress"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

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


    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/download"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginTop="16dp"
        android:layout_marginBottom="20dp"
        android:background="@drawable/download_background"
        android:paddingStart="16dp"
        android:paddingTop="10dp"
        android:paddingEnd="16dp"
        android:paddingBottom="10dp"
        app:layout_constraintEnd_toEndOf="@id/pre_cons"
        app:layout_constraintStart_toStartOf="@id/pre_cons"
        app:layout_constraintTop_toBottomOf="@id/pre_cons">

        <ProgressBar
            android:id="@+id/download_progress"
            android:layout_width="30dp"
            android:layout_height="30dp"
            android:layout_marginEnd="8dp"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toStartOf="@id/download_text"
            app:layout_constraintTop_toTopOf="parent" />

        <ImageView
            android:id="@+id/download_image"
            android:layout_width="30dp"
            android:layout_height="30dp"
            android:layout_marginEnd="8dp"
            android:background="@drawable/icon_download"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toStartOf="@id/download_text"
            app:layout_constraintTop_toTopOf="parent" />

        <TextView
            android:id="@+id/download_text"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="8dp"
            android:text="@string/down_text"
            android:textColor="@color/white"
            android:textSize="16sp"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />
    </androidx.constraintlayout.widget.ConstraintLayout>

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/text_more"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="24dp"
        android:paddingStart="12dp"
        android:paddingEnd="12dp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/download">

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:text="@string/text_more"
            android:textColor="@color/black"
            android:textSize="16sp"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <LinearLayout
            android:id="@+id/pre_all"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintTop_toTopOf="parent">

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/view_all"
                android:textColor="@color/text_color"
                android:textSize="12sp" />

            <ImageView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:layout_marginStart="2dp"
                android:background="@drawable/icon_viewall" />
        </LinearLayout>
    </androidx.constraintlayout.widget.ConstraintLayout>

    <androidx.recyclerview.widget.RecyclerView
        android:id="@+id/pre_rv"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_marginTop="12dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintTop_toBottomOf="@id/text_more" />

</androidx.constraintlayout.widget.ConstraintLayout>