title: Wrong scroll position in CoordinatorLayout.Behavior
body: <p>I am using CoordinatorLayout with custom behavior and NestedScrollView in my project. It works well except one issue. When I am call nestedScrollView.smoothScrollTo(0,0) I get wrong Y coordinated in MyCustomBehavior. When I scroll it by finger I receive correct coordinates. How to get correct coordinates in behavior class when it scrolling by smoothScrollTo() method?</p>
  
  <p>Here is my code:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;android.support.constraint.ConstraintLayout 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:orientation="vertical"&gt;
  
          &lt;android.support.design.widget.CoordinatorLayout
              android:layout_width="match_parent"
              android:layout_height="match_parent"&gt;
  
              &lt;android.support.v7.widget.CardView
                  android:layout_width="300dp"
                  android:layout_height="150dp"
                  android:background="#f00"
                  android:layout_gravity="center_horizontal"
                  app:layout_behavior="com.mysite.app.MyCustomBehavior" /&gt;
  
              &lt;com.mysite.app.CustomScrollView
                 android:layout_width="match_parent"
                  android:layout_height="wrap_content"&gt;
  
                      &lt;TextView
                          android:layout_width="match_parent"
                          android:layout_height="match_parent"
                          android:text="Very long text here" /&gt;
              &lt;/com.mysite.app.CustomScrollView&gt;
  
              &lt;android.support.v7.widget.Toolbar
                  android:layout_width="match_parent"
                  android:layout_height="?attr/actionBarSize"
                  android:layout_marginTop="24dp"
                  android:elevation="20dp" /&gt;
          &lt;/android.support.design.widget.CoordinatorLayout&gt;
  &lt;/android.support.constraint.ConstraintLayout&gt;
  </code></pre>
  
  <p>CustomScrollView:</p>
  
  <pre><code>class CustomScrollView @JvmOverloads constructor(
          context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0
  ) : NestedScrollView(context, attrs, defStyleAttr) {
  
      private val runnable = Runnable {
          if (scrollY in 1..299) {
              smoothScrollTo(0,0)
          }
      }
  
      override fun stopNestedScroll(type: Int) {
          super.stopNestedScroll(type)
          removeCallbacks(runnable)
          handler.postDelayed(runnable, 200)
      }
  }
  </code></pre>
  
  <p>Behavior:</p>
  
  <pre><code>class CollapsingImageBehavior(private val context: Context, attrs: AttributeSet?) : CoordinatorLayout.Behavior&lt;CardView&gt;(context, attrs) {
  
      private var scroll = 0
  
      override fun layoutDependsOn(parent: CoordinatorLayout, child: CardView, dependency: View): Boolean {
          return dependency is NestedScrollView
      }
  
      override fun onStartNestedScroll(coordinatorLayout: CoordinatorLayout, child: CardView, directTargetChild: View, target: View, axes: Int, type: Int): Boolean {
          return axes == ViewCompat.SCROLL_AXIS_VERTICAL || super.onStartNestedScroll(coordinatorLayout, child, directTargetChild, target, axes, type)
      }
  
      override fun onNestedScroll(coordinatorLayout: CoordinatorLayout, child: CardView, target: View, dxConsumed: Int, dyConsumed: Int, dxUnconsumed: Int, dyUnconsumed: Int, type: Int) {
          super.onNestedScroll(coordinatorLayout, child, target, dxConsumed, dyConsumed, dxUnconsumed, dyUnconsumed, type)
          scroll += dyConsumed
          Log.d("tag", "onNestedScroll " + scroll)
      }
  
      override fun onDependentViewChanged(parent: CoordinatorLayout, child: CardView, dependency: View): Boolean {
          return true
      }
  }
  </code></pre>