<?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"
    tools:context=".ui.book.search.SearchActivity">

    <io.legado.app.ui.widget.TitleBar
        android:id="@+id/title_bar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:contentInsetStartWithNavigation="0dp"
        app:contentLayout="@layout/view_search"
        app:layout_constraintTop_toTopOf="parent"
        app:title="搜索" />

    <io.legado.app.ui.widget.anima.RefreshProgressBar
        android:id="@+id/refresh_progress_bar"
        android:layout_width="match_parent"
        android:layout_height="2dp"
        app:layout_constraintTop_toBottomOf="@id/title_bar" />

    <io.legado.app.ui.widget.dynamiclayout.DynamicFrameLayout
        android:id="@+id/content_view"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintTop_toBottomOf="@id/refresh_progress_bar">

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

    </io.legado.app.ui.widget.dynamiclayout.DynamicFrameLayout>

    <LinearLayout
        android:id="@+id/ll_history"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:background="@color/background"
        android:clickable="true"
        android:focusable="true"
        android:orientation="vertical"
        android:visibility="gone"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintTop_toBottomOf="@id/title_bar">

        <TextView
            android:id="@+id/tv_book_show"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:padding="6dp"
            android:text="@string/bookshelf"
            android:visibility="gone" />

        <androidx.recyclerview.widget.RecyclerView
            android:id="@+id/rv_bookshelf_search"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:visibility="gone" />

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal">

            <TextView
                android:id="@+id/tv_history"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:padding="6dp"
                android:text="@string/searchHistory" />

            <TextView
                android:id="@+id/tv_clear_history"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:padding="6dp"
                android:text="@string/clear" />

        </LinearLayout>

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

    </LinearLayout>

    <com.google.android.material.floatingactionbutton.FloatingActionButton
        android:id="@+id/fb_stop"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="16dp"
        android:src="@drawable/ic_stop_black_24dp"
        android:visibility="invisible"
        app:fabSize="mini"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintRight_toRightOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>

