chen-fishbein/CN1CircleProgress

When ArcProgress is 0, diagonal lines show on iOS

Opened this issue · 1 comments

Hello,

I noticed that when the ArcProgress is set to 0 on iOS, diagonal lines show near the starting point. Sometimes, those lines don't show on the first load, but after reopening the app, the lines will show. I have not been able to replicate this on the Simulator or Android.

IMG_0052

Lianna suggested that I use this as a workaround:

protected String formattedValue(int value) {
if(value == 1 && fakeZero) value = 0;
return super.formattedValue(value);
}

I actually got around this by extending ArcProgress and overriding the following methods so that 1% should be displayed on the ArcProgress, but the text should say 0%:

@Override
    public void setProgress(int value) {
        if (value == 0)
            value = 1;
        super.setProgress(value);
    }

    @Override
    protected String formattedValue(int value) {
            if (value == 1)
                value = 0;

        return super.formattedValue(value);
    }

Once there's at least 1% progress, the lines don't show anymore.