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);
}
}
Aggregations