Search in sources :

Example 1 with BakedBezierInterpolator

use of org.chromium.ui.interpolators.BakedBezierInterpolator in project AndroidChromium by JackyAndroid.

the class ToolbarProgressBar method animateAlphaTo.

private void animateAlphaTo(float targetAlpha) {
    float alphaDiff = targetAlpha - getAlpha();
    if (alphaDiff == 0.0f)
        return;
    long duration = (long) Math.abs(alphaDiff * mAlphaAnimationDurationMs);
    BakedBezierInterpolator interpolator = BakedBezierInterpolator.FADE_IN_CURVE;
    if (alphaDiff < 0)
        interpolator = BakedBezierInterpolator.FADE_OUT_CURVE;
    animate().alpha(targetAlpha).setDuration(duration).setInterpolator(interpolator);
    if (mAnimatingView != null) {
        mAnimatingView.animate().alpha(targetAlpha).setDuration(duration).setInterpolator(interpolator);
    }
}
Also used : BakedBezierInterpolator(org.chromium.ui.interpolators.BakedBezierInterpolator)

Aggregations

BakedBezierInterpolator (org.chromium.ui.interpolators.BakedBezierInterpolator)1