Using Checkbox array in android

view full story

http://stackoverflow.com – I am trying to make a listview with checkbox using listview's built in checkbox method. I have gone through a stackoverflow post and i found it is running properly except one problem. If there are four items in list and assume, i checked the second and third item, onclicking, it is displaying the second and third item as needed..but if i am selecting first and then third and then second item, and then i m unchecking the first, so i must be left with second and third as desired output..but it is providing first second and third item as output. can anybody guide me on that..? This is the java (HowTos)