Reputation: 4414
In my application I have to include an expandable list view with section headers, I have succeeded doing them separately like list view with headers and expandable list view but when I have to do it both I am stuck,
I got three arraylist of data.
ArrayList<String[]>
headers.
ArrayList<String[]>
list.
ArrayList<String[]>
child.
and I have created separate layouts for all the three. How to create this expandable list view with headers?
Upvotes: 6
Views: 1168
Reputation: 892
Try using the addHeaderView()
method for each of the ArrayList
of headers. This way, you can dynamically create TextViews
or any View
desired to each of the ExpandableListViews
.
Upvotes: 1