Look at the search e.g. of the Play Store
:
That's exactly what I want, but how can I do that in my app? If I provide a custom suggestions adapter, I can change the appearance of each search suggestion, but in a case like this the popup showing the search suggestions would end after the fourth suggestions and the regular content would be visible between the last search suggestion and the keyboard.
In the first example AutoCompleteTextView
is used and AutocompleteSupportFragment
is used in the later.
What you want is to Embed an AutocompleteSupportFragment
. Which would help you to search.
Google Places Autocomplete uses both the methods for enabling users to search for places. You can see the example at the docs here: Place Autocomplete
And you can implement it for your purpose.
Or you can see this answer on stack Overflow which has detailed explanation of how you can implement such a search fragment with all necessary code.