質問

I am retrieving contacts and displayed it in listview using simpleCursorAdapter. listView is displayed in main.xml and my textview and checkboxes are in listview.xml. My main.xml also have 2 buttons, named selectAll, clearAll which on click event should check all the checkboxes true and false respectively. Button click listener event calls the inflated view to access the checkbox but it is still not checking true. Pls help!

Thanks in advance!

役に立ちましたか?

解決

When you inflate a view, it's not to access it, it's creating it, and you can't access all check boxes cause you don't generate all of them, you'll need to hold a data model that holds data about who is selected.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top