0

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.

4

1 回答 1

1

您可能会在单击的视图上调用 getParent(),然后在父级上调用 findViewById 以向下导航到另一个复选框。当然,如果复选框被包裹在其他视图中,您可能需要上几个级别。

于 2011-06-23T19:06:47.410 回答