Scrolling is not working with CoordinatorLayout + parallax image + BottomSheetLayout
<h2>Introduction</h2>

<p>I have an activity, which implements a common pattern with parallax header image and scrolling content using <code>CoordinatorLayout</code>, <code>AppBarLayout</code> and <code>CollapsingToolbarLayout</code>. My xml layout looks like this:</p>

<pre><code>&lt;android.support.design.widget.CoordinatorLayout
    android:fitsSystemWindows="true"
    android:layout_height="match_parent"
    android:layout_width="match_parent"&gt;

    &lt;android.support.design.widget.AppBarLayout
        android:fitsSystemWindows="true"
        android:id="@+id/appbar"
        android:layout_height="wrap_content"
        android:layout_width="match_parent"
        android:theme="@style/AppTheme.AppBarOverlay"&gt;

        &lt;android.support.design.widget.CollapsingToolbarLayout
            android:fitsSystemWindows="true"
            android:layout_height="wrap_content"
            android:layout_width="match_parent"
            app:contentScrim="?attr/colorPrimary"
            app:layout_scrollFlags="scroll|exitUntilCollapsed"&gt;

            &lt;TextView
                android:background="@color/colorAccent"
                android:gravity="center"
                android:layout_height="250dp"
                android:layout_width="match_parent"
                android:text="ParallaxImage"
                app:layout_collapseMode="parallax"/&gt;

            &lt;android.support.v7.widget.Toolbar
                android:id="@+id/toolbar"
                android:layout_height="?attr/actionBarSize"
                android:layout_width="match_parent"
                app:layout_collapseMode="pin"
                app:popupTheme="@style/AppTheme.PopupOverlay"/&gt;

        &lt;/android.support.design.widget.CollapsingToolbarLayout&gt;
    &lt;/android.support.design.widget.AppBarLayout&gt;

    &lt;android.support.v4.widget.NestedScrollView
        android:id="@+id/content"
        android:layout_height="match_parent"
        android:layout_width="match_parent"
        app:layout_behavior="@string/appbar_scrolling_view_behavior"&gt;

        &lt;TextView
            android:layout_height="wrap_content"
            android:layout_margin="@dimen/text_margin"
            android:layout_width="wrap_content"
            android:text="@string/large_text"/&gt;
    &lt;/android.support.v4.widget.NestedScrollView&gt;
&lt;/android.support.design.widget.CoordinatorLayout&gt;
</code></pre>

<p>As you can see in the gif animation below, everything works correctly. You can scroll the whole screen from the content <code>NestedScrollView</code> as well as from the <code>Toolbar</code> or the parallax <code>View</code>.</p>

<p><a href="https://i.stack.imgur.com/BBXqL.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BBXqL.gif" alt="AppBarLayout + NestedScrollView"></a></p>

<h2>Problem</h2>

<p>Google introduced a <code>BottomSheetBehavior</code> class (Android design support library <a href="http://android-developers.blogspot.cz/2016/02/android-support-library-232.html" rel="nofollow noreferrer">23.2</a>) to help developers to implement <a href="https://www.google.com/design/spec/components/bottom-sheets.html" rel="nofollow noreferrer">Bottom sheets</a>. My xml layout with Bottom sheet looks like this:</p>

<pre><code>&lt;android.support.design.widget.CoordinatorLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fitsSystemWindows="true"&gt;

    &lt;android.support.design.widget.AppBarLayout
        android:id="@+id/appbar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:fitsSystemWindows="true"
        android:theme="@style/AppTheme.AppBarOverlay"&gt;
        &lt;!-- ommited --&gt;
    &lt;/android.support.design.widget.AppBarLayout&gt;

    &lt;android.support.v4.widget.NestedScrollView
        android:id="@+id/content"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:layout_behavior="@string/appbar_scrolling_view_behavior"&gt;
        &lt;!-- ommited --&gt;
    &lt;/android.support.v4.widget.NestedScrollView&gt;

    &lt;LinearLayout
        android:id="@+id/bottomSheet"
        android:layout_width="match_parent"
        android:layout_height="400dp"
        android:background="@android:color/holo_blue_bright"
        android:orientation="vertical"
        app:behavior_peekHeight="?attr/actionBarSize"
        app:layout_behavior="android.support.design.widget.BottomSheetBehavior"&gt;

        &lt;TextView
            android:layout_width="match_parent"
            android:layout_height="?attr/actionBarSize"
            android:gravity="center_vertical"
            android:paddingLeft="16dp"
            android:paddingRight="16dp"
            android:text="BottomSheetLayout"
            android:textColor="@android:color/white"/&gt;

        &lt;android.support.v4.widget.NestedScrollView
            android:id="@+id/bottomSheetContent"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:scrollbars="vertical"&gt;

            &lt;TextView
                android:layout_width="match_parent"
                android:layout_height="400dp"
                android:background="@android:color/holo_green_dark"
                android:padding="16dp"
                android:text="@string/large_text"
                android:textColor="@android:color/white"/&gt;

        &lt;/android.support.v4.widget.NestedScrollView&gt;
    &lt;/LinearLayout&gt;

&lt;/android.support.design.widget.CoordinatorLayout&gt;
</code></pre>

<p>And the result looks like this:</p>

<p><a href="https://i.stack.imgur.com/FR7uI.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FR7uI.gif" alt="enter image description here"></a></p>

<p>As you can see, Now I am not able to scroll, if I start to scroll from the parallax <code>View</code>. Scrolling from content <code>NestedScrollView</code> and from the <code>Toolbar</code> works as expected. </p>

<h2>Question</h2>

<p>How can I manage the scrolling to work from parallax <code>View</code> as well (the same way as in the first gif animation)? It seems that the <code>BottomSheetBehavior</code> intercepts touch events and prevents the <code>AppBarLayout (AppBarLayoutBehavior)</code> to handle the scroll. But the weird thing is that scrolling from <code>Toolbar</code> works and both parallax <code>View</code> and <code>Toolbar</code> are children of the <code>AppBarLayout</code>.    </p>