Content behind CoordinatorLayout AppBarLayout

后端 未结 2 583
陌清茗
陌清茗 2020-12-10 01:02

I was creating a settings activity/layout for my app. I have a CoordinatorLayout with an AppBarLayout and Toolbar, then beneath that

相关标签:
2条回答
  • 2020-12-10 01:27

    In my case the view under the toolbar wasn't scrollable so even though the accepted answer did stop the overlapping it pushed the content down by the height of the toolbar, pushing elements offscreen. The solution in this case was to also remove the

    app:layout_scrollFlags
    

    from the Toolbar that I was including/sharing with other layouts that had scrolling views.

    0 讨论(0)
  • 2020-12-10 01:30

    add this to your Recyclerview :

    app:layout_behavior="@string/appbar_scrolling_view_behavior"
    
    0 讨论(0)
提交回复
热议问题