Lifecycle

abstract class Lifecycle

A class that has an Android-like lifecycle.

Inheritors

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
abstract val currentState: State

Returns the current state of the Lifecycle.

Functions

Link copied to clipboard
abstract fun addObserver(observer: LifecycleObserver)

Adds a LifecycleObserver that will be notified when the LifecycleOwner changes state.

Link copied to clipboard
abstract fun removeObserver(observer: LifecycleObserver)

Removes the given observer from the observers list.