I want to add an edit text field to my app when i click a button, but i do not change the layout. Just add it below an existing one defined by the xml file.
Lets say i have a contacts app and if the user needs to add an extra field hit the button and creates one!
How to do that?
I want to add an edit text field to my app when i click
Share
What you can do is have those EditText’s in a panel, i.e. group them in panels, then have a button, and on button click create an instance of an EditText and add it to the relevant panel. This way you are not limiting yourself to being only able to add one panel, but as much as the user would like to add.