AndroidFillableLoaders
AndroidFillableLoaders copied to clipboard
want to change fillColor
hi, i want to change fillcolor according to my if condition, how can i do this?
if (somevalue = 20){ fillableLoader.setFillColor(Color.parseColor("#4CAF50")); } else { fillableLoader.setFillColor(Color.parseColor("#CDDC39")); } i done something like this but its not working, color is not changing. please help me out. thank you
Maybe it's not supported set the color dinamically, and u can "init" the color when change another state u want it showing the other color~
i got what ids the problem . in your library you forgot to call initDashPaint(); & initFillPaint();
public void setStrokeColor(int strokeColor) {
this.strokeColor = strokeColor;
**initDashPaint(); // you didnt call this**
}
public void setFillColor(int fillColor) {
this.fillColor = fillColor;
**initFillPaint(); // you didnt call this**
}
update it.
@JorgeCastilloPrz I want to change fill and stroke colours programmatically also. It would be really nice to have this feature