Y
Y
YuiKon2020-10-05 13:08:17
Android
YuiKon, 2020-10-05 13:08:17

What method to use to search by item menu in Android Studio?

Hi all! Faced a problem in the development of an application for android.
The task is to create a collection of songs. I created a Navigation Drawer menu that would display the text on activity_main when a song title is selected. I completed the transition functionality, but the problem was in the search for this Navigation Drawer menu. All search methods are associated with the ListView element, everything is done through EditText without problems, but my elements are not layout but menu.
Such a question, is there a method for searching through menu items?
I hope I told the big picture, I really need a hint whether to redo all the menus in order to build the search normally or something.
I'm new to Android app development, so I accept all criticism)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Vodakov, 2020-10-05
@WaterSmith

No need to hammer nails with a microscope. The menu is not designed for this.
By the way, ListView is deprecated. Use RecyclerView
If absolutely nothing, for example, create a map with values ​​that store menu item IDs. Then, if necessary, do a search on the map, find out the identifier and get access to the menu item.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question