The AppBarLayout--working within a CoordinatorLayout--allows you to scroll the stuff in the app bar, namly the toolbar and tablayout most likely, when you scroll a inner container, like a RecyclerView.
The scrollabel view must have a app:layout_behavior="@string/appbar_scrolling_view_behavior" else it'll overlap the AppBarLayout.
It must also be within the CoordinatorLayout that holds the AppBarLayout.
The app:layout_scrollFlags= flags control how the views within will be scrolled.