<?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">

    <androidx.core.widget.NestedScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <androidx.constraintlayout.widget.ConstraintLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <androidx.appcompat.widget.AppCompatImageView
                android:id="@+id/iv_top_bg"
                android:layout_width="match_parent"
                android:layout_height="0dp"
                android:src="@mipmap/ic_search_top_bg"
                app:layout_constraintDimensionRatio="h,1125:900"
                app:layout_constraintTop_toTopOf="parent" />

            <TextView
                android:id="@+id/tv_title"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="@dimen/dp_24"
                android:layout_marginTop="@dimen/dp_100"
                android:text="搜索招标商机"
                android:textColor="#000511"
                android:textSize="@dimen/sp_30"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent" />

            <TextView
                android:id="@+id/tv_desc"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="@dimen/dp_3"
                android:text="信息领航，商机在握"
                android:textColor="#72757E"
                android:textSize="@dimen/sp_14"
                app:layout_constraintStart_toStartOf="@id/tv_title"
                app:layout_constraintTop_toBottomOf="@id/tv_title" />

            <LinearLayout
                android:id="@+id/layout_search"
                android:layout_width="match_parent"
                android:layout_height="@dimen/dp_46"
                android:layout_marginStart="@dimen/dp_16"
                android:layout_marginTop="@dimen/dp_200"
                android:layout_marginEnd="@dimen/dp_16"
                android:background="@drawable/shape_search_edit_bg"
                android:gravity="center_vertical"
                android:orientation="horizontal"
                app:layout_constraintTop_toTopOf="parent">

                <androidx.appcompat.widget.AppCompatEditText
                    android:id="@+id/et_search"
                    android:layout_width="0dp"
                    android:layout_height="match_parent"
                    android:layout_marginStart="@dimen/dp_12"
                    android:layout_weight="1"
                    android:background="@null"
                    android:drawableStart="@mipmap/ic_search"
                    android:drawablePadding="@dimen/dp_8"
                    android:gravity="center_vertical"
                    android:hint="请搜索关键词"
                    android:lines="1"
                    android:singleLine="true"
                    android:textColor="@color/color_1a1a1a"
                    android:textColorHint="@color/color_bcbcbc"
                    android:textSize="@dimen/sp_15" />

                <androidx.appcompat.widget.AppCompatImageView
                    android:id="@+id/iv_clear_text"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="@dimen/dp_12"
                    android:layout_marginEnd="@dimen/dp_12"
                    android:src="@mipmap/ic_clear_text"
                    android:visibility="invisible" />

                <com.cheng.bole.widget.CommonShapeView
                    android:id="@+id/btn_search"
                    android:layout_width="@dimen/dp_60"
                    android:layout_height="@dimen/dp_34"
                    android:layout_marginEnd="@dimen/dp_6"
                    android:text="搜索"
                    android:textColor="@color/white"
                    android:textSize="@dimen/sp_15"
                    app:csb_cornerRadius="@dimen/dp_10"
                    app:csb_fillColor="@color/color_125ffe" />
            </LinearLayout>

            <com.lihang.ShadowLayout
                android:id="@+id/layout_history"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginStart="@dimen/dp_9"
                android:layout_marginTop="@dimen/dp_13"
                android:layout_marginEnd="@dimen/dp_9"
                app:hl_cornerRadius="@dimen/dp_10"
                android:visibility="gone"
                app:hl_layoutBackground="@color/white"
                app:hl_shadowColor="@color/color_shadow"
                app:hl_shadowLimit="@dimen/dp_7"
                app:layout_constraintTop_toBottomOf="@id/layout_search">

                <androidx.constraintlayout.widget.ConstraintLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:paddingStart="@dimen/dp_12"
                    android:paddingTop="@dimen/dp_16"
                    android:paddingEnd="@dimen/dp_12"
                    android:paddingBottom="@dimen/dp_16">

                    <TextView
                        android:id="@+id/tv_history_title"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:drawableStart="@mipmap/ic_search_history"
                        android:drawablePadding="@dimen/dp_4"
                        android:fontFamily="sans-serif-medium"
                        android:gravity="center"
                        android:text="历史搜索"
                        android:textColor="@color/color_1a1a1a"
                        android:textSize="@dimen/sp_16"
                        app:layout_constraintStart_toStartOf="parent"
                        app:layout_constraintTop_toTopOf="parent" />

                    <androidx.appcompat.widget.AppCompatImageView
                        android:id="@+id/iv_clear_history"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:src="@mipmap/ic_clear_history"
                        app:layout_constraintBottom_toBottomOf="@id/tv_history_title"
                        app:layout_constraintEnd_toEndOf="parent"
                        app:layout_constraintTop_toTopOf="@id/tv_history_title" />

                    <androidx.recyclerview.widget.RecyclerView
                        android:id="@+id/rv_history"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="@dimen/dp_6"
                        android:orientation="horizontal"
                        android:overScrollMode="never"
                        app:layoutManager="com.google.android.flexbox.FlexboxLayoutManager"
                        app:layout_constraintTop_toBottomOf="@id/tv_history_title"
                        tools:listitem="@layout/listitem_search_history" />

                </androidx.constraintlayout.widget.ConstraintLayout>
            </com.lihang.ShadowLayout>

            <com.lihang.ShadowLayout
                android:id="@+id/layout_recommend"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginStart="@dimen/dp_9"
                android:layout_marginEnd="@dimen/dp_9"
                app:hl_cornerRadius="@dimen/dp_10"
                app:hl_layoutBackground="@color/white"
                app:hl_shadowColor="@color/color_shadow"
                app:hl_shadowLimit="@dimen/dp_7"
                app:layout_goneMarginTop="@dimen/dp_13"
                app:layout_constraintTop_toBottomOf="@id/layout_history">

                <androidx.constraintlayout.widget.ConstraintLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:paddingStart="@dimen/dp_12"
                    android:paddingTop="@dimen/dp_16"
                    android:paddingEnd="@dimen/dp_12"
                    android:paddingBottom="@dimen/dp_16">

                    <TextView
                        android:id="@+id/tv_recommend_title"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:drawableStart="@mipmap/ic_search_recommend_keyword"
                        android:drawablePadding="@dimen/dp_4"
                        android:fontFamily="sans-serif-medium"
                        android:gravity="center"
                        android:text="搜索推荐"
                        android:textColor="@color/color_1a1a1a"
                        android:textSize="@dimen/sp_16"
                        app:layout_constraintStart_toStartOf="parent"
                        app:layout_constraintTop_toTopOf="parent" />

                    <androidx.appcompat.widget.AppCompatImageView
                        android:id="@+id/iv_refresh_recommend"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:src="@mipmap/ic_refresh2"
                        app:layout_constraintBottom_toBottomOf="@id/tv_recommend_title"
                        app:layout_constraintEnd_toEndOf="parent"
                        app:layout_constraintTop_toTopOf="@id/tv_recommend_title" />

                    <androidx.recyclerview.widget.RecyclerView
                        android:id="@+id/rv_recommend"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="@dimen/dp_6"
                        android:orientation="horizontal"
                        android:overScrollMode="never"
                        app:layoutManager="com.google.android.flexbox.FlexboxLayoutManager"
                        app:layout_constraintTop_toBottomOf="@id/tv_recommend_title"
                        tools:listitem="@layout/listitem_search_recommend" />
                </androidx.constraintlayout.widget.ConstraintLayout>
            </com.lihang.ShadowLayout>

            <com.lihang.ShadowLayout
                android:id="@+id/layout_hot"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginStart="@dimen/dp_9"
                android:layout_marginEnd="@dimen/dp_9"
                app:hl_cornerRadius="@dimen/dp_10"
                app:hl_layoutBackground="@color/white"
                app:hl_shadowColor="@color/color_shadow"
                app:hl_shadowLimit="@dimen/dp_7"
                app:layout_constraintTop_toBottomOf="@id/layout_recommend">

                <androidx.constraintlayout.widget.ConstraintLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:paddingStart="@dimen/dp_12"
                    android:paddingTop="@dimen/dp_16"
                    android:paddingEnd="@dimen/dp_12"
                    android:paddingBottom="@dimen/dp_16">

                    <TextView
                        android:id="@+id/tv_hot_title"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:drawableStart="@mipmap/ic_search_hot_type"
                        android:drawablePadding="@dimen/dp_4"
                        android:fontFamily="sans-serif-medium"
                        android:gravity="center"
                        android:text="热门类型"
                        android:textColor="@color/color_1a1a1a"
                        android:textSize="@dimen/sp_16"
                        app:layout_constraintStart_toStartOf="parent"
                        app:layout_constraintTop_toTopOf="parent" />

                    <androidx.recyclerview.widget.RecyclerView
                        android:id="@+id/rv_hot"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="@dimen/dp_6"
                        android:orientation="vertical"
                        android:overScrollMode="never"
                        app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
                        app:layout_constraintTop_toBottomOf="@id/tv_hot_title"
                        tools:listitem="@layout/listitem_search_hot_type" />

                </androidx.constraintlayout.widget.ConstraintLayout>
            </com.lihang.ShadowLayout>

        </androidx.constraintlayout.widget.ConstraintLayout>
    </androidx.core.widget.NestedScrollView>

    <com.example.base.widget.TitleBar
        android:id="@+id/mTitleBar"
        style="@style/Custom.TitleBar"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:navigationIcon="@drawable/ic_back_black"
        app:title=" " />

</androidx.constraintlayout.widget.ConstraintLayout>