{"id":13396134,"url":"https://github.com/danoz73/RecyclerViewFastScroller","last_synced_at":"2025-03-13T22:31:45.106Z","repository":{"id":27269993,"uuid":"30742852","full_name":"danoz73/RecyclerViewFastScroller","owner":"danoz73","description":"A Fast Scroller for the RecyclerView world!","archived":false,"fork":false,"pushed_at":"2020-03-30T19:14:11.000Z","size":462,"stargazers_count":1131,"open_issues_count":57,"forks_count":211,"subscribers_count":47,"default_branch":"master","last_synced_at":"2024-10-29T17:47:10.345Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/danoz73.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-13T06:03:21.000Z","updated_at":"2024-10-25T08:30:55.000Z","dependencies_parsed_at":"2022-09-12T14:21:46.907Z","dependency_job_id":null,"html_url":"https://github.com/danoz73/RecyclerViewFastScroller","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danoz73%2FRecyclerViewFastScroller","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danoz73%2FRecyclerViewFastScroller/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danoz73%2FRecyclerViewFastScroller/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danoz73%2FRecyclerViewFastScroller/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danoz73","download_url":"https://codeload.github.com/danoz73/RecyclerViewFastScroller/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243493880,"owners_count":20299730,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-30T18:00:41.062Z","updated_at":"2025-03-13T22:31:44.731Z","avatar_url":"https://github.com/danoz73.png","language":"Java","funding_links":[],"categories":["Index `(light-weight pages)`","Index","SideBar"],"sub_categories":[],"readme":"RecyclerViewFastScroller\n===================================\n\nThe RecyclerViewFastScroller is a widget that can be added to a layout and connected to a RecyclerView for fast scrolling.\n\nThis project is a demonstration of using the RecyclerViewFastScroller widget in a simple activity that uses the basic workings of com.example.android.recyclerview from the v21 Android samples.\n\n![RecyclerViewFastScroller screenshot](http://i.imgur.com/IozUtucl.png)\n![RecyclerViewFastScroller with section indicator screenshot](http://i.imgur.com/2zBwIlwl.png)\n\nAs of [`b3e2d2f`](https://github.com/danoz73/RecyclerViewFastScroller/commit/b3e2d2fa8284dea31fbc5f9f218199f2a187a657), there is now support for adding a `SectionIndicator` widget, which connects to the scroller. This adds functionality similar to Google's Lollipop Contacts application.\n\n### Download\n\nYou can grab the current version of the library from maven central\n```java\ncompile 'xyz.danoz:recyclerviewfastscroller:0.1.3'\n```\n\n### Usage\n\nBelow are some simple steps to using a RecyclerViewFastScroller. Currently, there is only a single implementation (`VerticalRecyclerViewFastScroller`), so that will be used here.\n\nThe best way to check everything out is to peruse the example code and run the sample Application. See how `VerticalRecyclerViewFastScroller` is utilized in the `recycler_view_frag.xml`.\n\n##### Example Code\n\n1) In the activity or fragment XML where your `RecyclerView` resides, include a `VerticalRecyclerViewFastScroller` object. The following example would be in a relative layout:\n\n```java\n...\n  \u003candroid.support.v7.widget.RecyclerView\n      android:id=\"@+id/recyclerView\"\n      android:layout_width=\"match_parent\"\n      android:layout_height=\"match_parent\"\n      /\u003e\n\n  \u003cxyz.danoz.recyclerviewfastscroller.vertical.VerticalRecyclerViewFastScroller\n      android:id=\"@+id/fast_scroller\"\n      android:layout_width=\"@dimen/however_wide_you_want_this\"\n      android:layout_height=\"match_parent\"\n      android:layout_alignParentRight=\"true\"\n      /\u003e\n...\n```\n\n2) In your fragment or activity where you setup layout programmatically, simply hook up the fast scroller to the recycler as follows:\n\n```java\n...\n  public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n      View rootView = inflater.inflate(R.layout.recycler_view_frag, container, false);\n      ...\n      \n      // Grab your RecyclerView and the RecyclerViewFastScroller from the layout\n      RecyclerView recyclerView = (RecyclerView) rootView.findViewById(R.id.recyclerView);\n      VerticalRecyclerViewFastScroller fastScroller = (VerticalRecyclerViewFastScroller) rootView.findViewById(R.id.fast_scroller);\n      \n      // Connect the recycler to the scroller (to let the scroller scroll the list)\n      fastScroller.setRecyclerView(recyclerView);\n      \n      // Connect the scroller to the recycler (to let the recycler scroll the scroller's handle)\n      recyclerView.setOnScrollListener(fastScroller.getOnScrollListener());\n      \n      ...\n      return rootView;\n  }\n...\n```\n\n###### Optional usage\n\nThere are currently a few attributes that can be used to customize the vertical fast scroller:\n\n```java\n  \u003cattr name=\"rfs_barColor\" format=\"color|reference\" /\u003e\n  \u003cattr name=\"rfs_barBackground\" format=\"reference\" /\u003e\n  \u003cattr name=\"rfs_handleColor\" format=\"color|reference\" /\u003e\n  \u003cattr name=\"rfs_handleBackground\" format=\"reference\" /\u003e\n```\n\nYou can see usage of some of these in the example `recycler_view_with_fast_scroller_fragment.xml` which is the layout for the example app's single fragment.\n\n##### SectionIndicators\n\nRefer to `RecyclerViewWithSectionIndicatorFragment` and the corresponding `recycler_view_with_fast_scroller_section_title_indicator_fragment.xml` in order to find an implementation that adds the Lollipop-Contacts-like section indicator. In addition to the above, you will need to include the indicator in your layout (example here from `recycler_view_with_fast_scroller_section_title_indicator_fragment.xml`):\n\n```java\n...\n    \u003cxyz.danoz.recyclerviewfastscroller.sample.ui.example.ColorGroupSectionTitleIndicator\n      android:id=\"@+id/fast_scroller_section_title_indicator\"\n      android:layout_width=\"wrap_content\"\n      android:layout_height=\"@dimen/list_item_height\"\n      android:layout_toLeftOf=\"@id/fast_scroller\"\n      android:layout_toStartOf=\"@id/fast_scroller\"\n\n      recyclerviewfastscroller:rfs_backgroundColor=\"@android:color/white\"\n      recyclerviewfastscroller:rfs_textColor=\"@android:color/black\"\n       /\u003e\n...\n```\nand then connect it to the scroller in the fragment:\n```java\n...\n    // Connect the section indicator to the scroller\n    fastScroller.setSectionIndicator(sectionTitleIndicator);\n...\n```\n\n### Contribution\n\nFeel free to submit pull requests and create issues! I will try to be vigilant about maintaining this library, but may not always be as fast as you would like ;)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanoz73%2FRecyclerViewFastScroller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanoz73%2FRecyclerViewFastScroller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanoz73%2FRecyclerViewFastScroller/lists"}