Search in sources :

Example 6 with IntEvaluator

use of android.animation.IntEvaluator in project PageIndicatorView by romandanylyk.

the class FillAnimation method createStrokePropertyHolder.

@NonNull
private PropertyValuesHolder createStrokePropertyHolder(boolean isReverse) {
    String propertyName;
    int startStrokeValue;
    int endStrokeValue;
    if (isReverse) {
        propertyName = ANIMATION_STROKE_REVERSE;
        startStrokeValue = radiusPx;
        endStrokeValue = 0;
    } else {
        propertyName = ANIMATION_STROKE;
        startStrokeValue = 0;
        endStrokeValue = radiusPx;
    }
    PropertyValuesHolder holder = PropertyValuesHolder.ofInt(propertyName, startStrokeValue, endStrokeValue);
    holder.setEvaluator(new IntEvaluator());
    return holder;
}
Also used : IntEvaluator(android.animation.IntEvaluator) PropertyValuesHolder(android.animation.PropertyValuesHolder) NonNull(android.support.annotation.NonNull)

Example 7 with IntEvaluator

use of android.animation.IntEvaluator in project PageIndicatorView by romandanylyk.

the class SwapAnimation method createColorPropertyHolder.

private PropertyValuesHolder createColorPropertyHolder() {
    PropertyValuesHolder holder = PropertyValuesHolder.ofInt(ANIMATION_X_COORDINATE, xStartCoordinate, xEndCoordinate);
    holder.setEvaluator(new IntEvaluator());
    return holder;
}
Also used : IntEvaluator(android.animation.IntEvaluator) PropertyValuesHolder(android.animation.PropertyValuesHolder)

Aggregations

IntEvaluator (android.animation.IntEvaluator)7 PropertyValuesHolder (android.animation.PropertyValuesHolder)5 NonNull (android.support.annotation.NonNull)3 ValueAnimator (android.animation.ValueAnimator)2 AccelerateDecelerateInterpolator (android.view.animation.AccelerateDecelerateInterpolator)2