public void onPageScrolledInternal(int position, float positionOffset, int positionOffsetPixels) {
        if (!mOnPageChangeListeners.isEmpty()) {
            for (OnPageChangeListener onPageChangeListener : mOnPageChangeListeners) {
                onPageChangeListener.onPageScrolled(getLoopIndex(position), positionOffset, positionOffsetPixels);
            }
        }
        if (mPageTransformer != null) {
            transform(position, 1f - positionOffset);
            transform(position + 1, positionOffset);
            transform(position - 1, 0);
            transform(position + 2, 0);
        }
    }
A banner view that can automatically or manually scroll in a loop
Created by Marksss on 2019/8/12.
imitate/src/main/java/com/engineer/imitate/ui/widget/opensource/InfiniteBannerView.java