Join us for ⁠#Android11: The Beta Launch Show on June 3!

FocusNode

interface FocusNode
androidx.ui.core.input.FocusManager.FocusNode

An interface for focusable object.

Any component that will have input focus must implement this FocusNode and observe focus state.

Summary

Public methods

abstract Unit
onBlur(hasNextClient: Boolean)

Called when this component is about to lose the focus

abstract Unit

Called when this component gained the focus

Public methods

onBlur

abstract fun onBlur(hasNextClient: Boolean): Unit

Called when this component is about to lose the focus

Parameters
hasNextClient: Boolean True if this node loses focus due to focusing in to another node . False if this node loses focus due to calling FocusManager#blur.

onFocus

abstract fun onFocus(): Unit

Called when this component gained the focus