Reputation: 193
I want to add some headers in between list items in a listview. For eg:
My list is :
In my Listview, i want it to be like this:
Please help me on how can i add/inflate views in between Its a custom listview, I have a custom adapter which inflates the listview. The days(Monday, tuesday) card has other elements like ImageView, button, textView etc.
Upvotes: 2
Views: 75
Reputation: 443
You are looking for headers and I really encourage you to use a RecyclerView instead of a ListView.
But, creating adapters manually usually takes a lot of boilerplate, so we can use this library to speed up development: https://github.com/mikepenz/FastAdapter
Check those files to see how headers are implemented there:
Upvotes: 1