title: How AppBarLayout.ScrollingViewBehavior's math works?
body: <p>I would watch the math flow of the <code>offsetChildAsNeeded</code> method in AppBarLayout.ScrollingViewBehavior on running scrolling changes. </p>
  
  <p>As it is private method and private is <code>mOffsetDelta</code>, how can programmatically monitor them?</p>
  
  <p>(It is not clear how the method uses <code>offset</code> too.)</p>
  
  <pre><code>private void offsetChildAsNeeded(CoordinatorLayout parent, View child, View dependency) {
      final CoordinatorLayout.Behavior behavior =
                  ((CoordinatorLayout.LayoutParams) dependency.getLayoutParams()).getBehavior();
      if (behavior instanceof Behavior) {
          // Offset the child, pinning it to the bottom the header-dependency, maintaining
          // any vertical gap, and overlap
          final Behavior ablBehavior = (Behavior) behavior;
          final int offset = ablBehavior.getTopBottomOffsetForScrollingSibling();
          ViewCompat.offsetTopAndBottom(child, (dependency.getBottom() - child.getTop())
                  + ablBehavior.mOffsetDelta
                  + getVerticalLayoutGap()
                  - getOverlapPixelsForOffset(dependency));
          }
      }
  </code></pre>
  
  <p><strong><em>NOTE: are welcome and could be accepted replies also the ones that explain details on math's logic of <code>getTopBottomOffsetForScrollingSibling()</code>, of <code>(dependency.getBottom() - child.getTop())</code>,  and on the content of <code>mOffsetDelta</code></em></strong></p>