Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I implement a sectioned list in Android?

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.

like image 636
RajeshVijayakumar Avatar asked Apr 15 '26 09:04

RajeshVijayakumar


1 Answers

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

like image 56
Trung Nguyen Avatar answered Apr 16 '26 21:04

Trung Nguyen