Function

saveFocusedChild

Use this function to request the focus target to save a reference to the currently focused child in its saved instance state.

saveFocusedChild

Source set: Common
public fun FocusRequesterModifierNode.saveFocusedChild(): Boolean

Use this function to request the focus target to save a reference to the currently focused child in its saved instance state. After calling this, focus can be restored to the saved child by making a call to restoreFocusedChild.

Return

true if the focus target associated with this node has a focused child and we successfully saved a reference to it.

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: