top of page
Blog: Blog2
Search

Prototyping Adding Recipes into Weekly Logs

  • Writer: Dominic Ng
    Dominic Ng
  • Dec 9, 2018
  • 2 min read

Updated: Feb 6, 2019

Hey! It’s been a tough week so far due to the revision of Common Test and the piles of revision paper to do. This week, I worked with Kevin to build the features where we add recipes into weekly logs node in the database. Although pushing the recipes into the weekly log nodes in Firebase is similar to the implementation of “Add to Favourites”, this feature was more time-consuming as there were many considerations we have to take note of when pushing the recipes into the weekly logs. For example, we had to take into account which days the user wants to add the recipes into their weekly log.

For my part, after clicking “Add to Recipes” in the recipe’s details page, an alert dialog will appear prompting the user to select which day he/she wants to enter the recipe into. As I was working closely with Kevin for this feature, Kevin designed the UI of the alert dialog with the buttons in it while I code the back-end where after they clicking on the buttons, the colour of the button will have changed and a list storing which buttons have been clicked will be updated. For example, when the user clicked on the “M” button, my Java code will change the “M” button into a darker shade of green, showing that it has already been clicked and “Monday” will be appended to a dayList which stores all the days that the users want to add the recipes into. After clicking on add to weekly recipes, the database will be updated with a new record of the user’s recipe in the weekly log.

Hence, after storing the data in weekly logs as well as the number of calories in each recipe, next week, I will start working on retrieving the calories and display it in the Progress tab so that the user would be able to track their daily calorie intake as well as help me better program the estimation of weight which I will be working on two weeks from now. I will be documenting my progress in retrieving the daily calories of the user and display it in the Progress tab in my blog next week! See you there!



ree

ree


 
 
 

Comments


©2019 by Gastronome.

bottom of page