Reputation: 16451
Are there any built-in ways for creating Android ListView
section headers? If not what is the easiest way for doing so, using XML markup as far as possible?
Upvotes: 3
Views: 8152
Reputation: 13494
You can add several headers using addHeaderView (View v). Your views are then handled by a HeaderViewListAdapter
Upvotes: 1
Reputation: 6605
No. You can make your own implementation or use a third-party library. I suggest you to use this one in case you want them to stick at the top of the list:
https://github.com/emilsjolander/StickyListHeaders
Upvotes: 6