Android 12 Developer Preview is here! Try it out, and give us your feedback!

LayoutInfo

interface LayoutInfo
androidx.compose.ui.layout.LayoutInfo

The public information about the layouts used internally as nodes in the Compose UI hierarchy.

Summary

Public methods
abstract List<ModifierInfo>

This returns a new List of Modifiers and the coordinates and any extra information that may be useful.

Properties
abstract LayoutCoordinates

Coordinates of just the contents of the layout, after being affected by all modifiers.

abstract Int

The measured height of this layout and all of its modifiers.

abstract Boolean

Returns true if this layout is currently a part of the layout tree.

abstract Boolean

Whether or not this layout and all of its parents have been placed in the hierarchy.

abstract LayoutInfo?

Parent of this layout.

abstract Int

The measured width of this layout and all of its modifiers.

Public methods

getModifierInfo

abstract fun getModifierInfo(): List<ModifierInfo>

This returns a new List of Modifiers and the coordinates and any extra information that may be useful. This is used for tooling to retrieve layout modifier and layer information.

Properties

coordinates

abstract val coordinates: LayoutCoordinates

Coordinates of just the contents of the layout, after being affected by all modifiers.

height

abstract val height: Int

The measured height of this layout and all of its modifiers.

isAttached

abstract val isAttached: Boolean

Returns true if this layout is currently a part of the layout tree.

isPlaced

abstract val isPlaced: Boolean

Whether or not this layout and all of its parents have been placed in the hierarchy.

parentInfo

abstract val parentInfo: LayoutInfo?

Parent of this layout.

width

abstract val width: Int

The measured width of this layout and all of its modifiers.