mirror of
https://github.com/android-password-store/Android-Password-Store
synced 2025-08-30 22:05:19 +00:00
Don't inflate menu multiple times (#678)
Otherwise you get this insanity https://i.imgur.com/N918NFG.png Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
@@ -159,9 +159,13 @@ class PasswordStore : AppCompatActivity() {
|
||||
}
|
||||
}
|
||||
|
||||
override fun onCreateOptionsMenu(menu: Menu?): Boolean {
|
||||
menuInflater.inflate(R.menu.main_menu, menu)
|
||||
return super.onCreateOptionsMenu(menu)
|
||||
}
|
||||
|
||||
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)
|
||||
searchView = searchItem.actionView as SearchView
|
||||
searchView.setOnQueryTextListener(
|
||||
|
Reference in New Issue
Block a user