I've created an activity, which has an expandable list view of category, and some of them as subcategory. They all need to be checkable. I used for subcategory, a checkedTextView. For category, I used a textView and a checkbox, because when we click on the category name, we need to expand it (it is an expandable list view after all !). For the selection, the listview is on "Multiple Choice Mode". The adapter as the list of checked items, and in the getchild/getgroup view(), I set the checkbox (or the checkedtextview) to the state given by the sparsebooleanarray (of the listview). For each checkbox i do :
holder.checkbox.setOnCheckedChangeListener(new checkListener(groupPosition));
so when i check a checkbox, i know what position it is in the listview.
But I have a lot of problem with that implementations (the position given is not good, etc). I use the method of expandable list view for get the flatlistposition, but I suspect the expandable list view isn't really compatible with the choiceMode or selection...
Is this right ? Did somebody already had difficulty to get a similar project working ?