LifecycleAwareListeners
LifecycleAwareListeners is a container for listeners with Android Lifecycle awareness.
It forwards events to registered listeners, depending on their lifecycle state. Events are forwarded to regular listeners when their lifecycle owner is active. Events for forever listeners are always received.
Lifecycle owners are considered active when their state is Lifecycle.State.STARTED or Lifecycle.State.RESUMED.
Listeners will be removed automatically when their lifecycle owner's state becomes Lifecycle.State.DESTROYED.
Constructors
Properties
Functions
Link copied to clipboard
Add a listener that will receive events when its LifecycleOwner is active.
Link copied to clipboard
Add a listener that will always receive events.
Link copied to clipboard
Remove listener.
Link copied to clipboard
Remove all listeners registered with a lifecycle owner.