DingMouRen / LayoutManagerGroup

:point_right: Customize the LayoutManager of RecyclerView(自定义LayoutManager)
4.98k stars 679 forks source link

ViewPagerLayoutManager: 快速滑到顶部第0个Item位置,onPageSelected()方法不会回调! #61

Open eekidu opened 4 years ago

eekidu commented 4 years ago

如题!

Carlxx commented 4 years ago

如题!

zhangyunhong commented 3 years ago

我觉得可以判断 在回调的时候判断一下是否是第0个位置 或者你在if (mOnViewPagerListener != null && getChildCount() <= 2) { mOnViewPagerListener.onPageSelected(positionIdle, positionIdle == getItemCount() - 1); } 有时候getChildCount() 不是1