uknownothingsnow / CircleProgress

CircleProgress, DonutProgress, ArcProgress
3.81k stars 921 forks source link

Set color programatically ? #60

Closed TcQPAD closed 8 years ago

TcQPAD commented 8 years ago

Hello,

First of all thanks for this very nice and easy use library :-)

I'd like to know if it's possible to change the finished_color programatically. I'm having trouble doing it :

Using donutProgress.setFinishedStrokeColor(R.color.orange); or whatever color won't do anything, instead it puts a blue/purple color as you can see below :

issue_donut_progress

Am I using setFinishedStrokeColor the right way ? Thanks in advance, Max

TcQPAD commented 8 years ago

I solved it by using :

donutProgress.setFinishedStrokeColor(Color.parseColor("#color_code"));

It seems like the method can't manage to use resource colors such as R.color.mycolor.

sajadmaster commented 7 years ago

Thank you. I had the same issue