Lifecycle

interface Lifecycle

An interface for listening to Activity/Fragment lifecycle events.

Functions

Link copied to clipboard
abstract fun addListener(listener: LifecycleListener)
Adds the given listener to the set of listeners managed by this Lifecycle implementation.
Link copied to clipboard
abstract fun removeListener(listener: LifecycleListener)
Removes the given listener from the set of listeners managed by this Lifecycle implementation, returning true if the listener was removed successfully, and false otherwise.