2013-05-03 26 views
4

添加ExpandableListadApter我使用MergeAdapter来自: https://github.com/commonsguy/cwac-merge如何在MergeAdapter从CWAC

我想一个ExpandableListadApter添加到MergeAdapter但当前发生在类型为“ListAdapter”。有没有人知道一种方法来做到这一点?

+0

@CLDev你找到解决方案吗?目前我也需要这个PLZ让我知道,如果你找到答案。 http://stackoverflow.com/questions/27539400/how-to-show-all-list-items-in-child-listview-using-cwac-merge-1-0-4-jar – Jamal 2014-12-30 11:56:16

回答

0

AFAIK,MergeAdapter只支持ListAdapter接口。除了分销回购和增加对ExpandableListAdapter的支持之外,我认为你可以“破解”一个快速解决方案的方式实际上只有一种。

Android使用ExpandableListConnectorExpandableListAdapter映射到BaseAdapter。您可以从字面上将该类复制到您的项目中,并使用ExpandableListAdapter对其进行实例化。这会给你一个ListAdapter兼容适配器,你可以使用MergeAdapter

请注意,我从来没有试过这个......但理论上它应该工作。

ExpandableListConnector source code

相关问题