title: Android Animate Alpha during Drag Animation Now Working
body: <p>I've added the drag functionality to a component using ViewDragHelper and I'm trying to add a fade animation to the component so that when the user touches the screen and drag it, it changes the component's alpha using an animation.
  The problem is that the animation waits for the user's interaction to stop and then it applies the animation so that during the component transition, you can't see the alpha animation,</p>
  
  <pre><code>override fun clampViewPositionVertical(child: View, top: Int, dy: Int): Int {
          if(top &lt; verticalRange)
              return verticalRange
          backgroundView.animate().alpha((backgroundView.alpha - 0.05).toFloat()).duration = 10
          return top
      }
  </code></pre>
  
  <p>The on touch Event:</p>
  
  <pre><code> override fun onTouchEvent(event: MotionEvent): Boolean {
              return if (isDragEnabled &amp;&amp; (isControlScreenLayoutTarget(event) || isMoving)) {
                  viewDragHelper.processTouchEvent(event)
                  true
              } else {
                  super.onTouchEvent(event)
              }
          }
  </code></pre>