<?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"
    xmlns:tool="http://schemas.android.com/tools">

    <data>

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

    </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.StatusbarGrayView
            android:id="@+id/status_bar_view_rewards_search"
            android:layout_width="match_parent"
            android:layout_height="1dp" />

        <LinearLayout
            android:id="@+id/toolbar"
            android:layout_width="match_parent"
            android:layout_height="@dimen/d_48dp"
            android:background="@color/white"
            android:gravity="center_vertical"
            android:orientation="horizontal">

            <ImageView
                android:id="@+id/iv_back"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="left|center_vertical"
                android:layout_marginLeft="@dimen/d_10dp"
                android:padding="@dimen/d_8dp"
                android:src="@drawable/back_blue"
                android:visibility="visible" />

            <FrameLayout
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_marginLeft="@dimen/dp_10"
                android:layout_marginRight="@dimen/d_10dp"
                android:layout_weight="1">

                <LinearLayout
                    android:id="@+id/ll_title_search"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center_vertical"
                    android:layout_marginLeft="@dimen/d_5dp"
                    android:layout_marginRight="@dimen/d_5dp"
                    android:layout_marginBottom="@dimen/d_2dp"
                    android:background="@drawable/search_bg"
                    android:focusable="true"
                    android:focusableInTouchMode="true"
                    android:orientation="horizontal"
                    android:paddingTop="@dimen/d_2dp"
                    android:paddingBottom="@dimen/d_2dp"
                    android:visibility="visible">

                    <ImageView
                        android:id="@+id/iv_title_search"
                        android:layout_width="@dimen/d_16dp"
                        android:layout_height="@dimen/d_16dp"
                        android:layout_gravity="center_vertical"
                        android:layout_marginStart="@dimen/d_10dp"
                        android:layout_marginLeft="@dimen/d_10dp"
                        android:clickable="true"
                        android:src="@drawable/search" />

                    <EditText
                        android:id="@+id/et_search_content"
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_gravity="center_vertical"
                        android:layout_marginStart="@dimen/d_5dp"
                        android:layout_marginLeft="@dimen/d_5dp"
                        android:layout_weight="1"
                        android:background="@null"
                        android:enabled="true"
                        android:hint="Search"
                        android:imeOptions="actionSearch"
                        android:padding="@dimen/d_3dp"
                        android:singleLine="true"
                        android:textColor="@color/gray_text"
                        android:textSize="@dimen/d_15sp" />

                    <ImageView
                        android:id="@+id/iv_search_delete"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_gravity="center_vertical"
                        android:layout_marginRight="@dimen/d_10dp"
                        android:clickable="false"
                        android:enabled="false"
                        android:padding="@dimen/d_5dp"
                        android:src="@drawable/search_delete"
                        android:visibility="gone" />

                </LinearLayout>

            </FrameLayout>

        </LinearLayout>

        <ImageView
            android:layout_width="match_parent"
            android:layout_height="0.5dp"
            android:src="@color/divider_color" />

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


            <com.guadou.lib_baselib.font_text_view.TextViewMedium
                android:id="@+id/tv_rewards_search_recent_search"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="@color/white"
                android:paddingLeft="@dimen/d_15dp"
                android:paddingTop="@dimen/d_15dp"
                android:text="Recent Search"
                android:textColor="@color/gray_text"
                android:textSize="@dimen/d_16sp"
                android:visibility="gone" />

            <!--流式布局-->
            <com.guadou.ninegrid.flownine.FlowLayout
                android:id="@+id/flow_layout_rewards_search_recent_search"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="@color/white"
                android:paddingLeft="@dimen/d_15dp"
                android:paddingTop="@dimen/d_13dp"
                android:paddingRight="@dimen/d_15dp"
                android:visibility="gone"
                app:itemSpacing="7dp"
                app:lineSpacing="@dimen/d_5dp">

            </com.guadou.ninegrid.flownine.FlowLayout>

            <com.guadou.lib_baselib.font_text_view.TextViewMedium
                android:id="@+id/tv_promotion_search_trending_search"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="@color/white"
                android:paddingLeft="@dimen/d_15dp"
                android:paddingTop="@dimen/d_15dp"
                android:text="Trending Searches"
                android:textColor="@color/gray_text"
                android:textSize="@dimen/d_16sp"
                android:visibility="gone" />

            <!--流式布局-->
            <com.guadou.ninegrid.flownine.FlowLayout
                android:id="@+id/flow_layout_rewards_search_trending_searches"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="@color/white"
                android:paddingLeft="@dimen/d_15dp"
                android:paddingTop="@dimen/d_13dp"
                android:paddingRight="@dimen/d_15dp"
                android:visibility="gone"
                app:itemSpacing="7dp"
                app:lineSpacing="@dimen/d_5dp">

            </com.guadou.ninegrid.flownine.FlowLayout>

            <LinearLayout
                android:id="@+id/ll_promotion_rewards_search_recent_viewed"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:orientation="vertical">

                <com.guadou.lib_baselib.font_text_view.TextViewBold
                    android:id="@+id/tv_rewards_search_recent_view"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:background="@color/white"
                    android:paddingLeft="@dimen/d_15dp"
                    android:paddingTop="@dimen/d_15dp"
                    android:paddingBottom="10dp"
                    android:text="最近浏览过的"
                    android:textColor="@color/gray_text"
                    android:textSize="@dimen/d_16sp"
                    android:visibility="visible" />

                <ImageView
                    android:layout_width="match_parent"
                    android:layout_height="0.5dp"
                    android:src="@color/divider_color"
                    android:visibility="visible" />

                <androidx.recyclerview.widget.RecyclerView
                    android:id="@+id/recycler_view_rewards_search"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:background="@color/white"
                    android:overScrollMode="never"
                    android:visibility="visible" />

            </LinearLayout>

        </LinearLayout>


    </LinearLayout>

</layout>