android - How do i draw a semitransparent white line? -
i have hexcode #70ffffff color , canvas.drawline() , paint has color set hex.
p = new paint(); p.setcolor(r.color.transparentwhite); p.setstrokewidth(15); canvas.drawline(a.getcenterx(), a.getcentery(), a.getprevious().getcenterx(), a.getprevious().getcentery(), p);
please try this..
p.setcolor(color.parsecolor("#70ffffff"));
instead of
p.setcolor(r.color.transparentwhite);
Comments
Post a Comment