Josh Miller
This week one of my goals was to add a list of premade templates for the user to select from. This would allow inexperienced users or those who simply don't want to manually edit their routines just choose an already build routine to follow.
The first step was to put together the routines themselves and convert them into a useable data type for our app to use. I sourced data across several online resources to put together a small list of routines to use as a placeholder until the team has more time to add more templates. I created a new json file and saved it with the rest of the application assets. Each routine is simplified into another entry in the json file, which is then parsed through by a method I wrote to create an ArrayList of templates that the app can use. Below is an example of an entry in the file:
{
"id": "0002",
"title": "Legs / Core",
"primer": "Trains lower body and core muscles (quads, hamstrings, calves, abs, obliques).",
"exercises": [
"0122",
"0118",
"0127",
"0117",
"0281",
"0292",
"0293"
]
}
Once the app has the information stored in the list, it is sent to a custom adapter class that sort of unpacks the data to display it to the user. Each template is displayed as a separate card that when clicked on will allow the user to generate a routine with all of the included exercises as well as set a goal for each.