{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

LayoutInfo

public interface LayoutInfo


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

Summary

Public methods

abstract @NonNull LayoutCoordinates

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

abstract @NonNull Density

The density in use for this layout.

abstract int

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

abstract @NonNull LayoutDirection

The layout direction in use for this layout.

abstract @NonNull List<@NonNull ModifierInfo>

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

abstract LayoutInfo

Parent of this layout.

abstract int

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

abstract @NonNull ViewConfiguration

The ViewConfiguration in use for this layout.

abstract int

The measured width 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.

Public methods

getCoordinates

abstract @NonNull LayoutCoordinates getCoordinates()

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

getDensity

abstract @NonNull Density getDensity()

The density in use for this layout.

getHeight

abstract int getHeight()

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

getLayoutDirection

abstract @NonNull LayoutDirection getLayoutDirection()

The layout direction in use for this layout.

getModifierInfo

abstract @NonNull List<@NonNull ModifierInfogetModifierInfo()

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.

getParentInfo

abstract LayoutInfo getParentInfo()

Parent of this layout.

getSemanticsId

abstract int getSemanticsId()

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

getViewConfiguration

abstract @NonNull ViewConfiguration getViewConfiguration()

The ViewConfiguration in use for this layout.

getWidth

abstract int getWidth()

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

isAttached

abstract boolean isAttached()

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

isPlaced

abstract boolean isPlaced()

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