I have one button add more. when user click button one edit text added and user can click only 10 times.All Edit text show in vertically. How can i do this? I have no idea. Also I get all edit text data in one array. How can I do this?
Asked
Active
Viewed 68 times
2
-
While you are clicking on button you need to add in to arrayList and fill the adapter. When list size will reach to `>=10` then disable click event of button. – Piyush Oct 24 '18 at 06:45
-
can you give me any example of this? – Darshi Domadiya Oct 24 '18 at 06:46
-
related [Dynamic form with repeating form](https://stackoverflow.com/questions/47975286/dynamic-form-with-repeating-form) – AskNilesh Oct 24 '18 at 06:47
-
@DarshiDomadiya Do you have only simply edittext view or any other views? – Piyush Oct 24 '18 at 06:48
-
I have only simple edit text view no other views – Darshi Domadiya Oct 24 '18 at 06:49
-
Then you need to take one String arraylist and add value of edittext in array list and fill your adapter. You can also use model (pojo) class and make list of it. – Piyush Oct 24 '18 at 06:50
-
ok but how can i add edit text when button clicked – Darshi Domadiya Oct 24 '18 at 06:54
-
see this https://nelsoncvjr.wordpress.com/2013/05/12/addremove-layout-dynamically-on-android/ – Ankita Oct 24 '18 at 07:28