Android Programming Tutorials

(Romina) #1
Searching For Food

Figure 52. The search field

Entering in some value will give us a new LunchList with just the matching


subset – those restaurants whose names contain the typed-in string.


Extra Credit


Here are some things you can try beyond those step-by-step instructions:



  • Extend the search to search all relevant attributes of the data model,


including address, notes, and the phone number.



  • Support the Quick Search Box, by implementing another content


provider, this one to provide search suggestions.


Further Reading


There is much more you can do to integrate with the Android search


system. You will learn how in the "Searching with SearchManager" chapter


of The Busy Coder's Guide to Advanced Android Development.


304
Free download pdf