Android电视关闭的动画效果
老式电视机关闭的时候画面一闪消失的那个效果:

首先创建一个TVOffAnimation继承于Animation:
import android.graphics.Matrix;import android.view.animation.AccelerateDecelerateInterpolator;import android.view.animation.Animation;import android.view.animation.Transformation;public class TVOffAnimation extends Animation {private int halfWidth;private int halfHeight;@Overridepublic void initialize(int width, int height, int parentWidth,int parentHeight) {super.initialize(width, height, parentWidth, parentHeight);setDuration(500);setFillAfter(true);//保存View的中心点halfWidth = width / 2;halfHeight = height / 2;setInterpolator(new AccelerateDecelerateInterpolator());}@Overrideprotected 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);}}}View img = findViewById(R.id.imageView);button.setOnClickListener(new OnClickListener() {@Overridepublic void onClick(View v) {img.startAnimation(new TVOffAnimation());}});