Android 实现图片闪烁效果
16lz
2021-01-23
话不多说,直接上代码//实现图片闪烁效果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 震动示例--心跳效果
- Android:获取网页源代码
- Android软键盘之代码改变软键盘状态
- android 用代码设置margin属性,textView加粗
- Android动画效果学习
- Android调用百度地图API实现――实时定位代码
- android获取当前Canvas位图代码
- Android 代码获取手机ip地址(个人笔记)
- JavaGG android实现uc 和墨迹天气那样的左右拖动效果