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

DelegatableNodeKt

public final class DelegatableNodeKt


Summary

Public methods

static final void

Invalidates the subtree of this layout, including layout, drawing, parent data, etc.

static final @NonNull Density

Returns the current Density of the LayoutNode that this DelegatableNode is attached to.

static final @NonNull LayoutDirection

Returns the current LayoutDirection of the LayoutNode that this DelegatableNode is attached to.

Public methods

invalidateSubtree

public static final void invalidateSubtree(@NonNull DelegatableNode receiver)

Invalidates the subtree of this layout, including layout, drawing, parent data, etc.

Calling this method can be a relatively expensive operation as it will cause the entire subtree to relayout and redraw instead of just parts that are otherwise invalidated. Its use should be limited to structural changes.

requireDensity

public static final @NonNull Density requireDensity(@NonNull DelegatableNode receiver)

Returns the current Density of the LayoutNode that this DelegatableNode is attached to. If the node is not attached, this function will throw an IllegalStateException.

requireLayoutDirection

public static final @NonNull LayoutDirection requireLayoutDirection(@NonNull DelegatableNode receiver)

Returns the current LayoutDirection of the LayoutNode that this DelegatableNode is attached to. If the node is not attached, this function will throw an IllegalStateException.