ozodrukh/CircularReveal

Interpolators don't appear to have an effect

Ninjars opened this issue · 1 comments

class CircularRevealAnimator {
    public static Animator createCentered(View view, Animator.AnimatorListener listener) {
        // get the center for the clipping circle
        int cx = (view.getLeft() + view.getRight()) / 2;
        int cy = (view.getTop() + view.getBottom()) / 2;

        // get the final radius for the clipping circle
        int dx = Math.max(cx, view.getWidth() - cx);
        int dy = Math.max(cy, view.getHeight() - cy);
        float finalRadius = (float) Math.hypot(dx, dy);

        Animator animator = ViewAnimationUtils.createCircularReveal(view, cx, cy, 0, finalRadius);

        animator.setInterpolator(new BounceInterpolator());

        animator.setDuration(view.getResources().getInteger(android.R.integer.config_mediumAnimTime));
        animator.addListener(listener);

        return animator;
    }
}

... CircularRevealAnimator.createCentered(revealView, animatorListener).start() ...

No matter what interpolator I attempt to set in here, the reveal animation plays linearly.

hm, can't tell anything, it actually should work. Can you tell me whether pre-Lollipop or native animator doesn't plays interpolation effect?