【问题标题】:How do I implement a sectioned list in Android?如何在 Android 中实现分段列表?
【发布时间】:2012-09-06 01:08:18
【问题描述】:

我有一个在 ListView 中显示结果的搜索功能。我发现很难实现按字母顺序排列的列表。请告诉我怎么做。

【问题讨论】:

    标签: android listview indexer


    【解决方案1】:

    您可以使用 Google 找到大量此主题。在我看来,这里有一些最好的教程。基本上,您使用 SectionIndexer 在适配器的 getView 方法中创建索引和显示(或隐藏)视图。

    1,ListView Tips & Tricks #2: Sectioning your ListView,作者:Cyril Mottier。

    2,Pinned Header ListView as in the Contacts app,作者:Peter Kuterna。

    3,IndexableListView Daniel Nam

    【讨论】:

    猜你喜欢
    • 2012-04-13
    • 2019-01-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-09-23
    • 2013-05-15
    • 2020-05-08
    相关资源
    最近更新 更多