I am building a list and the list contain for every contact a checkbox to chose which one to modify for example, the problem is that when the list became longer than the phone screen and the scrolling is active; when i select a check box , a second one is automatically selected in the bottom of the list.
the problem is the automatic selection of the second checkbox; please let me know how can i fix it ??
below is the code i am using for getView method
public View getView(int position, View converView, ViewGroup parent){
View row = converView; if(row == null){ LayoutInflater inflater = getLayoutInflater(); row = inflater.inflate(R.layout.edit, parent, false); }
TextView label = (TextView)row.findViewById(R.id.label); label.setText(items[position]);
CheckBox cb = (CheckBox)row.findViewById(R.id.del);
ImageView icon = (ImageView)row.findViewById(R.id.icon); icon.setImageResource(images.get(position));
Log.i("Pos", ""+position);
return row;
}
}