Finishing Exercises

 -Written by Quincy Williams

This week, I was able to get the finishing touches on the exercises portion of the application. This is one of the main functions of the application, as this will provide the user some exercises that they can perform and even be able to add those exercises to a goal.

The past few weeks, have been working on getting that part of the application fully up and running and this week, we were able to achieve that. With this being one of the main features of the application, it was very important to get this piece working so the base of the application is working and we can begin to work on some of the smaller pieces of the application, so we can provide a full user experience when using the application.

The final piece that I needed to work on this week was getting the exercise activity of the application to work with the goal activity of the application after creating a final view for the exercises. I had to create a view for each exercise that would show some details about the exercise that the user selected from the list of exercises, so they could get an idea of what each exercise does and what muscles that it targets. 


One of the main issues that I ran into was getting the information that I needed from a new data set that we implemented into the application. We were initially using a single json file that housed all of the exercise information, but the file was kind of limited with some of its data, so we were able to find a data set that housed a lot more information but some of the data would return objects instead of simple string data that I could use. This called for me to have to get a good view of how the data is stored and find ways to access the data that would be returned as an object instead of a string. I was able to find out that the data that was returned, were string arrays, so this required that after looping through the original data set as a whole, I would need to also loop through the particular object that was pulled from the initial loop through to be able to gather that information and use it in the description view. I created functions in the activity java file, that will take in a string array and then return a formatted string, to handle the needed information for the view and to format the text as well so there is a clean look with the text that is displayed.


After making that adjustment, we were able to capture the ids of the exercises, via the new data set from the json file, and were successfully able to create the exercise detail screen and attach that data to the goal activity, via intents that are used when switching between the activities.






Comments