Android add edittext field on click of (+) button and remove by click of (-)
I am creating a add contact activity. There will be only one edit text and a button (+), when click on button then another edit text should be added and previous button should change into (-). By this method i want to add and remove edit text fields. Some thing like this. I am doing like this but not able to achieve that i want. Any idea? public class TextField extends Activity { Context con; TableLayout table; TableRow tr[] = new TableRow[6]; EditText txt[] = new EditText[6]; //ImageView img[] = new ImageView[5]; Button img[]=new Button[6]; int count ; int lastDeletedIndex; int