focus

fun focus(focusable: Drawable?): Boolean

Sets the focus to the specified focusable element, throwing an exception if the provided element is not focusable.

Return

true if focus was successfully set, false if the provided focusable is already focused

Parameters

focusable

the element to set focus on

See also

Throws

if the provided drawable is not Drawable.focusable