-
Notifications
You must be signed in to change notification settings - Fork 764
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a new solution for calculating current card position for carousel…
… scrolls Summary: ### CONTEXT In an [experiment](https://fb.workplace.com/groups/781375832601068/permalink/1838892143516093/) we recently ran that test different scroll speed for Android Feed carousel ads, we noticed a slow scroll of jump speed of 1 performs better than faster scrolls. In the current Android organic implementation, if we set scroll speed to be 1 and snap mode to be center_snap, and scroll softly, we will be taken to the next card in the carousel. However, if we instead do a strong scroll, we will be taken to the second-next card in the carousel. This is because of the setting for fling and reading of currentPosition in CustomSpeedLinearSnapHelper. ### THIS DIFF This diff enhances the scrolling behavior of carousel ads by introducing a new support that only snaps to the immediate next card when user scrolls, regardless of the scroll velocity Reviewed By: pentiumao Differential Revision: D69197062 fbshipit-source-id: 3d5fc8278761ed9c670f826bdc4b9ec1857e7182
- Loading branch information
1 parent
4238827
commit da1b6b8
Showing
4 changed files
with
51 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters