animateAdd

Called when an item is added to the RecyclerView. Implementors can choose whether and how to animate that change, but must always call dispatchAddFinished 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.

This method may also be called for appearing items which were already in the RecyclerView, but for which the system does not have enough information to animate them into view. In that case, the default animation for adding items is run on those items as well.

Return

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

Parameters

holder

The item that is being added.