animateMove

open 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(RecyclerView.ViewHolder) 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(RecyclerView.ViewHolder) animateAdd(), #animateMove(RecyclerView.ViewHolder, int, int, int, int) animateMove(), #animateRemove(RecyclerView.ViewHolder) animateRemove(), and #animateChange(RecyclerView.ViewHolder, RecyclerView.ViewHolder, int, int, int, int) come in one by one, then start the animations together in the later call to #runPendingAnimations().