如何实现这种效果,可以准确停止回收库

发布于 2025-02-13 16:14:44 字数 1132 浏览 0 评论 0原文

我不知道如何描述它,它看起来像是显示下一个项目零件时停止滚动(约200 dp)的回收模型。我正在尝试测量recyclerview.addonscrolllistener中显示的下一个项目的大小,以控制recyclerview滑动状态。

但是,在fling fling时进行的回收浏览回调不够精确(滑动回调大约是1,20,50),以确定快速滑动时的确切位置,实际上,我尝试了recyclerview> > NestedScrollview

这是屏幕录制的视频。

https://cdn.jsdelivr.net/gh/appdev/gallery@master/img/2022-07-07/ebp9do.mp4

“

在快速滚动时,它可以在滚动快速时停止时,它可以在下一个物品停止时停止部分显示。

您可以拖动并加载下一个。或者您可以继续拖累。像这样

在此处输入图像描述“

I don't know how to describe it, it looks like a RecyclerView that stops scrolling when the next Item part is displayed (about 200dp). I'm trying to measure the size of the next Item displayed in RecyclerView.addOnScrollListener to control the RecyclerView sliding state.

But the RecycleView callback onScrollStateChanged while flinging is not precise enough (the sliding callback is something like 1,20,50) to determine the exact position when sliding fast, in fact, I tried RecyclerView and NestedScrollView.

Here's a video of the screen recording.

https://cdn.jsdelivr.net/gh/appdev/gallery@master/img/2022-07-07/ebP9do.mp4

yt0xA3

When scrolling fast, it can stop when the next item is partially displayed.

enter image description here

You can just drag up and load the next one. Or you can keep dragging up. Like this

enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文