After having reread https://developer.android.com/jetpack/compose/layouts/intrinsic-measurements, it seems to me that:
• width/height(InstrinsicSize.Min/Max) is really intended for LayoutNodes, and not leaf nodes? (e.g. Row/Column, etc, and not Text, Divider, etc).
• the purpose is to inform the container/parent how to treat it's children (rather than allowing the children to specify how they are sized on an individual basis)
• kind of limiting (for me counterintuitive), because you have to sort of go all in for all the children for one approach or the other. in the example shown, one has to tweak the container's modifiers to get the behavior desired from the individual divider
• I get the problem (I think), given the desire to do one pass recursive measure/place. it's unfortunate that when a row considers it's children's layouts and sets the max height and summed contents, it can't just have ambient partcipants. Sort of like that person who doesn't want to participate in the outcome of a vote and is happy to comply with whatever the result.
I'm a learner, so... I'm restating my understanding/thoughts, looking (humbly) for correction/feedback?
z
Zach Klippenstein (he/him) [MOD]
04/22/2023, 3:48 AM
Technically you can tell a layout node to be its own intrinsic size, but if it’s a leaf node I think it will probably already do that.