How to fix the position of composables even if a c...
# compose
k
How to fix the position of composables even if a composable changes size? 🤔 Should I customize a layout?
a
Fix them to what? What's the code you'd like to be able to write and what output do you want it to produce?
k
I have a Surface in a scrollable column, when I change the size (bigger) and offset (up) of the Surface, the things below it will move down. And I want the things below the Surface won't be moved, let their positions identical to those before resizing.
a
oh, then yes, offsets are applied after layout and do not affect sibling layout. You might indeed have a better time using the
Layout
composable to coordinate exactly what you want here.
k
Can I "lift" the Surface out of its parent layout at runtime?
a
looks like you're looking for the shared element transition features that are currently underway for making this easier to write. You can do it manually but it's kind of involved.
k
Will it be supported in the official library?😲
I have tried a shared element library, but the code is outdated 😅, hard to use.
a
yeah there's work in progress for it