自定义水波纹view
今天自定义个水波纹扩散 或者收缩 效果的view;先上效果 /** * 自定义view实现 水波纹 效果 */ public class MoireView extends View { private Paint paint; //最大半径 private int radius; //绘制半径 private int drawRadius; //屏幕宽高 private int w, h; //背景颜色 private int backColor = Color.TRANSPARENT; //水波纹颜色 private int moireColor = Color.WHITE; //动画执行时间 private int duration = 2000; //是否是扩散水波纹 private boolean isDiffusion = true; public MoireView(Context context) { super(context); init(); } public MoireView(Context context, AttributeSet attrs) { super(context, attrs); init(); } private void init() { paint = new Paint(); paint.setAntiAlias(true);