We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
首次创建后,ImageAdapter只会创建第一个。当触发滑动后才会创建第二个item(可通过日志测试)。 当第二章图片较大,如果滑动才触发加载会导致先展示不出来,不符合预加载。
内部使用的setOffscreenPageLimit未生效。 mViewPager2.setOffscreenPageLimit(2);
ScrollSpeedManger.reflectLayoutManager(this); 通过反射替换了ViewPager2中RecyclerView中的LinearLayoutManager。
ViewPager2中LinearLayoutManagerImpl默认会通过mOffscreenPageLimit处理预加载(计算屏幕外需要加载item)。
适配: 如果保留ScrollSpeedManger,需要适配ViewPager2中LinearLayoutManagerImpl中原有方法
The text was updated successfully, but these errors were encountered:
No branches or pull requests
预加载:默认首次不预加载,预加载数量也不是SDK中设置的 2(ScrollSpeedManger引发)
v:2.2.3
使用配置:
问题
首次创建后,ImageAdapter只会创建第一个。当触发滑动后才会创建第二个item(可通过日志测试)。
当第二章图片较大,如果滑动才触发加载会导致先展示不出来,不符合预加载。
内部使用的setOffscreenPageLimit未生效。
mViewPager2.setOffscreenPageLimit(2);
原因:
ScrollSpeedManger.reflectLayoutManager(this);
通过反射替换了ViewPager2中RecyclerView中的LinearLayoutManager。
ViewPager2中LinearLayoutManagerImpl默认会通过mOffscreenPageLimit处理预加载(计算屏幕外需要加载item)。
适配:
如果保留ScrollSpeedManger,需要适配ViewPager2中LinearLayoutManagerImpl中原有方法
The text was updated successfully, but these errors were encountered: