Code example for DashPathEffect

0
		paint.setColor(Color.GRAY);
		Path path = new Path();
		path.moveTo(10, 10);
		path.lineTo(800, 10);
		// path.lineTo(460,10); 
		PathEffect effects = new DashPathEffect(new float[] { 5, 5, 5, 5 }, 1);
		paint.setPathEffect(effects);
		canvas.drawPath(path, paint);
	} 
 
} 
Contextual code suggestions in your IDE  Get Codota for Java