The Developer Preview for Android 11 is now available; test it out and share your feedback.

SemanticsComponentNode

class SemanticsComponentNode : ComponentNode
kotlin.Any
   ↳ androidx.ui.core.ComponentNode
   ↳ androidx.ui.core.SemanticsComponentNode

Summary

Public constructors

<init>(semanticsConfiguration: SemanticsConfiguration, id: Int)

Public methods

Unit
attach(owner: Owner)

Set the Owner of this ComponentNode.

Unit

Remove the ComponentNode from the Owner.

String

Inherited functions

Inherited extension functions

From androidx.ui.core
Unit

Inserts a child ComponentNode at a last index.

ComponentNode?

Executes selector on every parent of this ComponentNode and returns the closest ComponentNode to return true from selector or null if selector returns false for all ancestors.

LayoutNode?

Executes block on first level of LayoutNode descendants of this ComponentNode and returns the last LayoutNode to return true from block.

Boolean

Returns true if this ComponentNode has no descendant LayoutNodes.

Boolean

Returns true if this ComponentNode currently has an ComponentNode.owner.

Owner

Returns ComponentNode.owner or throws if it is null.

Unit

Executes block on first level of LayoutNode descendants of this ComponentNode.

From androidx.compose
operator T

IMPORTANT: This global operator is TEMPORARY, and should be removed whenever an answer for contextual composers is reached.

Properties

Int

SemanticsNode

Inherited properties

Public constructors

<init>

SemanticsComponentNode(
    semanticsConfiguration: SemanticsConfiguration,
    id: Int)

Public methods

attach

fun attach(owner: Owner): Unit

Set the Owner of this ComponentNode. This ComponentNode must not already be attached. owner must match its parent.owner.

detach

fun detach(): Unit

Remove the ComponentNode from the Owner. The owner must not be null before this call and its parent's owner must be null before calling this. This will also detach all children. After executing, the owner will be null.

toString

fun toString(): String

Properties

id

val id: Int

semanticsNode

val semanticsNode: SemanticsNode