pull/32/head
kunfei 5 years ago
parent ea8ae6aa96
commit cd01963530
  1. 13
      app/src/main/java/io/legado/app/ui/main/bookshelf/BookshelfFragment.kt

@ -3,6 +3,7 @@ package io.legado.app.ui.main.bookshelf
import android.os.Bundle
import android.view.Menu
import android.view.View
import androidx.appcompat.widget.SearchView
import androidx.lifecycle.LiveData
import androidx.lifecycle.Observer
import androidx.paging.LivePagedListBuilder
@ -26,7 +27,8 @@ import kotlinx.coroutines.launch
import org.jetbrains.anko.startActivity
import org.jetbrains.anko.textColor
class BookshelfFragment : BaseFragment(R.layout.fragment_bookshelf), BookGroupAdapter.CallBack {
class BookshelfFragment : BaseFragment(R.layout.fragment_bookshelf), SearchView.OnQueryTextListener,
BookGroupAdapter.CallBack {
private lateinit var bookshelfAdapter: BookshelfAdapter
private lateinit var bookGroupAdapter: BookGroupAdapter
@ -51,6 +53,7 @@ class BookshelfFragment : BaseFragment(R.layout.fragment_bookshelf), BookGroupAd
search_view.isSubmitButtonEnabled = true
search_view.queryHint = getString(R.string.search_book_key)
search_view.clearFocus()
search_view.setOnQueryTextListener(this)
}
private fun initRecyclerView() {
@ -106,4 +109,12 @@ class BookshelfFragment : BaseFragment(R.layout.fragment_bookshelf), BookGroupAd
}
}
override fun onQueryTextSubmit(query: String?): Boolean {
return false
}
override fun onQueryTextChange(newText: String?): Boolean {
return false
}
}
Loading…
Cancel
Save