Search code examples
androiddrawingfill

How to draw unfilled figures on Android?


Is it possible to draw unfilled figures on Android? By default circles and rectangles are filled.


Solution

  • You need to change the Paint style to stroke if you just want an outline with no fill:

    Paint p = new Paint();
    p.setStyle(Paint.Style.STROKE);