Android RecyclerView With SectionIndexer
Asked Answered
C

1

13

Anyone know how to use SectionIndexer or a substitute with RecyclerView? SectionIndexer allows ListView to popup sections when fast scrolling.

Coachandfour answered 11/11, 2014 at 21:45 Comment(0)
S
2

The problem is that RecyclerView is something different than a ListView. The RecyclerView only recycles the Views and nothing more. That's the reason that there is also no FastScroll option for it how you might have discovered.

What you can do now:

  1. Implement a LayoutManager with FastScroll and the effect you want yourself
  2. Use a library. (I have found this one: https://github.com/danoz73/RecyclerViewFastScroller but haven't tested it yet)
  3. Use a ListView. I think it is not depreceated with the release of RecyclerView, because it covers use cases like yours.

Check this question for more information: How to add a fast-scroller to the RecyclerView

An interesting article about the difference of ListView and RecyclerView: https://www.bignerdranch.com/blog/recyclerview-part-1-fundamentals-for-listview-experts/

Schoolroom answered 4/4, 2015 at 21:53 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.