Ilias Zosimadis
02/07/2021, 10:37 AMAlex Bieliaiev
02/07/2021, 1:46 PMIlias Zosimadis
02/07/2021, 3:22 PMlazyColumn
which measures each child with infinite max height constrain (because it allows a child to be as big as it wants) meaning that you can't just apply fillMaxHeight
modifier.Jan Bína
02/07/2021, 5:21 PMheight = Dimension.fillToConstraints
in your constrainAs
block so it's not only centered.
If your usecase is really that simple, I would just use modifier for ComposableX
, something like this:
Modifier.drawBehind {
drawLine(
color = Color.Black,
start = Offset(0F, 0F),
end = Offset(0F, size.height),
strokeWidth = 1.dp.toPx()
)
}
Ilias Zosimadis
02/07/2021, 5:54 PMfillToConstraints
. I also found a solution using a SubcomposeLayout
which can be used to measure the size of a child composable and use it on the composition of a second child. I guess the ContraintLayout is the best solution but I am not sure yet. My use case is not just a Divider and a Composable so I can't use the drawBehind
modifier.