setStrokeColor() does not work?
adamzimnyy opened this issue · 2 comments
I did this:
button.setFillListener(new HoldToLoadLayout.FillListener() {
@Override
public void onFull() {
button.setStrokeColor(R.color.target_green);
button.setDuration(1000);
}
@Override
public void onEmpty() {
button.setStrokeColor(R.color.blue_accent);
button.setDuration(2000);
}
});
The duration changes correctly, while the color does not... Am I doing something wrong?
Hello ! I've been away a little while and couldn't take care of issues for about a month now. Sorry for that, I'll check it out and respond ASAP.
Hello,
First of all sorry for late response, things got quite busy at work, I definetely had no time to take a look :(
Duration is used in animators dynamically therefore updating duration shows It's effect immediately.
On the other hand, setStrokeColor method was intended to set stroke's color up before beginning the draw process. It does not update paint. Therefore, there's no change in stroke color after updating it later on. Since updating the paint won't do any effect on drawn visual and I'm not actually using my own canvas ( or any refs to canvas I'm drawing ), It's not able to draw the progress once more even if you upload the paint.
If I have time, I'll look into adding dynamic updates later on.