Compose Unstyled 2.0 is out! Check the official announcement blog ->
Function

hasAnyAncestor

Verifies whether any ancestor in the path to the 3D semantics root satisfies the given matcher.

hasAnyAncestor

Source set: Android
public fun hasAnyAncestor(matcher: SubspaceSemanticsMatcher): SubspaceSemanticsMatcher

Verifies whether any ancestor in the path to the 3D semantics root satisfies the given matcher.

For the following spatial semantic tree:

|-X
|-A |-B   |-C1   |-C2

In case of C1, we would check the matcher against A and B.

Parameters

matcher The semantic criteria to evaluate against all ancestors up to the root.

Returns

a matcher validating the presence of the specified ancestor.

Last updated: