Skip to content

Commit 75951b3

Browse files
committed
Update scrolling offset to scroll at list half a page, otherwise we'll snap back when hitting the bounds.
1 parent 7a293b3 commit 75951b3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pager/src/sharedTest/kotlin/com/google/accompanist/pager/HorizontalPagerScrollingContentTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ class HorizontalPagerScrollingContentTest {
9292

9393
// Perform a scroll in the same direction again
9494
rule.onNodeWithTag(TestTag)
95-
.swipeAcrossCenterWithVelocity(velocityPerSec = 2_000.dp, distancePercentageX = -0.5f)
95+
.swipeAcrossCenterWithVelocity(velocityPerSec = 2_000.dp, distancePercentageX = -0.6f)
9696

9797
// Wait for the flings to end
9898
rule.waitForIdle()

pager/src/sharedTest/kotlin/com/google/accompanist/pager/VerticalPagerScrollingContentTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ class VerticalPagerScrollingContentTest {
9191

9292
// Perform a scroll in the same direction again
9393
rule.onNodeWithTag(TestTag)
94-
.swipeAcrossCenterWithVelocity(velocityPerSec = 2_000.dp, distancePercentageY = -0.5f)
94+
.swipeAcrossCenterWithVelocity(velocityPerSec = 2_000.dp, distancePercentageY = -0.6f)
9595

9696
// Wait for the flings to end
9797
rule.waitForIdle()

0 commit comments

Comments
 (0)