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 - Enabled scroll when body is unfilled #85

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

Conversation

GIGAMOLE
Copy link

By default, CollapsingToolbarScaffold is scrollable when the body content is unfilled (basically the scrollable body content without Modifier.fillMaxHeight()/Modifier.fillMaxSize()). In order to disable the scroll only when body content is unfilled, set enabledWhenBodyUnfilled = false in CollapsingToolbarScaffold. Also note that if the CollapsingToolbar is collapsed when the body content becomes unfilled, it will be automatically expanded.

Preview:

body-unfilled

@GIGAMOLE
Copy link
Author

TODO:

Currently automatic expending happened only in CollapsingToolbar. After the merge of Snapping Feature: #83, it will be required to use expand() function from CollapsingToolbarScaffoldState to properly animate Toolbar offset and height.

@GIGAMOLE
Copy link
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant