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