Skip to content

Commit

Permalink
Merge pull request #539 from chrisbanes/cb/snap-speed
Browse files Browse the repository at this point in the history
Increase scrolling speed for carousels
  • Loading branch information
chrisbanes committed Dec 2, 2019
2 parents c4d737b + 46cbc42 commit 15a027c
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ class EpoxyInitializer @Inject constructor() : AppInitializer {
// Also setup Carousel to use a more sane snapping behavior
Carousel.setDefaultGlobalSnapHelperFactory(object : Carousel.SnapHelperFactory() {
override fun buildSnapHelper(context: Context): SnapHelper {
return GravitySnapHelper(Gravity.START)
return GravitySnapHelper(Gravity.START).apply {
scrollMsPerInch = 70f
}
}
})
}
Expand Down

0 comments on commit 15a027c

Please sign in to comment.