开发者

How do i draw a semitransparent white line?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜