animatePersistence

Called by the RecyclerView when a ViewHolder is present in both before and after the layout and RecyclerView has not received a notifyItemChanged call for it or a notifyDataSetChanged call.

This ViewHolder still represents the same data that it was representing when the layout started but its position / size may be changed by the LayoutManager.

If the Item's layout position didn't change, RecyclerView still calls this method because it does not track this information (or does not necessarily know that an animation is not required). Your ItemAnimator should handle this case and if there is nothing to animate, it should call dispatchAnimationFinished and return false.

ItemAnimator must call dispatchAnimationFinished when the animation is complete (or instantly call dispatchAnimationFinished if it decides not to animate the view).

Return

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

Parameters

viewHolder

The ViewHolder which should be animated

preLayoutInfo

The information that was returned from recordPreLayoutInformation.

postLayoutInfo

The information that was returned from recordPreLayoutInformation.