Skip to content

Fast Scroll

Roman Tcaregorodtcev edited this page Oct 30, 2019 · 2 revisions

Usage

  1. Add the dependency.
dependencies {
    implementation 'com.github.Omega-R:OmegaRecyclerView:1.9.5@aar' // AndroidX
}
  1. Add OmegaFastScrollRecyclerView to your xml file.
    <com.omega_r.libs.omegarecyclerview_fastscroll.OmegaFastScrollRecyclerView
        android:id="@+id/recyclerview"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:fastScrollAutoHide="scrollbar|track|bubble"
        app:fastScrollVisibility="scrollbar|track|bubble"
        app:fastScrollbarColor="@color/colorAccent"
        app:fastScrollbarWidth="10dp"
        app:reverseLayout="false" />

Attributes

        app:trackDrawable="@drawable/...."
        app:omega_trackColor="@color/...."

        app:bubbleUpDrawable="@drawable/...."
        bubbleUpColor="@color/...."
        app:bubbleDownDrawable="@drawable/...."
        app:bubbleDownColor="@color/...."

        app:position="auto" // or left, right

        app:fastScrollbarColor="@color/...."
        app:fastScrollbarWidth="@dimen/...."

        app:fastScrollTrackPadding="@dimen/...."
        app:fastScrollTrackPaddingLeft="@dimen/...."
        app:fastScrollTrackPaddingTop="@dimen/...."
        app:fastScrollTrackPaddingRight="@dimen/...."
        app:fastScrollTrackPaddingBottom="@dimen/...."

        app:fastScrollVisibility="scrollbar|track|bubble"
        app:fastScrollAutoHide="scrollbar|track|bubble"

        app:fastScrollAnimDuration="300"
        app:fastScrollBubbleAnimDuration="100"
        app:fastScrollHideTrackDelay="1500"
        
        app:fastScrollTextSize="@dimen/...."
        app:fastScrollTextColor="@color/...."