Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEATURE - Snapping #83

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

GIGAMOLE
Copy link

@GIGAMOLE GIGAMOLE commented May 8, 2023

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
Copy link
Author

GIGAMOLE commented May 8, 2023

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