1.闪烁动画 AlphaAnimation
1
2
3
4
5
6
7
8
9
|
privatevoid startFlickerAnimation(ImageView img) { final Animation animation = new
AlphaAnimation(1f, 0)f;
animation.setDuration(500);
animation.setInterpolator( new
LinearInterpolator()); // do not alter animation rate
animation.setRepeatCount(Animation.INFINITE); // Repeat animation infinitely
animation.setRepeatMode(Animation.REVERSE); //
img.setAnimation(animation);
animation.start();
}
|