话不多说,直接上代码 //实现图片闪烁效果 private void setFlickerAnimation(ImageView iv_chat_head) { final Animation animation = new AlphaAnimation(1, 0); // Change alpha from fully visible to invisible animation.setDuration(500); // duration - half a second animation.setInterpolator(new LinearInterpolator()); // do not alter animation rate animation.setRepeatCount(Animation.INFINITE); // Repeat animation infinitely animation.setRepeatMode(Animation.REVERSE); // iv_chat_head.setAnimation(animation); }
Android 实现图片闪烁效果
最新推荐文章于 2024-08-10 04:04:14 发布