如何实现一个切片列表中的Andr​​oid?切片、如何实现、列表中、oid

2023-09-13 00:35:16 作者:暗哑行秋

我有一个搜索功能,它在一个ListView显示效果。我发现很难实现按字母顺序排列切片列表。请给我如何做到这一点的想法。

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.

推荐答案

您可以找到一堆使用谷歌这个话题。在这里,在我看来,一些最好的教程。基本上你使用 SectionIndexer 来创建你的适配器 getView 方法索引和显示(或隐藏)视图。

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的提示和放大器;技巧2:用西里尔Mottier切片你的ListView

2,已固定头的ListView作为联系人应用程序彼得Kuterna。

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

3, IndexableListView 通过丹尼尔南