Skip to content

Latest commit

 

History

History
57 lines (37 loc) · 1.74 KB

File metadata and controls

57 lines (37 loc) · 1.74 KB
title Enable Search - Grocery List
type lab
duration 1:25
creator
name city
Drew Mahrt
NYC

Enable Search - Grocery List

Introduction

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)

Exercise

Requirements

  • 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

Starter code

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

Deliverable

The screenshots below show what the app should look like.

Additional Resources