@Override public void computeScroll(){
  if (!isInEditMode() && mViewDragHelper.continueSettling(true)) {
    ViewCompat.postInvalidateOnAnimation(this);
  }
}

@ Override public void computeScroll ( ) { if ( ! isInEditMode ( ) && mViewDragHelper . continueSettling ( true ) ) { ViewCompat . postInvalidateOnAnimation ( this ) ; } }
to ensure the animation is going to work this method has been override to call postinvalidateonanimation if the view is not settled yet .
