Note: This can be a pair programming activity or done independently.
In this lab, you will be displaying a list of grocery items from a SQLite database using a CursorAdapter
. Each grocery item has a name, description, price, and type. On this screen, you will only be showing the name of each item.
- Extend and complete the SQLiteOpenHelper class to query the database for all of the grocery items
- Make a ListView to display the grocery items
- Use a CursorAdapter to display the queried grocery items
Bonus:
- Create a custom layout for the ListView item to show more info from the database
The starter-code
folder contains an Android project with the following:
- A MainActivity.java file that prepopulates the database
The screenshot below shows what the app should look like.
All content is licensed under a CCBYNCSA 4.0 license. All software code is licensed under GNU GPLv3. For commercial use or alternative licensing, please contact [email protected].