简体   繁体   中英

Android ListView section header

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?

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

You can add several headers using addHeaderView (View v) . Your views are then handled by a HeaderViewListAdapter

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM