【问题标题】:RecyclerView Scroll Not Working Inside NestedScrollViewRecyclerView 滚动在 NestedScrollView 内不起作用
【发布时间】:2021-02-11 09:04:24
【问题描述】:

我检查了很多答案,但没有一个解决方案适合我!

我的布局是:

<NestedScrollView>
  <LinearLayout>
     <OtherLayouts>
     <LinearLayout>
       <RecyclerView>
       <OtherLayouts>
     </LinearLayout>
  </LinearLayout>
</NestedScrollView>

我的问题是我最初必须将 recyclerView 滚动到特定位置。 我努力了: recyclerView.setNestedScrollingEnabled(false)

我的 recyclerView 的高度已经设置为 wrap_content

很高兴提供任何其他详细信息。如果您知道解决方案,请提供帮助!

【问题讨论】:

    标签: android android-recyclerview android-nestedscrollview


    【解决方案1】:

    您是否在 RecyclerView 中使用此行

    app:layout_behavior="@string/appbar_scrolling_view_behavior"
    

    将管理其余的事情。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-06-01
      • 1970-01-01
      • 1970-01-01
      • 2017-02-05
      • 2019-05-25
      • 2016-05-18
      • 1970-01-01
      相关资源
      最近更新 更多