使用listview android中的按钮绑定数据 [英] Bind the data with button in listview android
问题描述
在我的Android应用程序中,我想显示如下数据:
ID:000001
名称:XXXXXX
描述:网络不能正常工作。请立即修复。
日期:2014年4月11日星期四
员工:XXXXX
接受拒绝
------------------------------------------ ----------------------
ID:000002
名称:XXXXXX
说明:网络不能正常工作。请立即修复。
日期:2014年4月11日星期四
员工:XXXXX
接受拒绝
------------------------------------------ ----------------------
这里的Accept和Reject是按钮。数据将来自DB。如何按照我的期望在listview中绑定这些数据。另外默认的接受和拒绝按钮也需要来到每一行。单击接受或拒绝按钮时,我必须获取ID。请给我一些想法。这非常紧迫。预感谢。
您好,
您必须为列表视图创建自定义适配器。
我认为此链接会对您有所帮助,请检查
LINK
Hi,
In my android application i want to show the data as like below:
ID : 000001
Name : XXXXXX
Description : Hi, network is not working. Please fix immediately.
Date : Thursday, 2014, 11, Dec
Staff : XXXXX
Accept Reject
----------------------------------------------------------------
ID : 000002
Name : XXXXXX
Description : Hi, network is not working. Please fix immediately.
Date : Thursday, 2014, 11, Dec
Staff : XXXXX
Accept Reject
----------------------------------------------------------------
Here Accept and Reject is the button. Data will come from DB. How to bind this data in listview or something as per my expectation. Also default accept and reject button also need to be come each row. While clicking the Accept or Reject button I have to fetch the ID. Please give me some idea. Its very urgent. Advance thanks.
Hi ,
You have to create custom adapter for your list view.
I think this link will help you , please check
LINK
这篇关于使用listview android中的按钮绑定数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!