Interface

LayoutInfo

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

Source set: Common
public interface LayoutInfo

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

Properties

width

Source set: Common
public val width: Int

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

height

Source set: Common
public val height: Int

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

coordinates

Source set: Common
public val coordinates: LayoutCoordinates

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

isPlaced

Source set: Common
public val isPlaced: Boolean

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

parentInfo

Source set: Common
public val parentInfo: LayoutInfo?

Parent of this layout.

density

Source set: Common
public val density: Density

The density in use for this layout.

layoutDirection

Source set: Common
public val layoutDirection: LayoutDirection

The layout direction in use for this layout.

viewConfiguration

Source set: Common
public val viewConfiguration: ViewConfiguration

The ViewConfiguration in use for this layout.

isAttached

Source set: Common
public val isAttached: Boolean

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

semanticsId

Source set: Common
public val semanticsId: Int

Unique and stable id representing this node to the semantics system.

isDeactivated

Source set: Common
public val isDeactivated: Boolean

True if the node is deactivated. For example, the children of androidx.compose.ui.layout.SubcomposeLayout which are retained to be reused in future are considered deactivated.

isVirtual

Source set: Common
public val isVirtual: Boolean

A layout node that is ignored by the layout system.

Functions

getModifierInfo

Source set: Common
public 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.

Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: