onDidAttach

fun onDidAttach(validity: LifecycleListener.Validity = LifecycleListener.Validity.Infinite, listener: () -> Unit): CancellationToken

Registers listener for the DidAttach 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.