Skip to content

FEATURE - Snapping - #83

Open
GIGAMOLE wants to merge 1 commit into
onebone:masterfrom
GIGAMOLE:feature/snapping
Open

FEATURE - Snapping#83
GIGAMOLE wants to merge 1 commit into
onebone:masterfrom
GIGAMOLE:feature/snapping

Conversation

@GIGAMOLE

@GIGAMOLE GIGAMOLE commented May 8, 2023

Copy link
Copy Markdown

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 EnterAlways

Snap for ScrollStrategy.EnterAlwaysCollapsed

Snap for EnterAlwaysCollapsed

Snap ScrollStrategy.ExitUntilCollapsed

Snap for ExitUntilCollapsed

@GIGAMOLE GIGAMOLE mentioned this pull request May 8, 2023
@GIGAMOLE
GIGAMOLE force-pushed the feature/snapping branch from 7825d09 to 48ad430 Compare May 8, 2023 17:32
@GIGAMOLE

GIGAMOLE commented May 8, 2023

Copy link
Copy Markdown
Author

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

@onebone onebone added feature New feature or request api Improvement of existing library contracts that may break backwards compatibility labels May 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api Improvement of existing library contracts that may break backwards compatibility feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants