Android Open Source - Animated X Y Evaluator






From Project

Back to project page Animated.

License

The source code is released under:

Apache License

If you think the Android project Animated listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package org.apps.awarner.animated;
/*ww w  .j  a  v a  2s .  c o  m*/
import android.animation.TypeEvaluator;

public class XYEvaluator implements TypeEvaluator {
    public Object evaluate(float fraction, Object startValue, Object endValue) {
        XYHolder startXY = (XYHolder) startValue;
        XYHolder endXY = (XYHolder) endValue;

        float x = startXY.getX() + fraction * (endXY.getX() - startXY.getX());
        float y = startXY.getY() + fraction * (endXY.getY() - startXY.getY());

        return new XYHolder(x, y);
    }
}




Java Source Code List

org.apps.awarner.animated.AnimatedActivity.java
org.apps.awarner.animated.AnimatedView.java
org.apps.awarner.animated.ShapeHolder.java
org.apps.awarner.animated.XYArcEvaluator.java
org.apps.awarner.animated.XYEvaluator.java
org.apps.awarner.animated.XYHolder.java