YCScrollPager icon indicating copy to clipboard operation
YCScrollPager copied to clipboard

OnPagerListener回调中当到达最后一页时onPageSelected(int position, boolean isBottom)中position为0

Open blesslz opened this issue 2 years ago • 0 comments

PagerLayoutManager layoutManager = new PagerLayoutManager(this, OrientationHelper.VERTICAL); layoutManager.setOnViewPagerListener(new OnPagerListener() { @Override public void onInitComplete() { startPlay(0); }

        @Override
        public void onPageRelease(boolean isNext, int position) {

        }

        @Override
        public void onPageSelected(int position, boolean isBottom) {
           // 问题说明:滑到动RecycleView的最后一页时 position边为了0
            if (position == mCurPos) return;
            startPlay(position);
        }
    });

blesslz avatar Mar 12 '22 09:03 blesslz