I'm trying to make an "Add contact" activity. The user will be able to insert multiple phone numbers and multiple physical addresses for each user (probably up to 5 is enough), as seen below. Pressing the blue "+ Add.." button will create a field, which can then be deleted by pressing the 'x' on its right hand side.
I've tried creating these fields statically, and hiding/showing them upon clicking the buttons, but I don't like this approach (primarily because if I delete an entry in the middle, and an entry exists after it, it won't move to take the previous entry's spot).
How can I create, as well as add/remove, these EditTexts dynamically?
EDIT: Also, each address field will look like so: