BackgroundThreadStateHandler.StateChangeListener


interface BackgroundThreadStateHandler.StateChangeListener<T : Any?>


An interface to handle changes to the state on the foreground thread.

Parameters
<T : Any?>

An immutable object representing the entire state. Must implement equals.

Summary

Public functions

Unit
onStateChanged(oldState: T!, newState: T!)

The state has changed.

Public functions

onStateChanged

fun onStateChanged(oldState: T!, newState: T!): Unit

The state has changed.

A typical usage of this method is to inform external listeners.

This method will be called on the foreground thread.

Parameters
oldState: T!

The old state.

newState: T!

The new state.