DavidPacioianu/InkPageIndicator

Issue on pre-lollipop

ZacSweers opened this issue · 6 comments

There's an animation bug with this on pre-lollipop where the dot to the right side disappears during the transition.

See: http://webmshare.com/dLEEL

I think it's due to the change to addPath, which I don't think it a like-for-like equivelant to Path.Op.UNION.

Whoops hit enter to soon, editing

@hzsweers Is this bug still persisting? I can't reproduce it.

Yes. Try any API 16 device

I'm facing this problem, but all the dots disappear suddenly.
Sometimes they show, sometimes they don't, only the selected one gets shown.
Also on API 16.
I'll try to find the issue.

Another issue, when pager count reached 10+, the option's animation becoming very slow and jerky. I think it's due to the change path.op to path.addPath, So I changed the code as:

if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { combinedUnselectedPath.op(getUnselectedPath(page, dotCenterX[page], dotCenterX[nextXIndex], page == pageCount - 1 ? INVALID_FRACTION : joiningFractions[page], dotRevealFractions[page]), Path.Op.UNION); }else { combinedUnselectedPath.addPath(getUnselectedPath(page, dotCenterX[page], dotCenterX[nextXIndex], page == pageCount - 1 ? INVALID_FRACTION : joiningFractions[page], dotRevealFractions[page])); }

@matrixxun Please make a pull request with your change.