accompanist icon indicating copy to clipboard operation
accompanist copied to clipboard

[Pager] Scroll gets stuck when pager indicators are present on Android 13

Open mariusmorabosch opened this issue 3 years ago • 1 comments

Description When scrolling back and forth on a horizontal pager with indicators, sometimes the fling doesn't work properly (similar to the effect of you not scrolling enough to make it switch page) when swiping from first to second or fifth to fourth (you need to scroll back and forth a couple of times, repro is not 100%). This seems to happen only on Android 13.

Steps to reproduce Create a pager with 5 pages (just put some text on it) and page indicators, then scroll back and forth on the first and second pages. See attached video for details. You also can use the following sample demo project to reproduce:

https://github.com/mariusmorabosch/horizontal_pager_bug_repro

https://user-images.githubusercontent.com/26637326/192823506-a2a09a1f-acc0-4b40-92b7-6dcdef909b9c.mp4

Expected behavior The scroll works properly and always changes page correctly. If you remove the pager indicators it seems to work properly

Additional context

mariusmorabosch avatar Sep 28 '22 15:09 mariusmorabosch

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Nov 05 '22 03:11 github-actions[bot]

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Dec 06 '22 03:12 github-actions[bot]

Hi! I can confirm that I have a similar issue, it happens when you scroll rapidly between the first and second page. Are there any plans to fix it?

amaslanka avatar Jan 01 '23 18:01 amaslanka

Bumping up my question.

amaslanka avatar Jan 18 '23 08:01 amaslanka

Hi, thanks for reporting this! I had a look at the issue and I was able to reproduce it a couple of times. Since this seem to be an issue in the fling behavior I'd point to snapper for help, but the lib has been deprecated in favor of the foundation fling version which we won't adopt in Accompanist because the foundation Pager version has been released and it wraps up the fling behavior and the pager.

I gave your issue a try in the foundation implementation and it seems it doesn't exist there so I'd suggest you to have a look and report anything you find (in the issue tracker). Thanks!

Levi-Moreira avatar Jan 18 '23 11:01 Levi-Moreira