public void scale(View view) {
/**
* pivotXType, 中心点x轴的类型
* pivotXValue,
* pivotYType,
* pivotYValue
*/
ScaleAnimation scaleAnimation = new ScaleAnimation(1.0f, 0.0f, 1.0f, 0.0f, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
scaleAnimation.setDuration(3000);
//设置动画结束之后保持结束的状态
scaleAnimation.setFillAfter(true);
imageView.startAnimation(scaleAnimation);
}