Anyone know how to use SectionIndexer or a substitute with RecyclerView? SectionIndexer allows ListView to popup sections when fast scrolling.
Android RecyclerView With SectionIndexer
Asked Answered
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:
- Implement a LayoutManager with FastScroll and the effect you want yourself
- Use a library. (I have found this one: https://github.com/danoz73/RecyclerViewFastScroller but haven't tested it yet)
- 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/
© 2022 - 2024 — McMap. All rights reserved.