Code example for PathShape

0
		path.lineTo((int) (width * 2.0F / 9.0F), (int) height);
		path.lineTo((int) width, (int) height);
		path.lineTo((int) width, 0.0F);
		path.lineTo((int) (width * 2.0F / 9.0F), 0.0F);
		path.close();
		shapeD = new ShapeDrawable(new PathShape(path, width, height));
		shapeD.getPaint().set(initPaint(bgColor, borderColor));
		shapeD.invalidateSelf();
	} 
	 
	public ShapeDrawable getShape()
	{ 
		return this.shapeD;
	} 
	public Paint initPaint(int bgColor,int borderColor)
	{ 
		Paint paint=new Paint(Paint.ANTI_ALIAS_FLAG);
		paint.setStrokeWidth(1);
		paint.setPathEffect(new CornerPathEffect(5.0f));
		paint.setColor(bgColor);
Connect your IDE to all the code out there  Get Codota for Java