-
public interface AnimatedViewHolderInterface for
{@code itemView}addition/removal animation.Used by
{@code FlexibleItemAnimator}when notify events occur. If any of these methods are implemented, the ItemAnimator extending FlexibleItemAnimator is skipped in favour of this ViewHolder implementation.
-
-
Method Summary
Modifier and Type Method Description abstract booleanpreAnimateAddImpl()Prepares the View for Add Animation. abstract booleanpreAnimateRemoveImpl()Prepares the View for Remove Animation. abstract booleananimateAddImpl(ViewPropertyAnimatorListener listener, long addDuration, int index)Animates this ViewHolder with this specific Add Animation. abstract booleananimateRemoveImpl(ViewPropertyAnimatorListener listener, long removeDuration, int index)Animates this ViewHolder with this specific Remove Animation. -
-
Method Detail
-
preAnimateAddImpl
abstract boolean preAnimateAddImpl()
Prepares the View for Add Animation. If this method is implemented and returns
{@code true}, then this method is performed against{@code FlexibleItemAnimator#preAnimateAddImpl(RecyclerView.ViewHolder)}which will be ignored.Default value is
{@code false}.
-
preAnimateRemoveImpl
abstract boolean preAnimateRemoveImpl()
Prepares the View for Remove Animation. If this method is implemented and returns
{@code true}, then this method is performed against{@code FlexibleItemAnimator#preAnimateRemoveImpl(RecyclerView.ViewHolder)}which will be ignored.Default value is
{@code false}.
-
animateAddImpl
abstract boolean animateAddImpl(ViewPropertyAnimatorListener listener, long addDuration, int index)
Animates this ViewHolder with this specific Add Animation.
By returning
{@code true}this ViewHolder will perform customized animation, while byreturning{@code false}generic animation is applied also for this ViewHolder.- Parameters:
listener- should assign to{@code ViewCompat.animate().setListener(listener)}addDuration- duration of add animationindex- order of execution, starts with 0
-
animateRemoveImpl
abstract boolean animateRemoveImpl(ViewPropertyAnimatorListener listener, long removeDuration, int index)
Animates this ViewHolder with this specific Remove Animation.
By returning
{@code true}this ViewHolder will perform customized animation, while byreturning{@code false}generic animation is applied also for this ViewHolder.- Parameters:
listener- should assign to{@code ViewCompat.animate().setListener(listener)}removeDuration- duration of remove animationindex- order of execution, starts with 0 @return{@code true}to animate with thisimplementation,{@code false}to use the generic animation.
-
-
-
-