I have googling before asking this, i got few good answer like Android: CursorAdapter, ListView and CheckBox etc, but i need multipal checkbox in single row of listview,now my question is how can i maintain state of it
Asked
Active
Viewed 250 times
0
-
Simple, assign different id to checkbox and implement setOnClickListener to those checkboxes. Now using id you can maintain the state of each checkbox. – user370305 Oct 27 '12 at 18:02
-
@user370305 thnx for reply, as ur direction i ve taken checkbox dynamically and assigned ids, now i m bit confusing for how to use id to maintain state – Parker Oct 27 '12 at 18:26
-
Now when you register onClickListener to it. And when any CheckBox is clicked you can get the which CheckBox is clicked by its id using `view.getId()` and do whatever you want. – user370305 Oct 27 '12 at 18:29
-
solved by maintaining array thanks – Parker Oct 27 '12 at 18:48
-
Welcome Buddy..! Happy Coding..! Also If possible Maintain the state of CheckBox along with List Item row's data so In feature it will never go wrong. (By creating Custom Class List Array ) – user370305 Oct 27 '12 at 18:54