https://kotlinlang.org logo
#compose
Title
# compose
z

Zach Klippenstein (he/him) [MOD]

10/03/2020, 5:44 AM
I’m seeing some behavior that I think might be a bug. It seems like `LayoutModifier`s are only being calculated when they’re first applied to a node, and any changes in subsequent compositions don’t actually update the layout. E.g. I’m trying to move a composable around by passing a custom
Alignment
implementation that just takes a fraction and aligns to that fraction of the parent. The initial alignment is calculated correctly, but when the fraction changes in subsequent compositions, the composable’s position doesn’t change. Will file soon.
👍 2
So it’s not layout modifiers, it’s just alignments. Here’s the bug and repro code: https://issuetracker.google.com/issues/169982630
I know custom `Arrangement`s are no longer supported, are custom `Alignment`s destined for the same fate? I don’t care too much either way, but I’ve written this
FractionalAlignment
a few times now, could be useful to have in the library.
m

Mihai Popa

10/05/2020, 3:05 PM
are custom `Alignment`s destined for the same fate?
Nope.
could be useful to have in the library.
Yes, adding it to the library is planned.
🙌 1
🙏 1
Also thanks for the bug, looking into it 🙂