LifecycleEventObserver



Interface for receiving any Lifecycle.Event state changes.

If a class implements both this interface and DefaultLifecycleObserver, the methods of DefaultLifecycleObserver are called first, followed by onStateChanged.

Note: If a class implements this interface and also uses the deprecated androidx.lifecycle.OnLifecycleEvent annotations, those annotations are ignored.

Summary

Public functions

Unit

Called when a state transition event occurs.

Cmn

Public functions

onStateChanged

fun onStateChanged(source: LifecycleOwner, event: Lifecycle.Event): Unit

Called when a state transition event occurs.