Hi guys, this is not a code specific question but rather a high level discussion. Im designing a fitness logger app, where the user is able to create workout programs, and inside of those programs create workouts for different days and inside workouts are exercises. The database (sqlite) design is as follows:
Currently I am using the support libraries v4 and v7 and also design. I am using the navigation view widget, which has different items in the menu, each menu item triggering a different Fragment. This is handled in the MainActivity. In each fragment there are buttons that trigger other fragments through events that are also handled inside the MainActivity. So there is only one Activity in my App so far, because I wanted to utilize fragments because of performance.
Here is my design problem. I want the fitness logger to be highly customazible by the user, meaning he can create sets (repetitions x weight is one set, usually 3 sets) and add sets as is required. I think therefore that some of my layout will be done programatically, which in this case I dont know what to do. How do I get a reference to the Id of the newly created set so that it can be stored in the database? And also retrieving workout information from the database, and populating the layout in accordance with it (number of sets etc). Can You guys help me with that?
Thanks in advance!
Miko