title: CoordinatorLayout + NestedScrolling Custom Behaviour for Grand-Child
body: <p>I'm trying to act on Scroll Events inside(!) a (Nested)Scrollview.</p>
  
  <p>I have an Item inside a Scrollview that i want to "peek" (translate to visible screen area) for a few sec if it's not initially visible in the scrollview/screen. But as soon as the container is scrolled, i want to hide it (translate back to origin).</p>
  
  <p>Therefore i'm trying to use a CoordinatorLayout Behavior to not tightly couple the scrollView and my (custom) View.</p>
  
  <p>Following <a href="https://medium.com/google-developers/intercepting-everything-with-coordinatorlayout-behaviors-8c6adc140c26#.qibnfxo0n" rel="nofollow">the article</a>, I tried to write a custom behavior, but figured out, that I cannot apply this Behavior on my view, as it's not a child of the CoordinatorLayout. If i have to set it on a direct child, how can i then act on the great-grand child?</p>
  
  <p>How could this be achieved?</p>
  
  <p>Layout looks sth like that:</p>
  
  <pre><code>&lt;CoordinatorLayout&gt;
     &lt;NestedScrollView&gt;
         &lt;LinearLayout&gt;
            ...
            &lt;MyView/&gt;
         &lt;LinearLayout/&gt;
     &lt;/NestedScrollView&gt;
  &lt;/CoordinatorLayout&gt;
  </code></pre>
  
  <p>The behaviour is pretty straight forward:</p>
  
  <pre>
  public class MyBehaviour extends CoordinatorLayout.Behavior{
  
      ...
  
      @Override
      public boolean onStartNestedScroll(CoordinatorLayout coordinatorLayout, View child, View directTargetChild, View target, int
              nestedScrollAxes) {
          return true;
      }
  
      @Override
      public void onNestedScroll(CoordinatorLayout coordinatorLayout, View child, View target, int dxConsumed, int dyConsumed, int
              dxUnconsumed, int dyUnconsumed) {
          super.onNestedScroll(coordinatorLayout, child, target, dxConsumed, dyConsumed, dxUnconsumed, dyUnconsumed);
  
          // act on MyView
      }
  }
  </pre>