Hi, I have a Row with some Columns. The content in...
# compose
j
Hi, I have a Row with some Columns. The content inside those columns have different intrinsic heights. I use IntrinsicSize to get same height on all columns. Now, i'd like to use a swipable Modifier, which seems to use SubcomposeLayout. This leads to the following exception:
java.lang.IllegalStateException: Asking for intrinsic measurements of SubcomposeLayout layouts is not supported.
One advice given is using a Custom Layout to avoid measuring, which I've tried, but how would i place the content without first calling measure?
Complete Exception is:
java.lang.IllegalStateException: Asking for intrinsic measurements of SubcomposeLayout layouts is not supported. This includes components that are built on top of SubcomposeLayout, such as lazy lists, BoxWithConstraints, TabRow, etc. To mitigate this:
- if intrinsic measurements are used to achieve 'match parent' sizing,, consider replacing the parent of the component with a custom layout which controls the order in which children are measured, making intrinsic measurement not needed
- adding a size modifier to the component, in order to fast return the queried intrinsic measurement.
When using Layout() or SubcomposeLayout() i need to call measure to get placeables - is there any other way?
👍 1
117 Views