Skip to content

FEATURE - Enabled scroll when body is unfilled - #85

Open
GIGAMOLE wants to merge 1 commit into
onebone:masterfrom
GIGAMOLE:feature/enabled-when-body-unfilled
Open

FEATURE - Enabled scroll when body is unfilled#85
GIGAMOLE wants to merge 1 commit into
onebone:masterfrom
GIGAMOLE:feature/enabled-when-body-unfilled

Conversation

@GIGAMOLE

Copy link
Copy Markdown

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
Copy Markdown
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
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

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