Code example for PathShape

0
            p.lineTo(100,50);
            p.lineTo(0,50);
            p.lineTo(75,100);
            p.lineTo(50,0);    
             
            d = new ShapeDrawable(new PathShape(p, 100, 100));
            d.setIntrinsicHeight(100);
            d.setIntrinsicWidth(100);
            d.getPaint().setColor(Color.YELLOW);
            d.getPaint().setStyle(Paint.Style.STROKE);
            break; 
        case IDM_ARC:
            d = new ShapeDrawable(new ArcShape(0, 255));
            d.setIntrinsicHeight(100);
            d.setIntrinsicWidth(100);
            d.getPaint().setColor(Color.YELLOW);
            break; 
        } 
        mView.setDrawable(d);
        return true; 
Connect your IDE to all the code out there  Get Codota for Java