List of usage examples for android.support.v4.view ViewPropertyAnimatorCompat withEndAction
public ViewPropertyAnimatorCompat withEndAction(Runnable runnable)
From source file:de.base.utility.animators.FadeInAnimator.java
private void animateAdd(View view, @Nullable RecyclerView.ViewHolder holder, Runnable startAction, Runnable endAction) {//from w ww . j a v a 2 s. c o m ViewPropertyAnimatorCompat viewAnimator = ViewCompat.animate(view).alpha(1).setDuration(getAddDuration()) .setInterpolator(mInterpolator); if (holder != null) viewAnimator.setListener(new DefaultAddVpaListener(holder)); if (startAction != null) viewAnimator.withStartAction(startAction); if (endAction != null) viewAnimator.withEndAction(endAction); viewAnimator.start(); }
From source file:de.base.utility.animators.FadeInAnimator.java
private void animateRemove(View view, @Nullable RecyclerView.ViewHolder holder, Runnable startAction, Runnable endAction) {/*from w w w . j a va 2 s . c o m*/ ViewPropertyAnimatorCompat viewAnimator = ViewCompat.animate(view).alpha(0).setDuration(getRemoveDuration()) .setInterpolator(mInterpolator); if (holder != null) viewAnimator.setListener(new DefaultRemoveVpaListener(holder)); if (startAction != null) viewAnimator.withStartAction(startAction); if (endAction != null) viewAnimator.withEndAction(endAction); viewAnimator.start(); }
From source file:de.base.utility.animators.ScaleInAnimator.java
private void animateAdd(View view, float scale, Runnable startAction, Runnable endAction, @Nullable RecyclerView.ViewHolder holder) { ViewPropertyAnimatorCompat viewAnimator = ViewCompat.animate(view).scaleX(scale).scaleY(scale) .setDuration(getAddDuration()).setInterpolator(mInterpolator); if (holder != null) viewAnimator.setListener(new DefaultAddVpaListener(holder)); if (startAction != null) viewAnimator.withStartAction(startAction); if (endAction != null) viewAnimator.withEndAction(endAction); viewAnimator.start();// w ww .j a va 2 s . co m }
From source file:de.base.utility.animators.ScaleInAnimator.java
private void animateRemove(View view, float scale, Runnable startAction, Runnable endAction, @Nullable RecyclerView.ViewHolder holder) { ViewPropertyAnimatorCompat viewAnimator = ViewCompat.animate(view).scaleX(scale).scaleY(scale) .setDuration(getRemoveDuration()).setInterpolator(mInterpolator); if (holder != null) viewAnimator.setListener(new DefaultRemoveVpaListener(holder)); if (startAction != null) viewAnimator.withStartAction(startAction); if (endAction != null) viewAnimator.withEndAction(endAction); viewAnimator.start();//from w ww .ja v a2s.c om }