[转]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;
}

 

昵    称:
验证码:

相关文档: