ViewPager2滚动问题?这不是关于嵌套滚动的

发布于 2025-01-21 16:28:12 字数 307 浏览 2 评论 0原文

请注意,这与嵌套滚动无关。 最近,我切换到ViewPager2。我的设置ViewPager2带有TABVIEW(ViewPager2是水平的)。因此,在其中一个片段中具有回收。因此,当我向下滚动回收库时,有时ViePager2切换选项卡。这不是在旧的ViewPager上发生的。因此,如果我需要在不更改ViewPager2选项卡的情况下滚动回收即可,我需要小心地触摸和100%的垂直拖动,就像一条直线一样。如果触摸不是直线,则ViewPager2开关选项卡。如果有人可以将我指向解决方案,我会很高兴的。谢谢,

我确实尝试了NestedScrollable Host包装器,但这无济于事。

Please note this is not about nested scrolling.
Recently i switched to ViewPager2. I have setup viewpager2 with a tabview (viewpager2 is horizontal). So on one of the fragment has a recyclerview. So when I scroll down on the recyclerview, some times the viepager2 switches tabs. This was not happening on the old viewpager. So if I need to scroll the recyclerview without changing the viewpager2 tabs, I need to carefully touch and drag 100% vertically like a straight line. if the touch is not a straight line, the viewpager2 switches tabs. If anyone can point me towards a fix, I would be glad. Thanks

I did try the NestedScrollableHost wrapper and it did not help.

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

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

发布评论

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