Is it posible to have separatedlistadapter inside expandablelistadapter?

巧了我就是萌 提交于 2019-12-25 03:08:42

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!