compose-collapsing-toolbar
compose-collapsing-toolbar copied to clipboard
FEATURE - Snapping
Snap Config
SnapConfig defines how CollapsingToolbar snaps to its edges. You can enable snapping by providing snapConfig to CollapsingToolbarScaffold:
CollapsingToolbarScaffold(
/* ... */
snapConfig = SnapConfig() // "collapseThreshold = 0.5" by default
) {
/* ... */
}
Snap for ScrollStrategy.EnterAlways

Snap for ScrollStrategy.EnterAlwaysCollapsed

Snap ScrollStrategy.ExitUntilCollapsed

By the way, who wants to use this feature, I created a separated remote dependency, while this PR is under review:
Add it in your root build.gradle at the end of repositories:
all projects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
Step 2. Add the dependency
dependencies {
implementation 'com.github.GIGAMOLE:ComposeCollapsingToolbar:latest-version'
}
Or you can simply download it from there:
https://github.com/GIGAMOLE/ComposeCollapsingToolbar/releases