What I have created till now is as follows:
Please see this image
Purchase Screen
As shown in the image above, the screen (PurchaseActivity) initially has:
1. spinner for customer - line 1
2. fragement containing spinner for product, rate, and a delete fab - line 2
3. linear layout for displaying fragments same as above. They will be dynamically added.- line 3
4. fabAdder, adds fragment dynamically - line 4
5. save button for saving to persistent layer. line - 5
To add views dynamically, is this the right way. If so, how do I get the values out of the views inside fragment which are dynamically added in my activity.
Otherwise what is the right way of handling/providing the user with controls to add data dynamically.
Advantages of using this method:
The user will be able to add as much product as he wants, he may delete it conveniently and also editing is easy.
Please use the comments section to if you feel the question needs more content.
Answer or lead me in right path to fulfill this requirement.
-Newbie Androider