int scrollToPositionAtProgress(float touchFraction) {
        int priorPosition = materialScrollBar.recyclerView.computeVerticalScrollOffset();
        int exactItemPos;
        if(customScroller == null) {
            int spanCount = 1;
            if(materialScrollBar.recyclerView.getLayoutManager() instanceof GridLayoutManager) {
                spanCount = ((GridLayoutManager) materialScrollBar.recyclerView.getLayoutManager()).getSpanCount();
            }

            // Stop the scroller if it is scrolling
            materialScrollBar.recyclerView.stopScroll();

            getCurScrollState();

            //The exact position of our desired item
            exactItemPos = (int) (getAvailableScrollHeight() * touchFraction);

            //Scroll to the desired item. The offset used here is kind of hard to explain.
            //If the position we wish to scroll to is, say, position 10.5, we scroll to position 10,
            //and then offset by 0.5 * rowHeight. This is how we achieve smooth scrolling.
            LinearLayoutManager layoutManager = ((LinearLayoutManager) materialScrollBar.recyclerView.getLayoutManager());
            try {
                layoutManager.scrollToPositionWithOffset(spanCount * exactItemPos / scrollPosState.rowHeight,
                        -(exactItemPos % scrollPosState.rowHeight));
            } catch (ArithmeticException e) { /* Avoids issues where children of RV have not yet been laid out */ }
        } else {
            if(layoutManager == null) {
                layoutManager = ((LinearLayoutManager) materialScrollBar.recyclerView.getLayoutManager());
            }
            exactItemPos = customScroller.getItemIndexForScroll(touchFraction);
            int offset = (int) (customScroller.getDepthForItem(exactItemPos) - touchFraction * getAvailableScrollHeight());
            layoutManager.scrollToPositionWithOffset(exactItemPos, offset);
            return 0;
        }
        return exactItemPos - priorPosition;
    }
Scrolls to the specified fraction of the RV

@param touchFraction the fraction of the RV to scroll through
@return the distance traveled by the RV in the transformation applied by this method.
+ is downward, - upward.
lib/src/main/java/com/turingtechnologies/materialscrollbar/ScrollingUtilities.java