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);
精彩评论