I have a composable function like this:
Column(
modifier = Modifier.fillMaxSize()
) {
Button(
modifier = Modifier
.wrapContentWidth()
.align(Alignment.End),
onClick = {}
) {
Text(text = "My Button")
}
}
And my button is aligned to the end of screen correctly. Now when I add layoutId("button")
to the button's modifier before .align(Alignment.End)
line, my button aligns to the start of screen. It appears that every modifier that is extended from ParentDataModifier
overrides parentData
and we cannot use them together.
So Is this an intentional behavior or am I missing something?