如何实现一个切片列表中的Andr​​oid? [英] How do I implement a sectioned list in Android?

查看:127
本文介绍了如何实现一个切片列表中的Andr​​oid?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个搜索功能,它在一个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 通过丹尼尔南

这篇关于如何实现一个切片列表中的Andr​​oid?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆