EventListener

A listener for tracking the state changes of a given Screen. This can be used for instrumentation and other telemetry.

See also

Types

Link copied to clipboard
object Companion
Link copied to clipboard
fun interface Factory

Functions

Link copied to clipboard
open fun dispose()

Called once when this EventListener should be disposed and the corresponding circuit is disposed.

Link copied to clipboard
open fun onAfterCreatePresenter(screen: Screen, navigator: Navigator, presenter: Presenter<*>?, context: CircuitContext)

Called just after creating a presenter for a given screen. The presenter may be null if none was found.

Link copied to clipboard
open fun onAfterCreateUi(screen: Screen, ui: Ui<*>?, context: CircuitContext)

Called just after creating a ui for a given screen. The ui may be null if none was found.

Link copied to clipboard
open fun onBeforeCreatePresenter(screen: Screen, navigator: Navigator, context: CircuitContext)

Called just before creating a Presenter for a given screen.

Link copied to clipboard
open fun onBeforeCreateUi(screen: Screen, context: CircuitContext)

Called just before creating a Ui for a given screen.

Link copied to clipboard
open fun onDisposeContent()

Called once after the Ui.Content composition is disposed.

Link copied to clipboard
open fun onDisposePresent()

Called once after the Presenter.present composition is disposed.

Link copied to clipboard
open fun onStartContent()

Called once before the initial Ui.Content call.

Link copied to clipboard
open fun onStartPresent()

Called once before the initial Presenter.present call.

Link copied to clipboard
open fun onState(state: CircuitUiState)

Called when there is a new state returned by the Presenter. This is called every time state is recomposed.

Link copied to clipboard
open fun onUnavailableContent(screen: Screen, presenter: Presenter<*>?, ui: Ui<*>?, context: CircuitContext)

Called when no content was found and one or both of presenter and ui are null.

Link copied to clipboard
open fun start()

Called once before doing any processing for the requested circuit.