How do I implement a sectioned list in Android?

拈花ヽ惹草 提交于 2019-12-03 11:19:15

问题


I have a search feature which displays results in a ListView. I'm finding it difficult to implement an alphabetical sectioned list. Please give me idea of how to do it.


回答1:


You can find bunch of this topic using Google. Here some best tutorial in my opinion. Basically you use SectionIndexer to create an index and show(or hide) view in getView method of your adapter.

1, ListView Tips & Tricks #2: Sectioning your ListView by Cyril Mottier.

2, Pinned Header ListView as in the Contacts app by Peter Kuterna.

3, IndexableListView by Daniel Nam



来源:https://stackoverflow.com/questions/12397900/how-do-i-implement-a-sectioned-list-in-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!