Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/codeamt/sandwich-app
First course project for Phase 2 of #GrowWithGoogle and Udacity's Nanodegree Program for Android Development
https://github.com/codeamt/sandwich-app
android-development grow-with-google java udacity-android-nanodegree
Last synced: about 2 months ago
JSON representation
First course project for Phase 2 of #GrowWithGoogle and Udacity's Nanodegree Program for Android Development
- Host: GitHub
- URL: https://github.com/codeamt/sandwich-app
- Owner: codeamt
- Created: 2018-04-30T20:04:59.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-09-28T04:49:08.000Z (over 6 years ago)
- Last Synced: 2023-10-20T04:52:18.325Z (about 1 year ago)
- Topics: android-development, grow-with-google, java, udacity-android-nanodegree
- Language: Java
- Size: 226 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
#GrowWithGoogle Android Development Project:
Sandwich AppTo kick off Phase 2 of the Grow With Google Developer Scholarship Program and conjointly Udacity's Nanodegree Program for Android Development, students were asked to complete a mobile app (written in Java) that holds details about famous sandwiches from around the world.
Here's my go at it:
## Udacity's Learning Objectives
- [x] Practicing JSON parsing to a model object
- [x] Design an activity layout
- [x] Populate all fields in the layout accordingly## Core Functionality:
#### Data Parsing
The primary goal for completing this project was to parse sandwich details from a string array (located in the string values resource file) and:- make a JSON copy of each sandwich that maps sandwich details to object keys, then
- serializes this JSON to a Java object in accordance with an existing Sandwich modelInstead of using a 3rd party library to realize this goal, we implemented this functionality from scratch by defining a globally accessible method in JSONUtils that converts sandwich strings to JSON objects like a factory.
(A great learning experience!)
#### Data Binding
The user journey for this app goes as follows:
- Click on a sandwich name
- See details page for more info about that particular sandwich.With this in mind, the second goal of this project was to bind Sandwich data to the child views of their relative Detail Activity UIs.
To achieve this, the JSON conversion method is called from inside a click listener. When a sandwich name is clicked, the Detail View's fragments are inflated and populated.
Some of the keys on these sandwhich objects hold arrays of items (e.g., ingredients or alternative names). A helper method concats and formats these list items, as needed, before binding them to their UIs.
#### Responsive Layout
The third goal for this project was to build out a sensible layout for the Details Activity UI. I implemented a tabbed layout and nested Scroll Views within these tabs to make details viewable on smaller devices.Attending to landscape mode, I made a horizontal layout that put feature image and details side-by-side.
I hope to get better at Front End work after completing the upcoming course on Material Design.
## Versioning and Dependencies
**Target SDK Version:** 26
**Dependencies:**
- com.android.support.constraint:constraint-layout:1.0.2
- com.android.support:appcompat-v7:26.1.0
- com.android.support:design:26.1.0
- com.squareup.picasso:picasso:2.5.2**Android Studio Version:** 3.1.2 (Stable Release)
**Gradle Version:** 3.0.1