Code example for Paint

Methods: setColorsetPathEffectsetStyle

0
	} 
 
	@Override 
	protected void onDraw(Canvas canvas) {
		super.onDraw(canvas);
		Paint paint = new Paint();
		paint.setStyle(Paint.Style.STROKE);
		paint.setColor(Color.parseColor("#d4d4d4"));
		Path path = new Path();
		path.moveTo(10, 10);
		path.lineTo(800, 10);
		PathEffect effects = new DashPathEffect(new float[] { 0, 0, 0, 0 }, 1);
		paint.setPathEffect(effects);
		canvas.drawPath(path, paint);
	} 
 
	 
} 
Contextual code suggestions in your IDE  Get Codota for Java