ComposableLifecycleObserver

An interface for observing lifecycle events of a LifecycleOwner.

All methods provide default empty implementations so implementers can selectively override only the callbacks they need.

Functions

Link copied to clipboard
open fun onAny(lifecycleOwner: LifecycleOwner, event: Lifecycle.Event)

Called whenever any lifecycle event occurs.

Link copied to clipboard
open fun onCreate(lifecycleOwner: LifecycleOwner)

Called after the LifecycleOwner's onCreate event completes.

Link copied to clipboard
open fun onDestroy(lifecycleOwner: LifecycleOwner)

Called when the LifecycleOwner is being destroyed (ON_DESTROY).

Link copied to clipboard
open fun onPause(lifecycleOwner: LifecycleOwner)

Called when the LifecycleOwner is paused (ON_PAUSE).

Link copied to clipboard
open fun onResume(lifecycleOwner: LifecycleOwner)

Called when the LifecycleOwner becomes visible and interactive (ON_RESUME).

Link copied to clipboard
open fun onStart(lifecycleOwner: LifecycleOwner)

Called when the LifecycleOwner transitions to the STARTED state.

Link copied to clipboard
open fun onStop(lifecycleOwner: LifecycleOwner)

Called when the LifecycleOwner is no longer visible (ON_STOP).