pull/32/head
kunfei 5 years ago
parent 726f584d88
commit 510afe272b
  1. 2
      app/src/main/java/io/legado/app/ui/search/SearchActivity.kt

@ -14,6 +14,7 @@ import io.legado.app.base.VMBaseActivity
import io.legado.app.data.entities.SearchBook
import io.legado.app.lib.theme.ATH
import io.legado.app.utils.getViewModel
import io.legado.app.utils.hideSoftInput
import kotlinx.android.synthetic.main.activity_search.*
import kotlinx.android.synthetic.main.view_title_bar.*
@ -39,6 +40,7 @@ class SearchActivity : VMBaseActivity<SearchViewModel>(R.layout.activity_search)
search_view.clearFocus()
search_view.setOnQueryTextListener(object : SearchView.OnQueryTextListener {
override fun onQueryTextSubmit(query: String?): Boolean {
search_view.hideSoftInput()
query?.let {
viewModel.search(it, { startTime ->
content_view.showContentView()

Loading…
Cancel
Save