-
-
Save arcadefire/f4c77fad4bc8b39724a2871acdd536b7 to your computer and use it in GitHub Desktop.
Pre-scroll
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
override fun onPreScroll( | |
available: Offset, | |
source: NestedScrollSource | |
): Offset { | |
val delta = available.y | |
return if (delta < 0) { | |
swipeableState.performDrag(delta).toOffset() | |
} else { | |
Offset.Zero | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment