I am working with a custom adapter, having ListItems with CheckBoxes.
While I select multiple checked items and try to remove them, only the first item gets removed...  
How could I remove all the selected items?
Here is my code:
button.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            // TODO Auto-generated method stub
               for(int i= 0; i < listdp.size();i++)
               {
               if(adapterfirst.mCheckStates.get(i) == true)
                {
                    listdp.remove(i);
                                   }
                                 }
 adapterfirst.notifyDataSetChanged();
        }
    });
Could somebody help me showing me how could I delete the selected items in listview?
Thanks