SubLifecycleOwner
An owner of a sub-lifecycle of the given parentLifecycleOwner. The state of the sub-lifecycle is always in a state that is at most the parentLifecycleOwner's state. It can be a lower state either due to being limited with stateLimit or if the sub-lifecycle is destroyed.
The stateLimit allows the sub-lifecycle state, for instance, to remain in the State.CREATED state when parentLifecycleOwner's state is State.STARTED or State.RESUMED.
The sub-lifecycle owner may be destroyed sooner than the destruction of parentLifecycleOwner.
Functions
Inherited functions
Link copied to clipboard
Creates a new LifecycleOwner that limits the state of this LifecycleOwner to Lifecycle.State.CREATED if the view is detached.