public void onItemClick(AdapterView<?> parent,
View clickedView, int position, long arg3) {
//TODO Auto-generated method stub
System.err.println("rowClickedEvent");
position = position - 1;
if (clickedRowID != -1 && clickedRowID != position) {
View clickedViewToClose = actualListView
.getChildAt(clickedRowID + 1);
if (clickedViewToClose != null) {
RelativeLayout roww = (RelativeLayout) clickedViewToClose
.findViewById(R.id.add_row);
roww.setVisibility(View.GONE);
} else {
System.err.println("clickedViewToClose null");
}
}
if ((clickedRowID != position)) {
}
});
clickedRowID = position;
} else if (clickedRowID == position) {
RelativeLayout roww = (RelativeLayout) clickedView
.findViewById(R.id.add_row);
roww.setVisibility(View.GONE);
clickedRowID = -1;
dataAdapter.notifyDataSetChanged();
}
}
答案 0 :(得分:0)
在getView()方法的适配器中添加holder.imageView.setOnClickListener()
答案 1 :(得分:0)
holder.imageView.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
yourview.setVisibility(View.GONE);//do ur code here
}
});