Reputation: 12269
I have a custom cursor adapter I'm using to fill a ListView. The inflater has 2 CheckBoxes which both have onclick handlers. I want to be able to check the state of the sibling CheckBox when one is touched.
Does anyone have experience with something similar? I'm not sure how to grab the ListView row of the CheckBox and the cursor adapter is always in the state of the last row added.
Upvotes: 0
Views: 236
Reputation: 1656
You could probably call getParent() on the clicked view, and then findViewById on the parent to navigate back down to the other checkbox. Of course you might have to go up a couple levels if the checkboxes are wrapped in other views.
Upvotes: 1