0

I want to create a view like shown in Image with add and remove ImageButton. On click of any of these will start new activity and get contact detail and set/replace on the clicked index.

screenshot

For Example If I click on 1st green button It will add contact photo and name in 1st row and like-wise for others. I am able to start Activity to get contact information but I experiencing difficulty to manage this layout and set click event on this. Right now I am using 3 different RelativeLayout with all distinct Row Components. and I know It will restrict me to facilitate upto 3.

so here is my questions :

  1. How can I make a UI so that I can grow this list how much I want(for as of now 3 is ok).
  2. How to use add and remove button which will work for there row only.
  3. I also want to display contact number just below the name of contact.
  4. on click of any row will show its detail.

I'll appreciate any suggestion for better UI which can fulfill above requirement. Thanks in advance.

4

1 回答 1

0
  1. 我怎样才能制作一个 UI,以便我可以增加这个列表我想要多少(到目前为止 3 还可以)。

将 aListView与 a 一起使用CustomAdapter。这将允许您根据需要显示尽可能多的行。方法之内getView()。创建一个单独layout的,将在您的Adapter班级中膨胀,看起来像

 <ImageView .../>
 <TextView .../>
 <ImageButton .../>
 <ImageButton .../>

2.如何使用仅适用于该行的添加和删除按钮。

设置您要创建的方法的onClick内部getView()CustomAdapter

适配器类

列表视图示例

于 2013-07-15T19:55:07.983 回答