FocusDelegate

abstract class FocusDelegate<K : Any!>
kotlin.Any
   ↳ androidx.recyclerview.selection.FocusDelegate

Override methods in this class to provide application specific behaviors related to focusing item.

Summary

Public constructors

Public methods
abstract Unit

If environment supports focus, focus item.

abstract Unit

If the environment supports focus and something is focused, unfocus it.

abstract Int

abstract Boolean

Public constructors

<init>

FocusDelegate()

Public methods

focusItem

abstract fun focusItem(item: ItemDetailsLookup.ItemDetails<K>): Unit

If environment supports focus, focus item.

clearFocus

abstract fun clearFocus(): Unit

If the environment supports focus and something is focused, unfocus it.

getFocusedPosition

abstract fun getFocusedPosition(): Int
Return
Int: the position of the currently focused item, if any.

hasFocusedItem

abstract fun hasFocusedItem(): Boolean
Return
Boolean: true if there is a focused item.