Android PathEffects与ViewDragHelper的简单使用
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 1.PathEffects是一种影响Canvas绘制线条的样式工具。 public class PathEffectView extends View { float phase; PathEffect[] effects = new PathEffect[7]; int[] colors; private Paint paint; Path path; public PathEffectView(Context context) { this(context, null); } public PathEffectView(Context context, AttributeSet attrs) { this(context, attrs, 0); } public PathEffectView(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); paint = new Paint(); paint.setStyle(Paint.Style.STROKE); paint.setStrokeWidth(4); // 创建、并初始化Path path = new Path();