getAnimationDuration
Called by the ItemTouchHelper when user action finished on a ViewHolder and now the View will be animated to its final position.
Default implementation uses ItemAnimator's duration values. If animationType
is ANIMATION_TYPE_DRAG, it returns getMoveDuration, otherwise, it returns getRemoveDuration. If RecyclerView does not have any RecyclerView.ItemAnimator attached, this method returns DEFAULT_DRAG_ANIMATION_DURATION
or DEFAULT_SWIPE_ANIMATION_DURATION
depending on the animation type.
Return
The duration for the animation
Parameters
The RecyclerView to which the ItemTouchHelper is attached to.
The type of animation. Is one of ANIMATION_TYPE_DRAG, ANIMATION_TYPE_SWIPE_CANCEL or ANIMATION_TYPE_SWIPE_SUCCESS.
The horizontal distance that the animation will offset
The vertical distance that the animation will offset