Class

SemanticsSelector

Projects the given set of nodes to a new set of nodes.

Source set: Common
public class SemanticsSelector(
    public val description: String,
    private val requiresExactlyOneNode: Boolean,
    private val chainedInputSelector: SemanticsSelector? = null,
    private val selector: (Iterable<SemanticsNode>) -> SelectionResult,
)

Projects the given set of nodes to a new set of nodes.

Parameters

description Description that is displayed to the developer in error outputs.
requiresExactlyOneNode Whether this selector should expect to receive exactly 1 node.
chainedInputSelector Optional selector to apply before this selector gets applied.
selector The lambda that implements the projection.

Functions

map

Source set: Common
public fun map(nodes: Iterable<SemanticsNode>, errorOnFail: String): SelectionResult

Maps the given list of nodes to a new list of nodes.

Throws: AssertionError

if required prerequisites to perform the selection were not satisfied.

Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: