public class TVOffAnimation extends Animation {    private int halfWidth;    private int halfHeight;    @Override    public void initialize(int width, int height, int parentWidth,            int parentHeight) {        super.initialize(width, height, parentWidth, parentHeight);        setDuration(500);        setFillAfter(true);        halfWidth = width / 2;        halfHeight = height / 2;        setInterpolator(new AccelerateDecelerateInterpolator());            }    @Override    protected void applyTransformation(float interpolatedTime, Transformation t) {        final Matrix matrix = t.getMatrix();        if (interpolatedTime < 0.8) {            matrix.preScale(1+0.625f*interpolatedTime, 1-interpolatedTime/0.8f+0.01f,halfWidth,halfHeight);        }else{            matrix.preScale(7.5f*(1-interpolatedTime),0.01f,halfWidth,halfHeight);        }    }}

原文连接:http://gundumw100.iteye.com/blog/1311696

更多相关文章

  1. Android Fresco图片处理库用法API英文原文文档3(Facebook开源Andr
  2. OpenGL ES教程I之创建OpenGL视图(原文对照)
  3. OpenGL ES教程V之更多3D模型(原文对照)
  4. 【Android开发学习43】OpenGL ES教程VI之纹理贴图(原文对照)
  5. OpenGL ES教程II之创建多边形(原文对照)
  6. OpenGL ES教程IV之着色(原文对照)
  7. OpenGL ES教程III之移动变换(原文对照)
  8. OpenGL ES教程VI之纹理贴图(原文对照)

随机推荐

  1. Android 混淆代码的时候出现问题
  2. Android 切换全屏,取消全屏
  3. android 拷贝文件到其他目录下
  4. Android还能走多远啊
  5. android 程序初始化界面.. .
  6. 4.Android Skill 下拉刷新
  7. AndroidApplication类学习
  8. Android中处理Json的网络获取实例
  9. Android 使用OKHttp3请求接口401,返回Auth
  10. android客显轮播图片