public abstract class BaseItemAnimator
extends RecyclerView.ItemAnimator
android.support.v7.widget.RecyclerView.ItemAnimator
provides basic
animations on remove, add, and move events that happen to the items in
a RecyclerView.android.support.v7.widget.RecyclerView#setItemAnimator(android.support.v7.widget.RecyclerView.ItemAnimator)
限定符和类型 | 类和说明 |
---|---|
protected static class |
BaseItemAnimator.VpaListenerAdapter |
限定符和类型 | 字段和说明 |
---|---|
protected java.util.ArrayList<RecyclerView.ViewHolder> |
mAddAnimations |
protected java.util.ArrayList<RecyclerView.ViewHolder> |
mMoveAnimations |
protected RecyclerView |
mRecyclerView
RecyclerView
|
protected java.util.ArrayList<RecyclerView.ViewHolder> |
mRemoveAnimations |
构造器和说明 |
---|
BaseItemAnimator(RecyclerView recyclerView) |
限定符和类型 | 方法和说明 |
---|---|
boolean |
animateAdd(RecyclerView.ViewHolder holder) |
protected abstract void |
animateAddImpl(RecyclerView.ViewHolder holder) |
boolean |
animateMove(RecyclerView.ViewHolder holder,
int fromX,
int fromY,
int toX,
int toY) |
protected void |
animateMoveImpl(RecyclerView.ViewHolder holder,
int fromX,
int fromY,
int toX,
int toY) |
boolean |
animateRemove(RecyclerView.ViewHolder holder) |
protected abstract void |
animateRemoveImpl(RecyclerView.ViewHolder holder) |
protected void |
dispatchFinishedWhenDone()
Check the state of currently pending and running animations.
|
void |
endAnimation(RecyclerView.ViewHolder item) |
void |
endAnimations() |
boolean |
isRunning() |
protected abstract void |
prepareAnimateAdd(RecyclerView.ViewHolder holder) |
void |
runPendingAnimations() |
protected RecyclerView mRecyclerView
protected java.util.ArrayList<RecyclerView.ViewHolder> mAddAnimations
protected java.util.ArrayList<RecyclerView.ViewHolder> mMoveAnimations
protected java.util.ArrayList<RecyclerView.ViewHolder> mRemoveAnimations
public void runPendingAnimations()
public boolean animateAdd(RecyclerView.ViewHolder holder)
protected abstract void prepareAnimateAdd(RecyclerView.ViewHolder holder)
protected abstract void animateAddImpl(RecyclerView.ViewHolder holder)
public boolean animateRemove(RecyclerView.ViewHolder holder)
protected abstract void animateRemoveImpl(RecyclerView.ViewHolder holder)
public boolean animateMove(RecyclerView.ViewHolder holder, int fromX, int fromY, int toX, int toY)
protected void animateMoveImpl(RecyclerView.ViewHolder holder, int fromX, int fromY, int toX, int toY)
public void endAnimation(RecyclerView.ViewHolder item)
public boolean isRunning()
protected void dispatchFinishedWhenDone()
#dispatchAnimationsFinished()
to notify any
listeners.public void endAnimations()