looping-layout icon indicating copy to clipboard operation
looping-layout copied to clipboard

fix: last item not visible bug

Open anthonyshim opened this issue 3 years ago • 3 comments

:clap: Resolves

#68

:star2: Description

:bug: fix

test video : https://youtube.com/shorts/6JCsvgxr10Q?feature=share

:thought_balloon: Other info

anthonyshim avatar Jun 29 '22 23:06 anthonyshim

Thanks for the fix! I'm hoping to review this when I get home from work today. If I don't get to it tonight, I'll definitely get to it during the weekend =)

BeksOmega avatar Jun 30 '22 14:06 BeksOmega

Ok, found time to pull this down and and take a look :D Thank you for putting up this pull request!

Firstly, this fix fails the automated test suite :/ In Android Studio in the "Select a Run/Debug Configuration" dropdown you should see an option called "All Tests" as well as a bunch of other tests suites. If I run "All Tests" on this branch I'm seeing 57 / 132 tests failed.

Secondly, I wasn't able to reproduce the issue you filed to be able to test it. Could you create an automated test that fails on master, and succeeds on your branch so that I can verify the fix?

And lastly, could you rebase this change against the develop branch?

Thank you again for your contribution! I'm excited to get this merged =)

BeksOmega avatar Jul 02 '22 02:07 BeksOmega

I believe the idea behind this change is that when you're scrolling and the view re-layouts, this will ensure the offset of the first item is factored in as well.

As an example, we're using looping-layout as a view pager replacement with full-width items and androidx.recyclerview.widget.PagerSnapHelper, and noticed that when you just have two pages, there will initially be some flickering without this fix. I'd need to do more debugging to fully understand this issue, however.

Maxr1998 avatar Apr 02 '23 12:04 Maxr1998