use of android.view.animation.AccelerateDecelerateInterpolator in project PageIndicatorView by romandanylyk.
the class DropAnimation method createAnimator.
@NonNull
@Override
public AnimatorSet createAnimator() {
AnimatorSet animator = new AnimatorSet();
animator.setInterpolator(new AccelerateDecelerateInterpolator());
return animator;
}
use of android.view.animation.AccelerateDecelerateInterpolator in project PageIndicatorView by romandanylyk.
the class DropAnimation method createValueAnimation.
private ValueAnimator createValueAnimation(int fromValue, int toValue, long duration, final AnimationType type) {
ValueAnimator anim = ValueAnimator.ofInt(fromValue, toValue);
anim.setInterpolator(new AccelerateDecelerateInterpolator());
anim.setDuration(duration);
anim.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
@Override
public void onAnimationUpdate(ValueAnimator animation) {
int value = (int) animation.getAnimatedValue();
onAnimatorUpdate(value, type);
}
});
return anim;
}
use of android.view.animation.AccelerateDecelerateInterpolator in project PageIndicatorView by romandanylyk.
the class ThinWormAnimation method createHeightAnimator.
private ValueAnimator createHeightAnimator(int fromHeight, int toHeight, long startDelay) {
ValueAnimator anim = ValueAnimator.ofInt(fromHeight, toHeight);
anim.setInterpolator(new AccelerateDecelerateInterpolator());
anim.setDuration((long) (animationDuration * PERCENTAGE_HEIGHT_DURATION));
anim.setStartDelay(startDelay);
anim.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
@Override
public void onAnimationUpdate(ValueAnimator animation) {
height = (int) animation.getAnimatedValue();
listener.onThinWormAnimationUpdated(rectLeftX, rectRightX, height);
}
});
return anim;
}
use of android.view.animation.AccelerateDecelerateInterpolator in project PageIndicatorView by romandanylyk.
the class WormAnimation method createAnimator.
@NonNull
@Override
public AnimatorSet createAnimator() {
AnimatorSet animator = new AnimatorSet();
animator.setInterpolator(new AccelerateDecelerateInterpolator());
return animator;
}
use of android.view.animation.AccelerateDecelerateInterpolator in project WaveSwipeRefreshLayout by recruit-lifestyle.
the class WaveView method startDropAnimation.
public void startDropAnimation() {
// show dropBubble again
mDisappearCircleAnimator = ValueAnimator.ofFloat(1.f, 1.f);
mDisappearCircleAnimator.setDuration(1);
mDisappearCircleAnimator.start();
mDropCircleAnimator = ValueAnimator.ofFloat(500 * (mWidth / 1440.f), mMaxDropHeight);
mDropCircleAnimator.setDuration(DROP_CIRCLE_ANIMATOR_DURATION);
mDropCircleAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
@Override
public void onAnimationUpdate(ValueAnimator animation) {
mCurrentCircleCenterY = (float) animation.getAnimatedValue();
ViewCompat.postInvalidateOnAnimation(WaveView.this);
}
});
mDropCircleAnimator.setInterpolator(new AccelerateDecelerateInterpolator());
mDropCircleAnimator.start();
mDropVertexAnimator = ValueAnimator.ofFloat(0.f, mMaxDropHeight - mDropCircleRadius);
mDropVertexAnimator.setDuration(DROP_VERTEX_ANIMATION_DURATION);
mDropVertexAnimator.addUpdateListener(mAnimatorUpdateListener);
mDropVertexAnimator.start();
mDropBounceVerticalAnimator = ValueAnimator.ofFloat(0.f, 1.f);
mDropBounceVerticalAnimator.setDuration(DROP_BOUNCE_ANIMATOR_DURATION);
mDropBounceVerticalAnimator.addUpdateListener(mAnimatorUpdateListener);
mDropBounceVerticalAnimator.setInterpolator(new DropBounceInterpolator());
mDropBounceVerticalAnimator.setStartDelay(DROP_VERTEX_ANIMATION_DURATION);
mDropBounceVerticalAnimator.start();
mDropBounceHorizontalAnimator = ValueAnimator.ofFloat(0.f, 1.f);
mDropBounceHorizontalAnimator.setDuration(DROP_BOUNCE_ANIMATOR_DURATION);
mDropBounceHorizontalAnimator.addUpdateListener(mAnimatorUpdateListener);
mDropBounceHorizontalAnimator.setInterpolator(new DropBounceInterpolator());
mDropBounceHorizontalAnimator.setStartDelay((long) (DROP_VERTEX_ANIMATION_DURATION + DROP_BOUNCE_ANIMATOR_DURATION * 0.25));
mDropBounceHorizontalAnimator.start();
}
Aggregations