[英]RecyclerView jump to top when scrolled up
向上滚动时,无论滚动位置距顶部有多远,我的recyclerView都立即跳到开头。
I realized that my images were not being loaded as fast as I scrolled up. 我意识到我的图像没有像我向上滚动那样快被加载。 So the fix for this issue was to put a placeholder image in my image binding.
因此,解决此问题的方法是将占位符图像放入我的图像绑定中。 I am using Picasso so the fix was like this in my adapter:
我使用的是Picasso,因此修复程序在适配器中如下所示:
Picasso.with(mContext).load(
currentMovie.getBaseUrl()+ currentMovie.getPosterPath()
).placeholder(R.drawable.ic_star).into(mPoster);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.