AnimationSet animationSet = new AnimationSet(true);
ScaleAnimation scaleAnimation = new ScaleAnimation(
1.0f, 2f, 1.0f, 2f,
Animation.RELATIVE_TO_SELF, 0.5f,
Animation.RELATIVE_TO_SELF, 0.5f);
//动画显示时间
scaleAnimation.setDuration(100);
animationSet.addAnimation(scaleAnimation);
animationSet.setFillAfter(false);
//需要设置动画效果的控件
btn_coupon.startAnimation(animationSet);
animationSet.setAnimationListener(new Animation.AnimationListener() {
@Override
public void onAnimationStart(Animation animation) {
}
@Override
public void onAnimationEnd(Animation animation) {
//animation after the end no display
}
@Override
public void onAnimationRepeat(Animation animation) {
}
});
Android 图标放大闪烁动画
最新推荐文章于 2022-03-03 09:26:34 发布