For the application I use the template Navigation Drawer. There is a search icon on top of the menu. What do you need to do so that after clicking on this icon, the search string opens, and how then can you handle the text change event in this string? Or implement the search in some other way. For example, as done in the Play Market
1 answer
The implementation of the search menu is no different from its implementation in any other part of the application.
Only instead of the icon and a separate search string, it is better to use SearchView , which is a search icon and a string that appears when you click on the icon.
To process and display the results, use the SearchView.OnQueryTextListener interface. You can also use addTextChangedListener(new TextWatcher() {...}) . Surely there are other ways.
|