pull/36/head
kunfei 5 years ago
parent 149dd41544
commit 39c8a1d06b
  1. 2
      app/src/main/java/io/legado/app/data/dao/BookDao.kt
  2. 6
      app/src/main/res/layout/activity_book_search.xml

@ -24,7 +24,7 @@ interface BookDao {
@Query("SELECT bookUrl FROM books WHERE `group` = :group")
fun observeUrlsByGroup(group: Int): LiveData<List<String>>
@Query("SELECT bookUrl FROM books WHERE name like '%' || :key || '%' or author like '%' || :key || '%'")
@Query("SELECT * FROM books WHERE name like '%'||:key||'%' or author like '%'||:key||'%'")
fun liveDataSearch(key: String): LiveData<List<Book>>
@Query("SELECT * FROM books WHERE `name` in (:names)")

@ -49,12 +49,14 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="6dp"
android:text="@string/bookshelf" />
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:layout_height="wrap_content"
android:visibility="gone" />
<TextView
android:id="@+id/tv_history"

Loading…
Cancel
Save