A bug with left indent
Closed this issue · 3 comments
Hi, Emil,
a great component, thanks for creating it.
There is a bug in the dispatchDraw(Canvas canvas) method.
It should be instead of
canvas.translate(getPaddingLeft(), ...
canvas.translate(getLeftForViewRelativeOnlyChild(currentlyStickingView) + getPaddingLeft(), ...
The way it is now, if the sticky view is deeper in the hierarchy and to the left, then it jumps when it becomes sticky.
I am not sure if this calculation should be in the draw method or precalculated somehow, but definitely the left indent of parents needs to be taken into account when translating.
Thanks!
I see you fixed this issue. I had the same one and currently work around it using a sticky container. When will you update the latest release to include this fix? I am currently using 1.0.0 and do not see any newer release.
I'll probably do a release in the weekend!