<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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/main"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/white"
    android:orientation="vertical"
    tools:context=".photo.PhotoSortingActivity">

    <RelativeLayout
        android:id="@+id/layout_top"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@color/white"
        android:gravity="center_vertical"
        android:paddingBottom="9dp"
        app:layout_constraintTop_toTopOf="parent">

        <ImageView
            android:id="@+id/image_view_back"
            android:layout_width="wrap_content"
            android:layout_height="44dp"
            android:paddingHorizontal="13dp"
            android:paddingVertical="14dp"
            android:src="@drawable/black_return" />


        <com.ux.video.file.filerecovery.utils.CustomTextView
            android:id="@+id/tv_select_all"
            android:layout_width="wrap_content"
            android:layout_height="44dp"
            android:layout_alignParentEnd="true"
            android:gravity="center"
            android:paddingHorizontal="16dp"
            android:text="@string/select_all"
            android:textColor="@color/color_title_blue"
            android:textSize="16sp"
            app:fontType="bold"
            app:normal_text="@string/select_all"
            app:selected_text="@string/deselect_all"
            tools:ignore="RelativeOverlap" />

        <LinearLayout
            android:id="@+id/filter_date_layout"
            android:layout_width="wrap_content"
            android:layout_height="42dp"
            android:layout_below="@id/tv_select_all"
            android:layout_marginStart="16dp"
            android:gravity="center"
            android:orientation="horizontal">

            <com.ux.video.file.filerecovery.utils.CustomTextView
                android:id="@+id/title_date"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:ellipsize="end"
                android:maxWidth="85dp"
                android:maxLines="1"
                android:text="@string/date"
                android:textColor="@color/selector_black_blue"
                android:textSize="16sp"
                app:fontType="bold" />

            <ImageView
                android:layout_width="8dp"
                android:layout_height="4dp"
                android:layout_marginStart="8dp"
                android:src="@drawable/selector_arrow_up_down" />
        </LinearLayout>

        <LinearLayout
            android:id="@+id/filter_size_layout"
            android:layout_width="wrap_content"
            android:layout_height="42dp"
            android:layout_alignTop="@id/filter_date_layout"
            android:layout_marginStart="20dp"
            android:layout_toEndOf="@id/filter_date_layout"
            android:gravity="center"
            android:orientation="horizontal">

            <com.ux.video.file.filerecovery.utils.CustomTextView
                android:id="@+id/title_size"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:ellipsize="end"
                android:maxWidth="85dp"
                android:maxLines="1"
                android:text="@string/size"
                android:textColor="@color/selector_black_blue"
                android:textSize="16sp"
                app:fontType="bold" />

            <ImageView
                android:layout_width="8dp"
                android:layout_height="4dp"
                android:layout_marginStart="8dp"
                android:src="@drawable/selector_arrow_up_down" />
        </LinearLayout>

        <LinearLayout
            android:id="@+id/filter_layout_linearlayout"
            android:layout_width="wrap_content"
            android:layout_height="42dp"
            android:layout_alignTop="@id/filter_date_layout"
            android:layout_marginStart="20dp"
            android:layout_toEndOf="@id/filter_size_layout"
            android:gravity="center"
            android:orientation="horizontal">

            <com.ux.video.file.filerecovery.utils.CustomTextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/layout"
                android:textColor="@color/selector_black_blue"
                android:textSize="16sp"
                app:fontType="bold" />

            <ImageView
                android:layout_width="8dp"
                android:layout_height="4dp"
                android:layout_marginStart="8dp"
                android:src="@drawable/selector_arrow_up_down" />
        </LinearLayout>

        <ImageView
            android:id="@+id/im_sort"
            android:layout_width="47dp"
            android:layout_height="16dp"
            android:layout_alignTop="@id/filter_date_layout"
            android:layout_alignBottom="@id/filter_date_layout"
            android:layout_alignParentEnd="true"
            android:layout_marginEnd="8dp"
            android:paddingHorizontal="16dp"
            android:src="@drawable/icon_sort" />


        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:id="@+id/relative_thumbnails"
            android:layout_below="@id/filter_date_layout">

            <com.ux.video.file.filerecovery.utils.CustomTextView
                android:id="@+id/tv_thumbnail_counts"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="16dp"
                android:layout_marginTop="10dp"
                android:text="@string/hide_thumbnails"
                android:textColor="@color/main_title"
                android:textSize="16sp"
                app:fontType="bold" />

            <com.ux.video.file.filerecovery.utils.CustomTextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_below="@id/tv_thumbnail_counts"
                android:layout_alignStart="@id/tv_thumbnail_counts"
                android:layout_marginTop="8dp"
                android:text="@string/hide_thumbnails_describe"
                android:textColor="@color/main_sub_title"
                android:textSize="12sp" />

            <com.google.android.material.switchmaterial.SwitchMaterial
                android:id="@+id/switch_hide_thumbnails"
                android:layout_width="wrap_content"
                android:layout_height="16dp"
                android:layout_alignTop="@id/tv_thumbnail_counts"
                android:layout_alignParentEnd="true"
                android:layout_marginEnd="16dp"
                app:thumbTint="@color/selector_switch_thumb_color"
                app:trackTint="@color/selector_switch_track_color" />
        </RelativeLayout>

    </RelativeLayout>


    <androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/color_bg">

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

        <com.ux.video.file.filerecovery.utils.CustomTextView
            android:id="@+id/tv_delete"
            android:layout_width="0dp"
            android:layout_height="50dp"
            android:layout_marginStart="16dp"
            android:layout_marginBottom="16dp"
            android:background="@drawable/bg_rectangle_white_left_8"
            android:gravity="center"
            android:text="@string/delete"
            android:textColor="@color/selector_delete_button_enable"
            android:textSize="16sp"
            app:fontType="bold"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintHorizontal_weight="1"
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintRight_toLeftOf="@id/tv_recover" />

        <com.ux.video.file.filerecovery.utils.CustomTextView
            android:id="@+id/tv_recover"
            android:layout_width="0dp"
            android:layout_height="50dp"
            android:layout_marginEnd="16dp"
            android:layout_marginBottom="16dp"
            android:background="@drawable/selector_recover_button_enable"
            android:gravity="center"
            android:text="@string/recover"
            android:textColor="@color/white"
            android:textSize="16sp"
            app:fontType="bold"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintHorizontal_weight="1"
            app:layout_constraintLeft_toRightOf="@id/tv_delete"
            app:layout_constraintRight_toRightOf="parent" />


        <TextView
            android:id="@+id/tv_select_counts"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="20dp"
            android:layout_marginTop="20dp"
            android:text="@string/app_name"
            android:visibility="gone"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintLeft_toLeftOf="parent" />


        <RadioGroup
            android:id="@+id/rg_layout"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@id/tv_select_counts"
            android:orientation="horizontal"
            android:visibility="gone"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintLeft_toLeftOf="parent">

            <RadioButton
                android:id="@+id/rb_columns_2"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/columns_2" />

            <RadioButton
                android:id="@+id/rb_columns_3"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/columns_3" />

            <RadioButton
                android:id="@+id/rb_columns_4"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/columns_4" />

        </RadioGroup>

        <RadioGroup
            android:id="@+id/linear_size"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@id/rg_layout"
            android:orientation="horizontal"
            android:visibility="gone"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintLeft_toLeftOf="parent">

            <RadioButton
                android:id="@+id/btn_size_all"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="all size" />

            <RadioButton
                android:id="@+id/btn_size_1m"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="0-1m" />

            <RadioButton
                android:id="@+id/btn_size_5m"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="1-5m" />

            <RadioButton
                android:id="@+id/btn_size_over_5m"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="over 5m" />

        </RadioGroup>

        <!--    <RadioGroup-->
        <!--        android:id="@+id/linear_date"-->
        <!--        android:layout_width="wrap_content"-->
        <!--        android:layout_height="wrap_content"-->
        <!--        android:layout_below="@id/linear_size"-->
        <!--        android:orientation="horizontal">-->

        <!--        <RadioButton-->
        <!--            android:id="@+id/btn_date_all"-->
        <!--            android:layout_width="wrap_content"-->
        <!--            android:layout_height="wrap_content"-->
        <!--            android:text="all date" />-->

        <!--        <RadioButton-->
        <!--            android:id="@+id/btn_date_within_1"-->
        <!--            android:layout_width="wrap_content"-->
        <!--            android:layout_height="wrap_content"-->
        <!--            android:text="within 1 month" />-->

        <!--        <RadioButton-->
        <!--            android:id="@+id/btn_date_customize"-->
        <!--            android:layout_width="wrap_content"-->
        <!--            android:layout_height="wrap_content"-->
        <!--            android:text="customize" />-->

        <!--    </RadioGroup>-->


        <RadioGroup
            android:id="@+id/linear"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:visibility="gone"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintLeft_toLeftOf="parent">

            <RadioButton
                android:id="@+id/btn_date_old_to_new"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="old" />

            <RadioButton
                android:id="@+id/btn_date_new_to_old"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="new" />

            <RadioButton
                android:id="@+id/btn_size_small_to_big"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="small" />

            <RadioButton
                android:id="@+id/btn_size_big_to_small"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="big" />
        </RadioGroup>

    </androidx.constraintlayout.widget.ConstraintLayout>


</LinearLayout>