【发布时间】:2019-01-19 17:56:04
【问题描述】:
我在复杂层次结构中有一个水平 RecyclerView,看起来像这样 -
<ViewPager id="+@id/first">
<ViewPager id="+@id/second"> this viewpager is taking away the scroll event
<SwipeToRefreshLayout>
<RecyclerView> //this one is vertical
<RecyclerView id="@id/rv1"> //this one is horizontal
<RecyclerView id="@id/rv2"> //this one is working fine (different type)
</RecyclerView>
</SwipeToRefreshLayout>
</ViewPager>
</ViewPager>
现在的问题是第二个 ViewPager 正在劫持 Horizontal RV 的滚动。该垂直房车中有 2 种水平房车(RV1 和 RV2)。但只有其中一个(RV1)面临这个问题。第二个(RV2)工作正常。 此外,当我按住时,滚动工作正常。当 RV1 已经在滚动并且没有稳定下来时,滚动也可以正常工作。 我已经提到了其他关于将nestedScrolling设置为false的答案。似乎没有任何效果。
【问题讨论】:
标签: android android-recyclerview android-viewpager android-nestedscrollview