Adding fast scroller to your recyclerview

Updated 18 April 2017

Save

Fast scrolling is one of the oldest features provided by Android and other OS(s) as well. This feature helps you to scroll easily in a list which can be huge in size and makes it pretty fast and simple to search for a particular element.

Implementing this is very easy using a library named as Recycler-Fast-Scroll provided by FutureMind.

To get the fast scrolling. First, you need to add the dependency to your module level build.gradle.

After this, you need to add the scrolling layout in the view and for that open the XML file of your activity or fragment and add the following code

This will provide you the bar which will be used to scroll through the recyclerview elements and it is customizable too.

Now, you need to attach this fast_scroller to the recyclerview and for that, you can follow the below code segment

And to get the bubble which will display the character you need implement SectionTitleProvider in the recyclerview adapter and override its getSectionTitle function.

 

That’s all, You can enjoy your fast scrolling feature wherever you want.

Thank you very much, this is Vedesh Kumar signing off.

author
. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


Be the first to comment.

Start a Project


    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home