animateMove

abstract fun animateMove(holder: RecyclerView.ViewHolder, fromX: Int, fromY: Int, toX: Int, toY: Int): Boolean(source)

Called when an item is moved in the RecyclerView. Implementors can choose whether and how to animate that change, but must always call dispatchMoveFinished when done, either immediately (if no animation will occur) or after the animation actually finishes. The return value indicates whether an animation has been set up and whether the ItemAnimator's runPendingAnimations method should be called at the next opportunity. This mechanism allows ItemAnimator to set up individual animations as separate calls to animateAdd(), animateMove(), animateRemove(), and animateChange come in one by one, then start the animations together in the later call to runPendingAnimations.

Return

true if a later call to runPendingAnimations is requested, false otherwise.

Parameters

holder

The item that is being moved.

fromX

x coordinate from which to start animation.

fromY

y coordinate from which to start animation.

toX

x coordinate at which to end animation.

toY

y coordinate at which to end animation.