private void addAnimation(){
img_show.startAnimation(scaleAnimation());
// img_show.clearAnimation(); //停止动画
}
/**
* 图片自动循环缩放
* @return
*/
public static ScaleAnimation scaleAnimation() {
ScaleAnimation scaleAnimation = new ScaleAnimation(1.0f, 0.5f, 1.0f, 0.5f,
Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
scaleAnimation.setDuration(900); //动画执行时间
scaleAnimation.setRepeatCount(-1); //-1表示重复执行动画
scaleAnimation.setRepeatMode(Animation.REVERSE); //重复 缩小和放大效果
return scaleAnimation;
}