缩放动画 scale

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);
}

posted on 2017-09-03 19:10  葰葰  阅读(152)  评论(0编辑  收藏  举报