-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Description
There is no documentation on how to use com.google.android.material.search.SearchView.
There is no setOnQueryTextListener, but all tutorials on the internet say it should be there.
There is no information on how to listen to the search input text changes. It's the most basic thing and without it the component is useless.
Google Gemini does not know the answer. ChatGPT4 does not know the answer.
I had to search the entire internet to find the answer:
https://stackoverflow.com/a/78060915/9737275
The answer is that searchView has a secret child editText that you can add a text change listener to. Please mention it in the documentation.
searchView.editText.addTextChangedListener
There is also no documentation on how to actually use it, e. g. with RecyclerView. It would be great to have it.
Thank you.