How to handle events from a CheckedChangedListener in a ListView
<p>Iv'e got a custom Listview implemented in this particular class, it looks like </p>

<p>[Image/Textview/Checkbox]</p>

<p>When someone clicks on the text is should launch another class, this is working at the moment, however when someone clicks a checkbox I want to update an array that stores the current state of all the checkboxes, I tried doing that via using a onCheckedChanged method within the custom adapter however it doesn't work as the position variable isn't final. So two questions </p>

<p>1 within the adapter is their a way to get the position of the Checkbox so I can change the right position in the array, and </p>

<p>2 If not is their another way to update the array somewhere else without disrupting the current functionality of the onClick.</p>

<p>Here is my onCheckedChanged within my adapter</p>

<pre><code>CheckBox.setOnCheckedChangeListener(new OnCheckedChangeListener(){

    @Override
    public void onCheckedChanged(CompoundButton but, boolean b) {
        // TODO Auto-generated method stub


        if(but.isChecked())
        {
            deleteList[???] = true;
        }else{
            deleteList[???] = false;
        }
    }

   });
</code></pre>
