我正在使用来自: https ://github.com/commonsguy/cwac-merge 的 MergeAdapter
我想将 ExpandableListadApter 添加到 MergeAdapter,但它目前采用“ListAdapter”类型。有谁知道这样做的方法?
我正在使用来自: https ://github.com/commonsguy/cwac-merge 的 MergeAdapter
我想将 ExpandableListadApter 添加到 MergeAdapter,但它目前采用“ListAdapter”类型。有谁知道这样做的方法?
AFAIK,MergeAdapter唯一支持的ListAdapter接口。除了分叉 repo 并添加对ExpandableListAdapter.
Android 使用 anExpandableListConnector将 an 映射ExpandableListAdapter到BaseAdapter. 您可以从字面上将该类复制到您的项目中,并使用您的ExpandableListAdapter. 这将为您提供一个ListAdapter兼容的适配器,您可以使用MergeAdapter.
请注意,我从未尝试过这个......但理论上它应该可以工作。