title | type | duration | creator | ||||
---|---|---|---|---|---|---|---|
Grocery List with Details and Fragments |
lab |
1:25 |
|
Note: This can be a pair programming activity or done independently.
In this lab, we will be transforming our Grocery List with details to use Fragments instead of multiple activities. The main fragment should contain the shopping list in a RecyclerView, and when the user clicks on one of the grocery items, your app will navigate to a detail fragment 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
. This version of the app should be identical in terms of the information being displayed, the only difference is that navigation is now handled by fragments instead of activities.
- Allow the user to click on a grocery item to go to a detail fragment
- 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 fragment
The starter code contains the the solution code to the Detail View lab. 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 [email protected].