滚动监听的偏移一直为 0
作者: Dullyoung创建于 2026年7月14日更新于 2026年7月14日
<img width="1205" height="791" alt="Image" src="https://GitHub.com/user-attachments/assets/882aa7d6-3bbb-40ea-bb8b-51443db14d6b" /> The problem is that the condition realPosition == getCurrentItem() - 1: when the scroll is more than half, onPageSelected is called first, and getCurrentItem() has become the next page. After that, most callbacks with 0 < positionOffset < 1 do not meet the condition and are dropped. Those that can be passed to addOnPageChangeListener are often only near the boundaries, with positionOffset == 0.
内容来源: youth5201314/banner