【发布时间】:2018-11-19 03:01:12
【问题描述】:
我的应用程序设计
屏幕 - 1
<NestedScrollview>
<LinearLayout orientation:horizontal">
<RecyclerView-1>
<Framelayout>(contains Recyclerview-2)
</NestedScroll>
屏幕 - 2
<NestedScrollview>
<LinearLayout orientation:horizontal">
<RecyclerView-1>
<Framelayout> (fragment changed, contains Recyclerview-3)
</NestedScroll>
现在,如果用户在屏幕 1 上,则两个回收视图将同时滚动,但在屏幕 2 上,如果用户滚动 RV1,则只有 RV1 会滚动,如果 RV3 滚动则 RV3 将滚动。尝试了各种停止滚动,但无法停止嵌套滚动视图的滚动。
【问题讨论】:
-
setnestedscrollingenabled将其设置为 false。 -
在recyclerview
android:descendantFocusability="blocksDescendants"中试试这个添加属性。 -
@farhana setnestedscrollingenabled 将平滑 RV 的滚动,但我需要禁用 NSV 的滚动
-
你找到解决办法了吗?
标签: android android-recyclerview android-framelayout android-nestedscrollview