I have a simple Table Layout with an empty row
<TableRow
android:id="@+id/range_input1" >
</TableRow>
I would like to add an EditText to that row when user presses a button. I am quite unsure on how to do that though. What is the proper way of doing it? So far I can only think up of two ways, first one I have the EditText in the row and just make the row hidden, or I try to create the EditText when the button is pressed.
The problem is that I have no idea how to do either option, nor could I find any tutorials on explaining how to add or hide forms.
Also I was wondering if it is possible to do slide effect.
Thanks to anyone for their help!
Add the
EditTextto theTableRowand make the row visibility to GONE :and in your
Buttonon click listener: