I was creating a settings activity/layout for my app. I have a CoordinatorLayout
with an AppBarLayout
and Toolbar
, then beneath that
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.
add this to your Recyclerview :
app:layout_behavior="@string/appbar_scrolling_view_behavior"