Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Add Contact Form dynamically

enter image description here

Hi,

I want to implement form like in the image, dont have idea how they are adding Fields dynamically. Is this a ListView? Expandable List? user can add and remove at runtime. I have checked Expandable List which contains child items. but we define child in array, In the image they add dynamically.

Any guide/link

Thanks

like image 473
ALi Avatar asked May 17 '26 16:05

ALi


1 Answers

Custom ListView Adapters are often back by Collections, like List, ArrayList, etc. These lists may contain your custom objects, where the Adapter determines what to display based on the object properties. The lists can be managed/altered in typical fashions, like add() remove(), etc.

Do a Google search for "android custom list adapters" to learn more.

Here is an example of dynamically creating list rows with a "plus" buttons to add more rows. Should give you a good start: Dynamically add elements to a listView Android

You can always look at the source of the Android contacts app, as well.

like image 83
Paul Burke Avatar answered May 20 '26 04:05

Paul Burke



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!