简体   繁体   English

ScrollView / NestedScrollView中的Recyclerview和Cardview(水平布局)

[英]Recyclerview & Cardview (Horizontal Layout) within a ScrollView/NestedScrollView

I am trying to have nested scrollview and have two recyclerview inside it. 我试图嵌套的scrollview并在其中有两个recyclerview。 The trouble I am facing is that when I try to scroll horizontally the screen goes up and down, even though my action is on a recyclerview. 我面临的问题是,即使我的动作是在recyclerview上,当我尝试水平滚动时,屏幕也会上下移动。 How can I ensure that if I swipe horizontally, the screen would not scroll up and down and if I swipe horizontally on the recyclerview, the horizontal cardview should scroll. 如何确保如果我水平滑动,屏幕将不会上下滚动,并且如果我在recyclerview上水平滑动,则水平cardview应该会滚动。

Any way to achieve it? 有办法实现吗?

This is working in my app. 这在我的应用程序中有效。 But it's true that sometimes is not very smooth and when you try to scroll horizontally it just goes up and down. 但是,确实有些时候不是很平滑,并且当您尝试水平滚动时,它只是会上下移动。

I'm using a NestedScrollView with several RecyclerViews scrolling horizontally inside. 我正在使用NestedScrollView,其中几个RecyclerViews在其中水平滚动。

Anything to make it a bit more responsive would be nice. 使其响应速度更快的任何事情都很好。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM