如何在Android上绘制未填写的数字?


Answers:


165

Paint如果只需要没有填充的轮廓,则需要将样式更改为描边:

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

绘画时使用绿色。将样式更改为笔触后,我得到了黑色填充。是否可以使其透明?
Jan-TerjeSørensen13年

2
@arconep.setColor(0x99000000);颜色参数接受格式为0xaarrggbb(a = alpha,r = red,g = green,b = blue)的十六进制代码
MyPasswordIsLasercats 2014年
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.