LifecycleOwner

interface LifecycleOwner
androidx.lifecycle.LifecycleOwner

A class that has an Android lifecycle. These events can be used by custom components to handle lifecycle changes without implementing any code inside the Activity or the Fragment.

Summary

Public methods
abstract Lifecycle

Returns the Lifecycle of the provider.

Public methods

getLifecycle

@NonNull abstract fun getLifecycle(): Lifecycle

Returns the Lifecycle of the provider.

Return
Lifecycle: The lifecycle of the provider.