I'm trying to set a ListView that each row contains CheckBox, TextView and ImageView.
I use my own adapter in the implementation, but when I'm scrolling down some Checkbox is checked without no reason:
For example, I check checkbox in the first row (in the 0 position), scrolling down and suddenly the element in row 17 is also checked, and sometime if I turned back to the first the checkbox is not checked.

I used the following code:

```
private class ViewHolder{
        ImageView image;
        TextView name;
        CheckBox selected;
    }

private class BrowserAdapter extends ArrayAdapter<String> {

    public BrowserAdapter(Context context, int resource, int textViewResourceId, List<String> objects) {
        super(context, resource, textViewResourceId, objects);

    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {     
        ViewHolder holder;

        if (convertView==null){
            LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
            convertView = inflater.inflate(R.layout.browser_list_row, parent, false);

            holder = new ViewHolder();

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

            holder.name = (TextView) convertView.findViewById(R.id.browser_file_name);
            holder.name.setOnClickListener(ActionBar.this);

            holder.selected = (CheckBox) convertView.findViewById(R.id.browser_selected);
            holder.selected.setOnCheckedChangeListener(ActionBar.this);

            convertView.setTag(holder);
        }else{
            holder = (ViewHolder) convertView.getTag();             

        }

        setViewInfo(holder.image, holder.name, holder.selected, position);

        return convertView;
    }

    private void setViewInfo(ImageView image, TextView name, CheckBox selected , int position) {

        name.setTag(position);

        selected.setTag(position);
        selected.setChecked(checkedItems[position]);

        name.setText(myList.get(position));
        File temp_file = new File( file, myList.get( position ) );

        if (temp_file.isFile())
            image.setImageResource(R.drawable.mp3file);
        else
            image.setImageResource(R.drawable.folder);
    }

}//class BroswerAdapter

```

The argument checkedItems is a boolean array that save the state of the checkboxes in the list like in the following code:

```
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {

    checkedItems[(Integer)buttonView.getTag()] = isChecked;

}

```

Can you please help me to figure out what I'm doing wrong?

Edit: when I use the naive way of inflating a view every time the getView function is called (without using the convertView) everything works good.