SearchResultSelectionController

Controller for a result navigation UI that allows to navigate between search results.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
abstract val hasNext: Boolean

check if there is a next search result available (in relation to selectedIndex)

Link copied to clipboard
abstract val hasPrevious: Boolean

check if there is a previous search result available (in relation to selectedIndex)

Link copied to clipboard
abstract val loopSelection: Boolean

Indicates whether the selection should loop to the opposite end of the result when moving the selected index out of bounds

Link copied to clipboard
abstract val selectedIndex: Int

index of the currently selected search result

Link copied to clipboard
abstract val selectedResult: R?

The actual result referenced by selectedIndex or null

Link copied to clipboard
abstract val size: Int

total amount of available search results

Functions

Link copied to clipboard
abstract suspend fun select(result: R)

Selects the provided result

abstract suspend fun select(index: Int)

Selects the provided result index

Link copied to clipboard
abstract suspend fun selectNext()

Selected the next search result

Link copied to clipboard
abstract suspend fun selectPrevious()

Selects the previous search result