继承Animation

package cativity.cyq.alphaanimal;

import android.view.animation.Animation;
import android.view.animation.Transformation; public class CustAnimation extends Animation { @Override
public void initialize(int width, int height, int parentWidth, int parentHeight) {
super.initialize(width, height, parentWidth, parentHeight);
} @Override
protected void applyTransformation(float interpolatedTime, Transformation t) {
t.getMatrix().setTranslate((float) Math.sin(interpolatedTime * 20) * 50, 0);//interpolatedTime从零到一逐渐变化
super.applyTransformation(interpolatedTime, t);
}
}
上一篇:HTML5 对于手机页面长按会粘贴复制的禁用 (解决方案)


下一篇:SQL Server ->> 使用CROSS APPLY语句是遇到聚合函数中包含外部引用列时报错