CaptureOffsetModifierFieldValue
class CaptureOffsetModifierFieldValue(initialCaptureType: CaptureOffsetModifierFieldValue.Type = Type.PositionInRoot) : ModifierFieldValue
A ModifierFieldValue that captures layout offset changes
This class monitors position changes of Compose components and captures position information (x, y coordinates) when changes occur. Multiple coordinate systems (Root, Screen, Window, Parent) are supported for position retrieval, used to accurately determine component positions during debugging and layout adjustment.
// Offset capture in Root coordinate system
modifier = ModifierFieldValueList().captureOffset()
// Offset capture in Screen coordinate system
modifier = ModifierFieldValueList().captureOffset(Type.PositionOnScreen)
// Direct creation
val captureOffsetField = CaptureOffsetModifierFieldValue(Type.PositionInWindow)Content copied to clipboard
Parameters
initialCaptureType
Initial coordinate system type (default: PositionInRoot)
See also
Types
Functions
Link copied to clipboard
Renders the UI builder interface for configuring this modifier. This composable is typically displayed in the Preview Lab control panel.
Link copied to clipboard
Creates a modifier from this field value.
Link copied to clipboard
Combines this modifier field value with another to create a list.