Hmmmm I think you misunderstood what the getChildCount() and getChildAt() methods do. Those will actually get only the rendered views. Unless I misread something here, if you have 650ish rows you cannot accomplish what you want with the views that are being rendered.
Instead, you should implement an onItemClickListener (or, alternatively, something that fires when the checkboxes are clicked) and after the checkbox is checked, save that state into your model.
Thanks for the reply! I added an onCheckChangedListener to each CheckBox in the custom Adapter, and had it add its index to a static ArrayList in the Activity, and updated the methods to read from it accordingly. However, every seventh box still gets checked whenever I check just one, which is what is causing this whole problem.
– Shawn Walton May 8 at 15:00 Ah, fixed it! My adapter wasn't always building a new View when it should have been. 'Tis all fixed!
Thank you! – Shawn Walton May 8 at 15:14 Can you elaborate on how its fixed. – m4n07 Jun 20 at 4:44.
I have a ListView that has 649 entries. Each View in the list has two LinearLayouts, an ImageView, a few TextViews, and a CheckBox. I currently have code to go through all the CheckBoxes and count them, and more code to figure out which ones are checked so I can use them.
However, whenever I check one of the CheckBoxes, every seventh CheckBox above and below it magically become checked as well. The method to count the checked boxes returns the number I actually checked, but the method to get the indices of all the checked boxes just returns the first x checked, regardless of whether I checked them or the ones 7 away from them. For example, if I check number 21, the method returns index 3.
If I can add any extra info, please ask!
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.