[转]Android监听ListView里Button事件

本文转自:http://blog.csdn.net/lovediji/article/details/6753349

public View getView(int position, View convertView, ViewGroup parent) {
convertView = mInflate.inflate(R.layout.validate_friend_information_item,null);
Button cancle_button = (Button) convertView
.findViewById(R.id.validate_friend_information_canclebutton);

final int p = position;
cancle_button.setOnClickListener(new Button.OnClickListener() {
public void onClick(View view) {
System.out.println("取消好友验证:" + list.get(p).get("friendName"));
}
});

return convertView;
}

 

posted on 2014-03-30 00:56  freeliver54  阅读(1653)  评论(0编辑  收藏  举报

导航