Function

getFocusedRect

Calculates the rectangular area in this node's coordinates that corresponds to the focus area of the focused node under this FocusTargetModifierNode, including itself.

getFocusedRect

Source set: Common
public fun FocusTargetModifierNode.getFocusedRect(): Rect?

Calculates the rectangular area in this node's coordinates that corresponds to the focus area of the focused node under this FocusTargetModifierNode, including itself.

This function returns null when;

  • This node is not focused and there is no focused descendant.
  • This node is detached from the composition hierarchy.
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: