我的列表视图在我的片段中的asynctask的onPostExecute中填充了json数据
ListAdapter adapter = new SimpleAdapter(getActivity(), branchList,
R.layout.list_branch_total_hours,
new String[] { TAG_BRANCHID, TAG_BRANCH_NM,TAG_BRANCHCODE,TAG_REGIONID,TAG_REGION_NAME,TAG_TOT_HR }, new int[]
{
R.id.hdnBranchId,R.id.btnBranch_nm, R.id.hdnBranchCode,
R.id.hdnRegionId,R.id.hdnRegionNm, R.id.btnTot_Hours}
);
list.setAdapter(adapter);
现在我在列表中有按钮控件..所以我如何实现按钮的点击事件???
提前致谢...
答案 0 :(得分:0)
你可以使用`
ListAdapter adapter = new SimpleAdapter(getActivity(), branchList,
R.layout.list_branch_total_hours,
new String[] { TAG_BRANCHID, TAG_BRANCH_NM,TAG_BRANCHCODE,TAG_REGIONID,TAG_REGION_NAME,TAG_TOT_HR }, new int[]
{
R.id.hdnBranchId,R.id.btnBranch_nm, R.id.hdnBranchCode,
R.id.hdnRegionId,R.id.hdnRegionNm, R.id.btnTot_Hours}
)
{
override method here//
public void getView(...
};
list.setAdapter(adapter);`