Skip to content

Commit

Permalink
fix manage notetypes menu
Browse files Browse the repository at this point in the history
  • Loading branch information
RobozinhoD committed May 18, 2024
1 parent e2bb9c8 commit d02e120
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ class ManageNotetypes : AnkiActivity() {
}

override fun onCreateOptionsMenu(menu: Menu): Boolean {
menuInflater.inflate(R.menu.locale_dialog_search_bar, menu)
menuInflater.inflate(R.menu.manage_notetypes, menu)

val searchItem = menu.findItem(R.id.locale_dialog_action_search)
val searchItem = menu.findItem(R.id.search_item)
val searchManager = getSystemService(Context.SEARCH_SERVICE) as SearchManager
val searchView = searchItem?.actionView as? SearchView
searchView?.maxWidth = Integer.MAX_VALUE
Expand Down
24 changes: 24 additions & 0 deletions AnkiDroid/src/main/res/menu/manage_notetypes.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 3 of the License, or (at your option) any later
version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
this program. If not, see <http://www.gnu.org/licenses/>.
-->
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/search_item"
android:title="@android:string/search_go"
android:icon="@drawable/ic_search_white"
app:actionViewClass="androidx.appcompat.widget.SearchView"
app:showAsAction="ifRoom|collapseActionView"
/>
</menu>

0 comments on commit d02e120

Please sign in to comment.