Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/asp.net-core/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 是否可以在expandablelistadapter中使用单独的ListAdapter?_Android_Expandablelistadapter - Fatal编程技术网

Android 是否可以在expandablelistadapter中使用单独的ListAdapter?

Android 是否可以在expandablelistadapter中使用单独的ListAdapter?,android,expandablelistadapter,Android,Expandablelistadapter,我希望在Expandablelistadapter中有一个独立的ListAdapter,如Jeff Sharkey所写。。可能吗?适配器内部的适配器?我已经有了我的expandablelistadapter(使用BaseExpandableListAdapter),但我不知道把Jeff Sharkey的代码放在哪里才能使它工作。。有人知道吗?你不能这样做,因为你不能将一个可滚动视图(Jeff的自定义视图本质上是一个列表视图)放入另一个可滚动视图(ExpandableListView)中。原因是父

我希望在Expandablelistadapter中有一个独立的ListAdapter,如Jeff Sharkey所写。。可能吗?适配器内部的适配器?我已经有了我的expandablelistadapter(使用BaseExpandableListAdapter),但我不知道把Jeff Sharkey的代码放在哪里才能使它工作。。有人知道吗?

你不能这样做,因为你不能将一个可滚动视图(Jeff的自定义视图本质上是一个列表视图)放入另一个可滚动视图(ExpandableListView)中。原因是父母将消耗所有的触摸事件,而他们永远不会到达孩子。ExpandableListView将滚动,但SeparatedListAdapter永远不会知道滚动发生

看看答案,有更详细的解释