private void childLayout(final View child, int periodLength, int outsideLength, int page) {
        if (child == null) {
            return;
        }
        final int index = getLoopIndex(page);
        if (index >= 0) {
            int childX = outsideLength + page * periodLength;
            child.layout(
                    childX,
                    0,
                    childX + periodLength - mDividerWidth,
                    getMeasuredHeight());
            mAdapter.bind(child, index);
        } else {
            child.layout(0, 0, 0, 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