title | type | duration | creator | ||||
---|---|---|---|---|---|---|---|
Enable Search - Grocery List |
lab |
1:25 |
|
Note: This can be a pair programming activity or done independently.
In this lab, you will be adding the ability to search through your grocery list to the toolbar, based on the name of the items. Your search must operate in one of two ways:
- Your search term can appear at the beginning of a word in the name
- Your search term can appear anywhere in the name (even in the middle of a word)
- Allow the user to search through the grocery list
- Add a Searchable xml file
- Make required changes to the manifest to enable search
- Add a SearchView to your menu
- Implement search logic in your Activity
- Add search method to your database helper
Bonus:
- Display the type in the list item
- Add the ability to search by type
The starter-code folder contains an Android project with the following:
- A text file to pre-populate the database with
- A java file containing a partially completed helper method to pre-populate the database. Delete this file after you copy the code
The screenshots below show what the app should look like.