Android动态添加联系人表单 [英] Android Add Contact Form dynamically
问题描述
我想在图像中实现形式,没有想法如何动态添加字段。这是ListView吗?可展开列表?用户可以在运行时添加和删除。我已经检查了包含子项的扩展列表。但是我们在数组中定义child,在图像中它们动态添加。
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.
任何指南/链接
谢谢
推荐答案
自定义 ListView
适配器
通常由集合返回,例如 List
, ArrayList
等。这些列表可能包含您的自定义对象,其中适配器
根据对象属性确定要显示的内容。列表可以以典型的时尚管理/更改,例如 add()
remove()
等。
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.
执行Google搜索android自定义列表适配器以了解更多信息。
Do a Google search for "android custom list adapters" to learn more.
以下是动态创建列表的示例具有加号按钮的行可以添加更多行。应该给你一个好的开始:动态添加元素到listView Android
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
您也可以随时查看Android联系人应用的来源。
You can always look at the source of the Android contacts app, as well.
这篇关于Android动态添加联系人表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!