1

I have used checkbox in the ListView. When I click on any checkbox then a few checkboxes out of screen are checked together. It seems that checkboxes referecing to the top checkboxes after a few rows.

if(convertView == null) {

holder = new Holder();

LayoutInflater inflater=((Activity)context).getLayoutInflater();

convertView = inflater.inflate(R.layout.row, null);

holder.image = (ImageView) convertView.findViewById(R.id.t1);

holder.textview = (TextView) convertView.findViewById(R.id.t2);

holder.check = (CheckBox) convertView.findViewById(R.id.t3);

holder.image.setImageBitmap(null);

convertView.setTag(holder);

} else {
   holder = (Holder) convertView.getTag();
   holder.check.setChecked(false);
}

holder.check.setTag(position);
DroidBender
  • 7,762
  • 4
  • 28
  • 37
Ravi Kumar
  • 432
  • 4
  • 14
  • this link may help you [link](http://stackoverflow.com/questions/16350670/listview-viewholder-checkbox-state) – vinoth May 16 '13 at 10:14
  • This is due to recycling and i think you should check this http://stackoverflow.com/a/14108676/1939564 too so you a get a better idea of how `ListView` recycling mechanism works – Muhammad Babar May 16 '13 at 10:39

0 Answers0