What adapter to use for ExpandableListView with non-TextView views?
- by David
I have an ExpandableListView in which I'd like to have controls other than TextView. Apparently, SimpleExandableListViewAdapter assumes all the controls are TextViews. A cast exception is generated if they are not.
What is the recommended solution?
Options I can think of include:
- Use some other included adapter. But I can't tell if they all have the same assumption.
- Create my own adapter. Is there a doc which describes the contract, ie the sequence of method calls an adapter will encounter?
I expected the existing adapters to require the views to conform to some interface to allow any conforming view to be used, rather than hardcode to textview and limit where they can be used.