|
|
@@ -1,214 +0,0 @@
|
|
|
-<?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">
|
|
|
-
|
|
|
- <androidx.coordinatorlayout.widget.CoordinatorLayout
|
|
|
- android:layout_width="match_parent"
|
|
|
- android:layout_height="match_parent">
|
|
|
-
|
|
|
- <com.google.android.material.appbar.AppBarLayout
|
|
|
- android:id="@+id/app_bar"
|
|
|
- android:layout_width="match_parent"
|
|
|
- android:layout_height="wrap_content"
|
|
|
- app:liftOnScroll="false"
|
|
|
- android:fitsSystemWindows="true"
|
|
|
- app:statusBarForeground="?attr/colorSurface">
|
|
|
-
|
|
|
- <com.google.android.material.search.SearchBar
|
|
|
- android:id="@+id/search_bar"
|
|
|
- android:layout_width="match_parent"
|
|
|
- android:layout_height="wrap_content"
|
|
|
- android:hint="@string/search_book_key"
|
|
|
- app:menu="@menu/book_search"
|
|
|
- app:navigationIcon="@drawable/ic_arrow_back"
|
|
|
- app:navigationIconTint="?attr/colorOnSurface" />
|
|
|
-
|
|
|
- <com.google.android.material.progressindicator.LinearProgressIndicator
|
|
|
- android:id="@+id/refresh_progress_bar"
|
|
|
- android:layout_width="match_parent"
|
|
|
- android:layout_height="wrap_content"
|
|
|
- android:visibility="invisible"
|
|
|
- app:waveAmplitude="2dp"
|
|
|
- app:waveSpeed="50dp"
|
|
|
- app:wavelength="40dp" />
|
|
|
-
|
|
|
- <com.google.android.material.card.MaterialCardView
|
|
|
- android:id="@+id/cd_progress"
|
|
|
- android:layout_width="wrap_content"
|
|
|
- android:layout_height="wrap_content"
|
|
|
- android:layout_alignParentStart="true"
|
|
|
- android:layout_centerVertical="true"
|
|
|
- android:layout_marginHorizontal="16dp"
|
|
|
- android:layout_marginVertical="4dp"
|
|
|
- android:scaleType="centerCrop"
|
|
|
- android:visibility="invisible"
|
|
|
- app:cardBackgroundColor="?attr/colorTertiaryContainer"
|
|
|
- app:cardCornerRadius="4dp"
|
|
|
- app:strokeWidth="0dp">
|
|
|
-
|
|
|
- <TextView
|
|
|
- android:id="@+id/tv_progress"
|
|
|
- android:layout_width="wrap_content"
|
|
|
- android:layout_height="wrap_content"
|
|
|
- android:paddingHorizontal="4dp"
|
|
|
- android:paddingVertical="2dp"
|
|
|
- android:text="@string/progress"
|
|
|
- android:textColor="?attr/colorOnTertiaryContainer"
|
|
|
- android:textSize="10sp"
|
|
|
- android:textStyle="bold"
|
|
|
- tools:ignore="SmallSp" />
|
|
|
-
|
|
|
- </com.google.android.material.card.MaterialCardView>
|
|
|
- </com.google.android.material.appbar.AppBarLayout>
|
|
|
-
|
|
|
- <io.legado.app.ui.widget.EmptyMessageView
|
|
|
- android:id="@+id/tv_empty_msg"
|
|
|
- android:layout_width="wrap_content"
|
|
|
- android:layout_height="wrap_content"
|
|
|
- app:messageText="@string/search_empty"
|
|
|
- android:layout_gravity="center"
|
|
|
- android:gravity="center"
|
|
|
- android:orientation="vertical"
|
|
|
- android:visibility="visible"/>
|
|
|
-
|
|
|
- <androidx.recyclerview.widget.RecyclerView
|
|
|
- android:id="@+id/recycler_view"
|
|
|
- android:layout_width="match_parent"
|
|
|
- android:layout_height="match_parent"
|
|
|
- android:clipToPadding="false"
|
|
|
- tools:listitem="@layout/item_search"
|
|
|
- app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior"/>
|
|
|
-
|
|
|
- <LinearLayout
|
|
|
- android:id="@+id/ll_stop"
|
|
|
- android:layout_width="match_parent"
|
|
|
- android:layout_height="wrap_content"
|
|
|
- android:layout_gravity="bottom"
|
|
|
- android:gravity="end"
|
|
|
- android:orientation="horizontal">
|
|
|
-
|
|
|
- <com.google.android.material.floatingactionbutton.FloatingActionButton
|
|
|
- android:id="@+id/fb_start_stop"
|
|
|
- android:layout_width="wrap_content"
|
|
|
- android:layout_height="wrap_content"
|
|
|
- android:layout_margin="16dp"
|
|
|
- app:tint="?attr/colorOnTertiaryContainer"
|
|
|
- app:backgroundTint="?attr/colorTertiaryContainer"
|
|
|
- android:contentDescription="@string/stop"
|
|
|
- android:src="@drawable/ic_stop_black_24dp"
|
|
|
- android:visibility="invisible" />
|
|
|
- </LinearLayout>
|
|
|
-
|
|
|
- </androidx.coordinatorlayout.widget.CoordinatorLayout>
|
|
|
-
|
|
|
- <com.google.android.material.search.SearchView
|
|
|
- android:id="@+id/search_view"
|
|
|
- android:layout_width="match_parent"
|
|
|
- android:layout_height="match_parent"
|
|
|
- app:menu="@menu/book_search"
|
|
|
- app:layout_constraintBottom_toBottomOf="parent"
|
|
|
- app:layout_constraintEnd_toEndOf="parent"
|
|
|
- app:layout_constraintStart_toStartOf="parent"
|
|
|
- app:layout_constraintTop_toTopOf="parent">
|
|
|
-
|
|
|
- <LinearLayout
|
|
|
- android:id="@+id/ll_input_help"
|
|
|
- android:layout_width="match_parent"
|
|
|
- android:layout_height="match_parent"
|
|
|
- android:clickable="true"
|
|
|
- android:focusable="true"
|
|
|
- android:orientation="vertical"
|
|
|
- android:visibility="visible">
|
|
|
-
|
|
|
- <com.google.android.material.chip.ChipGroup
|
|
|
- android:layout_width="match_parent"
|
|
|
- android:layout_height="wrap_content"
|
|
|
- app:chipSpacingVertical="0dp"
|
|
|
- android:layout_marginTop="8dp"
|
|
|
- android:layout_marginHorizontal="16dp">
|
|
|
- <com.google.android.material.chip.Chip
|
|
|
- android:id="@+id/chip_precision_search"
|
|
|
- android:layout_width="wrap_content"
|
|
|
- android:layout_height="wrap_content"
|
|
|
- android:checkable="true"
|
|
|
- android:text="@string/precision_search"/>
|
|
|
- <com.google.android.material.chip.Chip
|
|
|
- android:id="@+id/chip_search_scope"
|
|
|
- android:layout_width="wrap_content"
|
|
|
- android:layout_height="wrap_content"
|
|
|
- android:text="@string/all_source"/>
|
|
|
- <com.google.android.material.chip.Chip
|
|
|
- android:id="@+id/chip_group"
|
|
|
- android:layout_width="wrap_content"
|
|
|
- android:layout_height="wrap_content"
|
|
|
- android:visibility="gone"
|
|
|
- android:checkable="true"
|
|
|
- android:text="@string/search_select_group"/>
|
|
|
- </com.google.android.material.chip.ChipGroup>
|
|
|
-
|
|
|
- <TextView
|
|
|
- android:id="@+id/tv_book_show"
|
|
|
- android:layout_width="match_parent"
|
|
|
- android:layout_height="wrap_content"
|
|
|
- android:paddingHorizontal="16dp"
|
|
|
- android:paddingVertical="16dp"
|
|
|
- android:text="@string/bookshelf"
|
|
|
- android:textSize="16sp"
|
|
|
- android:textStyle="bold"
|
|
|
- android:visibility="visible" />
|
|
|
-
|
|
|
- <androidx.recyclerview.widget.RecyclerView
|
|
|
- android:id="@+id/rv_bookshelf_search"
|
|
|
- android:layout_width="match_parent"
|
|
|
- android:layout_height="wrap_content"
|
|
|
- android:visibility="visible" />
|
|
|
-
|
|
|
- <LinearLayout
|
|
|
- android:layout_width="match_parent"
|
|
|
- android:layout_height="wrap_content"
|
|
|
- android:orientation="horizontal"
|
|
|
- android:paddingHorizontal="16dp">
|
|
|
-
|
|
|
- <TextView
|
|
|
- android:id="@+id/tv_history"
|
|
|
- android:layout_width="wrap_content"
|
|
|
- android:layout_height="wrap_content"
|
|
|
- android:layout_gravity="center_vertical"
|
|
|
- android:text="@string/searchHistory"
|
|
|
- android:textSize="16sp"
|
|
|
- android:textStyle="bold" />
|
|
|
-
|
|
|
- <View
|
|
|
- android:layout_width="0dp"
|
|
|
- android:layout_height="match_parent"
|
|
|
- android:layout_weight="1" />
|
|
|
-
|
|
|
- <com.google.android.material.button.MaterialButton
|
|
|
- android:id="@+id/tv_clear_history"
|
|
|
- style="@style/Widget.Material3Expressive.Button"
|
|
|
- android:text="@string/delete_all"
|
|
|
- app:backgroundTint="?attr/colorSecondaryContainer"
|
|
|
- app:iconTint="?attr/colorOnSecondaryContainer"
|
|
|
- android:textColor="?attr/colorOnSecondaryContainer"
|
|
|
- android:layout_width="wrap_content"
|
|
|
- android:layout_height="wrap_content"
|
|
|
- app:icon="@drawable/ic_clear_all"
|
|
|
- app:strokeColor="?attr/colorSecondaryContainer"
|
|
|
- app:iconGravity="textStart" />
|
|
|
-
|
|
|
- </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.search.SearchView>
|
|
|
-
|
|
|
-</androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
-
|