@Override
    public void setAdapter(Adapter adapter) {
        if (getAdapter() != null) {
            getAdapter().unregisterAdapterDataObserver(mScrollOffsetInvalidator);
        }

        if (adapter != null) {
            adapter.registerAdapterDataObserver(mScrollOffsetInvalidator);
        }

        super.setAdapter(adapter);
    }
The current scroll state of the recycler view.  We use this in onUpdateScrollbar()
and scrollToPositionAtProgress() to determine the scroll position of the recycler view so
that we can calculate what the scroll bar looks like, and where to jump to from the fast
scroller.
android/third_party/recyclerview-fastscroll/src/main/java/com/simplecityapps/recyclerview_fastscroll/views/FastScrollRecyclerView.java