<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto">

    <data>

        <variable
            name="viewModel"
            type="com.hongyegroup.cpt_rewards.mvvm.RewardsListViewModel" />

    </data>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/white"
        android:orientation="vertical">

        <com.guadou.lib_baselib.view.titlebar.EasyTitleBar
            android:id="@+id/easy_title_rewards"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:Easy_title="Recommend" />

        <LinearLayout
            android:id="@+id/ll_rewards_recommend_sort"
            android:layout_width="match_parent"
            android:layout_height="@dimen/d_40dp"
            android:background="@color/food_gray_f7">

            <!--All-->
            <LinearLayout
                android:id="@+id/ll_rewards_recommend_all"
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:gravity="center_vertical"
                android:orientation="horizontal">

                <ImageView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="@dimen/d_20dp"
                    android:src="@drawable/iv_rewards_recommend_all_icon" />

                <com.guadou.lib_baselib.font_text_view.TextViewLight
                    android:id="@+id/tv_rewards_recommend_all"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="@dimen/d_10dp"
                    android:layout_weight="1"
                    android:text="All"
                    android:textColor="@color/black"
                    android:textSize="@dimen/d_16sp" />

                <ImageView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginRight="@dimen/d_20dp"
                    android:src="@drawable/iv_rewards_arrow_bottom" />

            </LinearLayout>

            <ImageView
                android:layout_width="@dimen/d_1dp"
                android:layout_height="match_parent"
                android:src="@color/page_bg" />

            <!--Popularity-->
            <LinearLayout
                android:id="@+id/ll_rewards_recommend_sort_by"
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:gravity="center_vertical"
                android:orientation="horizontal">

                <ImageView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="@dimen/d_20dp"
                    android:src="@drawable/iv_rewards_recommend_popularity_icon" />

                <com.guadou.lib_baselib.font_text_view.TextViewLight
                    android:id="@+id/tv_rewards_recommend_sort_by"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="@dimen/d_10dp"
                    android:layout_weight="1"
                    android:ellipsize="end"
                    android:singleLine="true"
                    android:text="Popularity"
                    android:textColor="@color/black"
                    android:textSize="@dimen/d_16sp" />

                <ImageView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginRight="@dimen/d_20dp"
                    android:src="@drawable/iv_rewards_arrow_bottom" />

            </LinearLayout>

        </LinearLayout>

        <com.scwang.smart.refresh.layout.SmartRefreshLayout
            android:id="@+id/refresh_layout_rewards_recommend"
            android:layout_width="match_parent"
            android:layout_height="match_parent">

            <com.scwang.smart.refresh.header.ClassicsHeader
                android:layout_width="match_parent"
                android:layout_height="wrap_content" />

            <androidx.recyclerview.widget.RecyclerView
                android:id="@+id/recycler_view_rewards_list"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_marginTop="@dimen/d_10dp" />

        </com.scwang.smart.refresh.layout.SmartRefreshLayout>

    </LinearLayout>

</layout>