Is it possible to draw unfilled figures on Android? By default circles and rectangles are filled.
1 Answer
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);
-
Using green color when painting. After changing style to stroke I'm getting a black fill. Is it possible to get it to be transparent? Aug 15, 2013 at 11:06
-
2@arcone
p.setColor(0x99000000);
The color-parameter accepts an hex-code in the form 0xaarrggbb (a=alpha, r=red, g=green, b=blue) Jun 23, 2014 at 7:28