aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/PasswordStore.kt5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/PasswordStore.kt b/app/src/main/java/com/zeapo/pwdstore/PasswordStore.kt
index 7495cff1..2a5343fd 100644
--- a/app/src/main/java/com/zeapo/pwdstore/PasswordStore.kt
+++ b/app/src/main/java/com/zeapo/pwdstore/PasswordStore.kt
@@ -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.
menuInflater.inflate(R.menu.main_menu, menu)
searchItem = menu.findItem(R.id.action_search)
@@ -167,6 +167,7 @@ class PasswordStore : AppCompatActivity() {
searchView.setOnQueryTextListener(
object : OnQueryTextListener {
override fun onQueryTextSubmit(s: String): Boolean {
+ filterListAdapter(s)
searchView.clearFocus()
return true
}
@@ -193,7 +194,7 @@ class PasswordStore : AppCompatActivity() {
if (settings.getBoolean("search_on_start", false)) {
searchItem.expandActionView()
}
- return super.onCreateOptionsMenu(menu)
+ return super.onPrepareOptionsMenu(menu)
}
// Handle action bar item clicks here. The action bar will