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

ParentDataModifier

public interface ParentDataModifier extends Modifier.Element


A Modifier that provides data to the parent Layout. This can be read from within the the Layout during measurement and positioning, via IntrinsicMeasurable.parentData. The parent data is commonly used to inform the parent how the child Layout should be measured and positioned.

Summary

Public methods

abstract Object
modifyParentData(@NonNull Density receiver, Object parentData)

Provides a parentData, given the parentData already provided through the modifier's chain.

Inherited methods

From androidx.compose.ui.Modifier
default @NonNull Modifier

Concatenates this modifier with another.

From androidx.compose.ui.Modifier.Element
default boolean
all(
    @NonNull Function1<@NonNull Modifier.Element, @NonNull Boolean> predicate
)

Returns true if predicate returns true for all Elements in this Modifier or if this Modifier contains no Elements.

default boolean
any(
    @NonNull Function1<@NonNull Modifier.Element, @NonNull Boolean> predicate
)

Returns true if predicate returns true for any Element in this Modifier.

default @NonNull R
<R extends Object> foldIn(
    @NonNull R initial,
    @NonNull Function2<@NonNull R, @NonNull Modifier.Element, @NonNull R> operation
)

Accumulates a value starting with initial and applying operation to the current value and each element from outside in.

default @NonNull R
<R extends Object> foldOut(
    @NonNull R initial,
    @NonNull Function2<@NonNull Modifier.Element, @NonNull R, @NonNull R> operation
)

Accumulates a value starting with initial and applying operation to the current value and each element from inside out.

Public methods

modifyParentData

abstract Object modifyParentData(@NonNull Density receiver, Object parentData)

Provides a parentData, given the parentData already provided through the modifier's chain.