onWillAttach
fun onWillAttach(validity: LifecycleListener.Validity = LifecycleListener.Validity.Infinite, listener: () -> Unit): CancellationToken
Content copied to clipboard
Registers listener for the WillAttach event.
NOTE: Listener is not called if this instance is already attached.
Parameters
validity
Specify how many events should the listener receive. Defaults to an infinite validity.