Production Week 2
-Written by: Quincy Williams
In week 2, I continued to work on the Exercises screen and we were able to revamp the view as well to provide a cleaner look for the user.
Old:
New:
The view still uses a a grid view but now the images are formatted inside of card views for a cleaner look. The images are now more consistent with the the exercise groups and are more uniform with the color scheme of the application. Each image also now can be selected and the application will provide the user with a list of exercises that that are associated with that muscle group via a json file that is locally stored.
This was completed by using a custom adapter and setting that adapter in the class the houses the grid view and the adapter puts the view inside of the grid view, programmatically and using an xml layout file to create a preset of each card and having that created in a view holder in the adapter.
onCreate function that creates the grid view that holds the cards of exercises
Once a card is selected, another custom adapter is used to house the view of the exercises for the muscle group that is also set on cards to keep a uniform look. The cards in the list are even searchable and users can look for specific exercises in each list, and there is a list that houses all of the exercises for users to be able to search them all as well.
Example of a list of exercises after a card is selected
Example of searching exercise in a muscle group
The next steps for the exercises view will be having the items in the list be able to be clicked and it will provide a brief description of the exercise and an image that give the user an overview of the exercise, the muscles that it works, and the image will demonstrate how the exercise is best performed. The view will also have a button that will allow for the user to add that specific exercise to goals, which will link to that activity and create a new goal from that exercise.
The hardest challenge this week was getting more familiar with getting used to the custom adapters. Once I was able to get more comfortable with them, it helped with creating the views and this will help in the following week to complete the view and adapter needed to complete the exercise component of the application. Refactoring for efficiency will be important for keeping the amount of code needed, down and keep the code clean, without giving up or losing functionality.
Comments
Post a Comment