public sealed interface FocusTargetModifierNode : DelegatableNode
This modifier node can be delegated to in order to create a modifier that makes a component focusable.
Properties
focusState
public val focusState: FocusState
The FocusState associated with this FocusTargetModifierNode. When you delegate to a FocusTargetModifierNode, instead of implementing FocusEventModifierNode, you can get the state by accessing this variable.
focusability
public var focusability: Focusability
The Focusability for this node.
Note that parent FocusPropertiesModifierNodes that set FocusProperties.canFocus take priority over this property.
If the current focus state would be affected by a new focusability, focus will be invalidated as needed.
Functions
requestFocus
@Deprecated(
message = "Use the version accepting FocusDirection",
replaceWith = ReplaceWith("this.requestFocus()"),
level = DeprecationLevel.HIDDEN,
)
public fun requestFocus(): Boolean
Request focus for this node.
Return
true if focus was successfully requested
requestFocus
public fun requestFocus(focusDirection: FocusDirection = FocusDirection.Enter): Boolean
Request focus for this node.
Parameters
| focusDirection | The direction from which the focus is being requested |
Return
true if focus was successfully requested