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

LayoutModifierNodeKt

public final class LayoutModifierNodeKt


Summary

Public methods

static final void

This will invalidate the current node's layer, and ensure that the layer is redrawn for the next frame.

static final void

This invalidates the current node's measure result, and ensures that a re-measurement (the measurement block rerun) of this node will happen for the next frame.

static final void

This will invalidate the current node's placement result, and ensure that relayout (the placement block rerun) of this node will happen for the next frame .

static final void

Performs the node remeasuring synchronously even if the node was not marked as needs remeasure before.

Public methods

invalidateLayer

public static final void invalidateLayer(@NonNull LayoutModifierNode receiver)

This will invalidate the current node's layer, and ensure that the layer is redrawn for the next frame.

invalidateMeasurement

public static final void invalidateMeasurement(@NonNull LayoutModifierNode receiver)

This invalidates the current node's measure result, and ensures that a re-measurement (the measurement block rerun) of this node will happen for the next frame.

invalidatePlacement

public static final void invalidatePlacement(@NonNull LayoutModifierNode receiver)

This will invalidate the current node's placement result, and ensure that relayout (the placement block rerun) of this node will happen for the next frame .

remeasureSync

public static final void remeasureSync(@NonNull LayoutModifierNode receiver)

Performs the node remeasuring synchronously even if the node was not marked as needs remeasure before. Useful for cases like when during scrolling you need to re-execute the measure block to consume the scroll offset and remeasure your children in a blocking way.