onSizeChanged
Android
public fun SubspaceModifier.onSizeChanged(
onSizeChanged: (size: IntVolumeSize) -> Unit
): SubspaceModifier
Invokes onSizeChanged with the IntVolumeSize of the element when its size changes.
This callback is executed after the layout pass when the SubspaceComposable's size is finalized. It will be invoked at least once when the size becomes available and subsequently whenever the size changes.
For observing changes to position or orientation in addition to size, use SubspaceModifier.onGloballyPositioned instead.
Parameters
| onSizeChanged | The callback that is invoked when the size changes. The IntVolumeSize parameter represents the new size of the layout in pixels. |