Multiple choice listview android question
<p>i developed a multiple choice listview, my question is how i can make a if statemen or swicth to the position when checkboxes are checked.</p>

<p>I have been looking on internet and i found some examples but is not what im lookinf for.</p>

<p>for example this code:</p>

<p>public void onClick(View v) {</p>

<pre><code>            // TODO Auto-generated method stub



            String selected = "";



            int cntChoice = myList.getCount();

            SparseBooleanArray sparseBooleanArray = myList.getCheckedItemPositions();

            for(int i = 0; i &lt; cntChoice; i++){

                if(sparseBooleanArray.get(i)) {

                    selected += myList.getItemAtPosition(i).toString() + "\n";



                }

            }



            Toast.makeText(AndroidListViewActivity.this, 

                    selected, 

                    Toast.LENGTH_LONG).show();

        }});
</code></pre>

<p>What is does is take all checked checkbox from the multiple choice putting then into an array. My questios is how i can identify which is it, and depending which is check do something or not.</p>

<p>thanks</p>
