FEATURE - Enabled scroll when body is unfilled
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:
TODO:
Currently automatic expending happened only in CollapsingToolbar. After the merge of Snapping Feature: https://github.com/onebone/compose-collapsing-toolbar/pull/83, it will be required to use expand() function from CollapsingToolbarScaffoldState to properly animate Toolbar offset and height.
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