Workaround and potential fix for search issues (#677)
This commit is contained in:
parent
29427a061b
commit
6aed471f31
1 changed files with 3 additions and 2 deletions
|
@ -159,7 +159,7 @@ class PasswordStore : AppCompatActivity() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onCreateOptionsMenu(menu: Menu): Boolean {
|
override fun onPrepareOptionsMenu(menu: Menu): Boolean {
|
||||||
// Inflate the menu; this adds items to the action bar if it is present.
|
// Inflate the menu; this adds items to the action bar if it is present.
|
||||||
menuInflater.inflate(R.menu.main_menu, menu)
|
menuInflater.inflate(R.menu.main_menu, menu)
|
||||||
searchItem = menu.findItem(R.id.action_search)
|
searchItem = menu.findItem(R.id.action_search)
|
||||||
|
@ -167,6 +167,7 @@ class PasswordStore : AppCompatActivity() {
|
||||||
searchView.setOnQueryTextListener(
|
searchView.setOnQueryTextListener(
|
||||||
object : OnQueryTextListener {
|
object : OnQueryTextListener {
|
||||||
override fun onQueryTextSubmit(s: String): Boolean {
|
override fun onQueryTextSubmit(s: String): Boolean {
|
||||||
|
filterListAdapter(s)
|
||||||
searchView.clearFocus()
|
searchView.clearFocus()
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
@ -193,7 +194,7 @@ class PasswordStore : AppCompatActivity() {
|
||||||
if (settings.getBoolean("search_on_start", false)) {
|
if (settings.getBoolean("search_on_start", false)) {
|
||||||
searchItem.expandActionView()
|
searchItem.expandActionView()
|
||||||
}
|
}
|
||||||
return super.onCreateOptionsMenu(menu)
|
return super.onPrepareOptionsMenu(menu)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle action bar item clicks here. The action bar will
|
// Handle action bar item clicks here. The action bar will
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue