问题描述
我想有一个像separatedlistadapter的通过杰夫·夏基INSIDE Expandablelistadapter写..这可能吗?适配器内部的适配器?我已经有我的expandablelistadapter(使用BaseExpandableListAdapter),但我不知道放在哪里$ C $杰夫·夏基的CS,使其工作..任何人知道?
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?
推荐答案
您不能这样做,因为你不能把一个滚动视图(和杰夫的自定义视图本质,一个ListView)到另一个滚动视图(ExpandableListView) 。其原因是家长会消耗掉所有的触摸事件,他们将永远无法达到这个孩子。 ExpandableListView将滚动,但SeparatedListAdapter永远不会知道滚动发生了。
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.
看看答案this 该问题有一些更详细的说明。
Take a look at answers to this question it has some more detailed explanation.
这篇关于它是更多钞票已经装expandablelistadapter separatedlistadapter?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!