I am using the MergeAdapter from: https://github.com/commonsguy/cwac-merge
I want to add an ExpandableListadApter to the MergeAdapter but it currently takes in a type 'ListAdapter'. Does anyone know a way to do this?
I am using the MergeAdapter from: https://github.com/commonsguy/cwac-merge
I want to add an ExpandableListadApter to the MergeAdapter but it currently takes in a type 'ListAdapter'. Does anyone know a way to do this?
AFAIK, the MergeAdapter only supports the ListAdapter interface. Aside from forking the repo and adding support for the ExpandableListAdapter, there's really only one other way I think you could "hack" a quick solution.
Android uses an ExpandableListConnector to map an ExpandableListAdapter to a BaseAdapter. You could literally copy that class over to your project, and instantiate it with your ExpandableListAdapter. That'll give you a ListAdapter compliant adapter you can use with the MergeAdapter.
Note, I've never tried this...but theoretically it should work.