Is it possible to draw unfilled figures on Android? By default circles and rectangles are filled.
Canvas is a class in Android that performs 2D drawing of different objects onto the screen. The saying “a blank canvas” is very similar to what a Canvas object is on Android. It is basically, an empty space to draw onto. The Canvas class is not a new concept, this class is actually wrapping a SKCanvas under the hood.
You can use <clip /> drawable in order to cut-off part of your circle.
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);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With