开发者

How do i draw a semitransparent white line?

开发者 https://www.devze.com 2023-03-17 03:08 出处:网络
I have the hexcode as #70ffffff for the color and all i do is canvas.drawline() and paint has the color set to that hex.

I have the hexcode as #70ffffff for the color and all i do is canvas.drawline() and paint has the color set to that hex.

p = new Paint();
p.setColor(R.color.transparentwhite);
p.setStrokeWidth(15);
canvas.drawLine(a.getCenterX(), a.getCenterY(), 
      开发者_JAVA百科                    a.getPrevious().getCenterX(), a.getPrevious().getCenterY(), p);


Please try this..

p.setColor(Color.parseColor("#70ffffff"));

instead of

p.setColor(R.color.transparentwhite);
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号