E
E
EmptyUnknown2020-05-10 19:48:35
Java
EmptyUnknown, 2020-05-10 19:48:35

How to implement button search?

Hello, I'm new to Android application development, the following problem arose: There is an Activity, it has a SearchView component and a ScrollView with buttons. How can I implement a search using these buttons and, if there are no matches, filtering. I searched the Internet for solutions, but everywhere the options are only with listview and String arrays. I tried to rewrite the found fragments a little for myself, but to no avail ... As far as I understand, the implementation should look like this - make an array of buttons, get the text from each and compare the user's string and the text. If no matches are found, disable the buttons. But how to write it in the code, due to the lack of experience, I have no idea, if you have options, please share a piece of code, I will be very grateful :)

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question