Back to project page Animated.
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.
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); } }