title: Pass scroll event to another view
body: <p>I have been using android design support library for collapsing toolbar layout.
  Everything works fine except that I want to scroll the whole view on scrolling content in collapsingBarlayout</p>
  
  <p>Here's the xml layout :</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;android.support.v4.widget.DrawerLayout
      xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      android:id="@+id/drawer_layout"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:fitsSystemWindows="true"&gt;
  
  
      &lt;android.support.design.widget.CoordinatorLayout
          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="420dp"
              android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
              android:fitsSystemWindows="true"&gt;
  
              &lt;android.support.design.widget.CollapsingToolbarLayout
                  android:id="@+id/collapsing_toolbar"
                  android:layout_width="match_parent"
                  android:layout_height="match_parent"
                  app:layout_scrollFlags="scroll|exitUntilCollapsed"
                  app:contentScrim="?attr/colorPrimary"
                  app:expandedTitleMarginStart="48dp"
                  app:expandedTitleMarginEnd="64dp"
                  android:fitsSystemWindows="true"&gt;
  
                  &lt;android.support.v4.view.ViewPager
                      xmlns:android="http://schemas.android.com/apk/res/android"
                      android:id="@+id/pager"
                      android:layout_width="match_parent"
                      android:layout_height="match_parent"
                      android:scaleType="centerCrop"
                      app:layout_collapseMode="parallax"
                      app:layout_collapseParallaxMultiplier="0.8"
                      android:fitsSystemWindows="true"
                      app:layout_behavior="@string/appbar_scrolling_view_behavior"
                      /&gt;
  
                  &lt;android.support.v7.widget.Toolbar
                      android:id="@+id/toolbar"
                      android:layout_width="match_parent"
                      android:layout_height="?attr/actionBarSize"
                      app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
                      app:layout_collapseMode="pin" /&gt;
  
              &lt;/android.support.design.widget.CollapsingToolbarLayout&gt;
  
          &lt;/android.support.design.widget.AppBarLayout&gt;
  
          &lt;android.support.v4.widget.NestedScrollView
              android:id="@+id/scroll_view"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:clipToPadding="false"
              app:layout_behavior="@string/appbar_scrolling_view_behavior"&gt;
  
              &lt;include layout="@layout/activity_item_detail"
                  /&gt;
  
          &lt;/android.support.v4.widget.NestedScrollView&gt;
  
          &lt;android.support.design.widget.FloatingActionButton
              android:id="@+id/fab_button"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_margin="@dimen/activity_vertical_margin"
              android:clickable="true"
              android:src="@android:drawable/ic_menu_call"
              app:layout_anchor="@+id/appbar"
              app:layout_anchorGravity="bottom|right|end"
              style="@style/floating_action_button"
              /&gt;
  
      &lt;/android.support.design.widget.CoordinatorLayout&gt;
  
      &lt;android.support.design.widget.NavigationView
          android:id="@+id/navigation_view"
          android:layout_width="wrap_content"
          android:layout_height="match_parent"
          android:layout_gravity="start"
          app:headerLayout="@layout/drawer_header"
          app:menu="@menu/drawer"/&gt;
  &lt;/android.support.v4.widget.DrawerLayout&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/Ystmk.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/Ystmk.jpg" alt="enter image description here"></a>
  <a href="https://i.stack.imgur.com/06nGg.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/06nGg.jpg" alt="enter image description here"></a></p>
  
  <p>Scrolling the content works if touched on anything except viewpager/toolbar. 
  I need the same scroll experience on touching and scrolling vertically on view pager also.
  Had tried overriding onTouchEvent of view pager to pass ACTION_UP motion event to scroll_view.</p>
  
  <pre><code>nestedScrollView.post(new Runnable() {
      @Override
      public void run() {
          mPager.setOnTouchListener(new View.OnTouchListener() {
              @Override
              public boolean onTouch(View v, MotionEvent event) {
                  if (event.getAction() == MotionEvent.ACTION_UP) {
                      return nestedScrollView.onTouchEvent(event);
                  } else {
                      return v.onTouchEvent(event);
                  }
              }
          });
      }
  });
  </code></pre>
  
  <p>But it doesn't work. Please help with a workaround/any hack that can quickly fix this up.</p>