title: AppBarLayout.Behaviour isn't called when scroll on nested view/fragment
body: <p>I have a CoordinatorLayout with collapsing toolbar with AppBarLayout.
  My layout file hierarchy looks like (params like layout_width omitted): </p>
  
  <pre><code>&lt;CoordinatorLayout&gt;
     &lt;AppBarLayout&gt;
        &lt;CollapsingToolbarLayout 
         app:layout_scrollFlags="scroll|exitUntilCollapsed"&gt;
           &lt;LinearLayout id="nested_fragment_host"/&gt;
           &lt;Toolbar/&gt;
        &lt;/CollapsingToolbarLayout&gt;
     &lt;AppBarLayout&gt;
     &lt;NestedScrollView/&gt;
  &lt;/CoordinatorLayout&gt;
  </code></pre>
  
  <p>Expanded area in AppBarLayout is fragment, which I add dynamically:</p>
  
  <pre><code>transaction.replace(R.id.nested_fragment_host, new MyFragment(), FRAGMENT_TAG);
  </code></pre>
  
  <p>Overall, it's working fine, but I need to expand/collapse AppBarLayout automatically if user stop scrolling in middle of expanding/collapsing (so when user removes finger from screen, AppBarLayout should be either expanded or collapsed, no middle states allowed).
  For this task, I decided to use custom Behavior:</p>
  
  <pre><code>public class Behavior extends AppBarLayout.Behavior {
          private int cumulativeDy = 0;
  
          @Override
          public boolean onStartNestedScroll(@NonNull CoordinatorLayout parent, @NonNull AppBarLayout child, @NonNull View directTargetChild, @NonNull View target, int nestedScrollAxes) {
              boolean result = nestedScrollAxes == ViewCompat.SCROLL_AXIS_VERTICAL;
              return result;
          }
  
          @Override
          public void onNestedScroll(@NonNull CoordinatorLayout coordinatorLayout, @NonNull AppBarLayout child, @NonNull View target, int dxConsumed, int dyConsumed, int dxUnconsumed, int dyUnconsumed) {
              super.onNestedScroll(coordinatorLayout, child, target, dxConsumed, dyConsumed, dxUnconsumed, dyUnconsumed);
              cumulativeDy += dyUnconsumed;
          }
  
          @Override
          public void onStopNestedScroll(@NonNull CoordinatorLayout coordinatorLayout, @NonNull AppBarLayout abl, @NonNull View target) {
              super.onStopNestedScroll(coordinatorLayout, abl, target);
  
              if (cumulativeDy &lt; 0) {
                  abl.setExpanded(true, true);
              } else {
                  abl.setExpanded(false, true);
              }
              cumulativeDy = 0;
          }
      }
  </code></pre>
  
  <p>And here comes my issue: it works perfectly fine when AppBarLayout is collapsed and user start to expand it. But in opposite case, when AppBarLayout is expanded - if user start scroll gesture on NestedScrollView - my Behavior class is called and it's fine. But, if user start scroll gesture on AppBarLayout content - Behavior is not called, but AppBarLayout begins to react to scroll gesture. And in this case, if user stops scroll gesture in middle of transition, I can't detect it. Does somebody knows reasons for this behavior? Is it possible to make Behavior class to be called? And if it's not, how to determine that user performs scroll on nested view?</p>