Comments (3)
I have similar issue here. I want to use collapsing toolbar without CollapsingToolbarScaffold() because I'd like to use regular Scaffold() to have a bottom app bar placeholder. My problem can also be solved by having bottom app bar as a pinned component just like @pesjak described
from compose-collapsing-toolbar.
One possible workaround for your case is to offset the button manually according to the toolbar state.
Button(modifier = Modifier.offset { IntOffset(0, -state.offsetY) }) { ... }
I see this as a common use case, so I am planning to support such scenarios in the near future. Just as using CollapsingToolbarLayout in the Jetpack library, align()
modifier will allow users to fix components in an arbitrary position in the layout.
// not possible right now, but will be available in the near future version
CollapsingToolbarScaffold(
// ...
) {
Button( // placed at the bottom center regardless of scroll state
modifier = Modifier.align(Alignment.BottomCenter)
)
}
from compose-collapsing-toolbar.
Also, I ended up using CollapsingToolbarScaffold + another Scaffold for everything else except toolbar. Works fine for my case explained above , and Google seems to have ended up using multiple scaffolds too in their projects.
from compose-collapsing-toolbar.
Related Issues (20)
- Retain offset/progress when toolbar's height is changed
- toolbar doesn't stay fully open when the screen is opened HOT 1
- Wrong initial scroll position when toolbar has dynamic height HOT 2
- Changing 2 different app bars in animated content
- ExitUntilCollapsed strategy does not set OffsetY in ScrollStrategy HOT 1
- SwipeRefresh as a child doesn't expand HOT 1
- Toolbar height remember issue
- How to use the pin modifier with ScrollStrategy.EnterAlways?
- Is it possible to hide the toolbar only by a set height? HOT 1
- Not able Collabs tool bar manully
- Is it possible to change the expanded state by scrolling the toolbar area?
- Feature of jumping between states expanded/collapsed HOT 1
- Full HOT 1
- Cash App $URL Change!
- Used without consent HOT 2
- Is the library still maintained?
- I have a way to deal with it temporarily
- Collapsing did not show screen bottom and did not scroll top
- CollapsingToolbarScaffold's body height is incorrect when restored from saved state with `ExitUntilCollapsed` scrolling strategy HOT 2
- Carl H. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from compose-collapsing-toolbar.