Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

want to change fillColor #15

Open
PratikSonawane10 opened this issue Jun 6, 2017 · 3 comments
Open

want to change fillColor #15

PratikSonawane10 opened this issue Jun 6, 2017 · 3 comments

Comments

@PratikSonawane10
Copy link

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

@cervy
Copy link

cervy commented Jul 11, 2017

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~

@PratikSonawane10
Copy link
Author

PratikSonawane10 commented Jul 19, 2017

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.

@mustafaozhan
Copy link

@JorgeCastilloPrz I want to change fill and stroke colours programmatically also. It would be really nice to have this feature

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants