Code example for PathShape

0
		Path path = new Path();
		path.moveTo((float) 0, (float) 0);
		path.lineTo((float) 1, (float) 0.5);
		path.lineTo((float) 0, (float) 1);
		path.lineTo((float) 0, (float) 0);
		PathShape pathShape = new PathShape(path, 1, 1);
		ShapeDrawable shape = new ShapeDrawable(pathShape);
		shape.getPaint().setColor(Color.WHITE);
		shape.getPaint().setStyle(Style.STROKE);
		shape.setIntrinsicWidth(20);
		shape.setIntrinsicHeight(15);
		return shape;
	} 
} 
Contextual code suggestions in your IDE  Get Codota for Java