diff --git a/app/src/main/java/io/legado/app/ui/search/SearchActivity.kt b/app/src/main/java/io/legado/app/ui/search/SearchActivity.kt index 1e3db77c5..d504f8724 100644 --- a/app/src/main/java/io/legado/app/ui/search/SearchActivity.kt +++ b/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(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()