This repository has been archived by the owner on Nov 10, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
snapIndex
lambda parameter (#15)
* Add `snapIndex` lambda parameter This block which returns the index which the apps wishes to snap to. The block is provided with the SnapperLayoutInfo and the index which Snapper has determined is the correct target index. Callers can override this value as they see fit. A common use case could be rounding up/down to achieve groupings of items, which was the intention of #12 * Add test for snapIndex * Improve kdoc * Expand snapIndex test * Add snapIndex scenario with opposite directions * Make snapIndex non-nullable * Split out maximumFlingDistance to a deprecated overload Had to remove the default value to avoid overload ambiguity. * Re-add default value for maximumFlingDistance This maintains binary compatibility. * Remove extra comment * Add `startIndex` to SnapIndex Also added some docs for the new parameter
- Loading branch information
1 parent
6bfa7ea
commit 4d27add
Showing
11 changed files
with
373 additions
and
103 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
Oops, something went wrong.