问题
i would like to have a separatedlistadapter like this written by Jeff Sharkey INSIDE Expandablelistadapter.. Is it possible? an adapter inside an adapter? I already have my expandablelistadapter (using BaseExpandableListAdapter) but i don't know where to put the codes of Jeff Sharkey to make it work.. anybody knows?
回答1:
You can't do that because you can't put a scrollable view(and Jeff's custom view is essentially, a ListView) into another scrollable view(ExpandableListView). The reason is that the parent will consume all the touch events and they will never reach the child. ExpandableListView will scroll, but the SeparatedListAdapter will never know that scrolling took place.
Take a look at answers to this question it has some more detailed explanation.
来源:https://stackoverflow.com/questions/15190949/is-it-posible-to-have-separatedlistadapter-inside-expandablelistadapter