private void setupIndicator(Indicator indicator, boolean addSpaceSide) {
        MaterialScrollBar.this.indicator = indicator;
        indicator.testAdapter(recyclerView.getAdapter());
        indicator.setRTL(rtl);
        indicator.linkToScrollBar(MaterialScrollBar.this, addSpaceSide);
        indicator.setTextColor(textColor);
    }
Shared code for the above method.
lib/src/main/java/com/turingtechnologies/materialscrollbar/MaterialScrollBar.java