简体   繁体   English

向上滚动时,RecyclerView跳到顶部

[英]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.

相关问题 当recyclerview滚动/返回顶部时展开appbarlayout - Expand appbarlayout when recyclerview is scrolled/fling to top 使 recyclerview 不跳到顶部 - Making recyclerview not jump to top 如何检测用户何时滚动到RecyclerView中的最顶层项目 - How to detect when user have scrolled to the top most item in a RecyclerView android,当在viewpager中滚动recyclerview时,如何使父scrollview滚动到顶部 - android when recyclerview in a viewpager is scrolled, how to top parent scrollview scroll 如何检测 RecyclerView 何时滚动到最顶部位置 - How to detect when RecyclerView is scrolled to most top position 当我将水平Recyclerview滚动到垂直Recyclerview时,Nestedscrollview会跳起来 - Nestedscrollview jump up when I scroll horizontal recyclerview into vertical recyclerview 仅当滚动视图以使最新条目不可见时,如何在 RecyclerView 列表中显示“跳转到最新”? - How to show "jump to latest" in a RecyclerView list only when the view is scrolled such that latest entries are not visible? RecyclerView 向上/向下滚动侦听器 - RecyclerView scrolled UP/DOWN listener 检查RecyclerView是否在顶部滚动(findFirstCompletelyVisibleItemPosition将不起作用) - Check if RecyclerView is scrolled on top (findFirstCompletelyVisibleItemPosition will not work) RecyclerView中的EditText仅在滚动到顶部时才会聚焦 - EditText in RecyclerView only focused if scrolled to the top
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM