Interface

TraversableNode

Allows Modifier.Node classes to traverse up/down the Node tree for classes of the same type or for a particular key (traverseKey).

Source set: Common
public interface TraversableNode : DelegatableNode

Allows Modifier.Node classes to traverse up/down the Node tree for classes of the same type or for a particular key (traverseKey).

Note: The actual traversals are done in extension functions (see bottom of file).

Properties

traverseKey

Source set: Common
public val traverseKey: Any

Members

Companion

Source set: Common
public companion object

Members

TraverseDescendantsAction

Source set: Common
public enum class TraverseDescendantsAction {
            ContinueTraversal,
            SkipSubtreeAndContinueTraversal,
            CancelTraversal,
        }

Tree traversal actions for the traverseDescendantsIf related functions:

  • Continue - continue the traversal
  • (this is a rarer case)

  • SkipSubtreeAndContinue - continue the traversal BUT skip the matching node's subtree
  • CancelTraversal - cancels the traversal (returns from function call)

To see examples of all the actions, see TraversableModifierNodeTest. For a return/cancel example specifically, see traverseSubtreeWithSameKeyIf_cancelTraversalOfDifferentClassSameKey().

Members

ContinueTraversal

Source set: Common
ContinueTraversal

SkipSubtreeAndContinueTraversal

Source set: Common
SkipSubtreeAndContinueTraversal

CancelTraversal

Source set: Common
CancelTraversal
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: