I encountered a problem on first launch of a fragment. It seems like CoordinatorLayout adds a negative margin to NestedScrollView which is equal to CollapsingToolbarLayout\'
Adding minHeight attribute prevents CollapsingToolbarLayout from unexpected behavior:
minHeight