title | type | duration | creator | ||||
---|---|---|---|---|---|---|---|
Grocery List with Details |
lab |
1:25 |
|
Note: This can be a pair programming activity or done independently.
In this lab, we will be continuing our work on the Grocery List: when the user clicks on one of the grocery items, your app will navigate to a new activity that will display extra details about the item. The details you need to display are already stored in the columns for description
, price
, and type
. See the screenshots below for an example.
- Allow the user to click on a grocery item to go to a detail screen
- Display all four details from the database
- Gather the details for the selected item from the database (not passed through the intent)
Bonus:
- Add additional columns to the database and display those on the details screen
- Add an additional activity to allow the user to add more groceries to the list
The starter code contains the the solution code to the Databases w/ RecyclerViews lab with a few small updates (the SQLiteOpenHelper was turned into a singleton, and the ShoppingItem class has a field for ID). If your code from that lab was working properly, you may continue using that codebase instead, if you prefer.
Here are screenshots of what the master and detail views 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 legal@ga.co.