i am building an app for android in eclipse and don't know the exact no. of textfield it will require as it depends the user how much times the users click add row.in Eclipse you get the graphical tools(i.e. drag and drop) to design you app's view which is done before coding.I want to design my app and add/remove labels,textfield through coding and alter it through coding.
Asked
Active
Viewed 215 times
-1
-
listview is the way to go . Use textfield in listview – Jimmy Sep 22 '14 at 15:01
-
possible duplicate http://stackoverflow.com/questions/6216547/android-dynamically-add-views-into-view – Marija Milosevic Sep 22 '14 at 15:22
1 Answers
0
You can create a view programmatically like this:
TextView textView = new TextView(this);
Then just add it to the layout. You can find more information here: http://www.mysamplecode.com/2011/10/android-programmatically-generate.html

Bene
- 724
- 8
- 20
-
how do i set its location on the screen i.e. where it will appear – Abhishek Chawla Sep 22 '14 at 15:09
-
You should take a look at layouts in android: http://developer.android.com/guide/topics/ui/declaring-layout.html – Bene Sep 23 '14 at 10:46