registerLifecycle

Register ImageCarousel to a lifecycle, so that the auto-play/scroll will pause when the app is in the background. It is also used to correctly initialize the infinite carousel when the app is in the background. It is recommended if you enabled auto-play & infinite carousel.

Parameters

lifecycle

fun registerLifecycle(lifecycleOwner: LifecycleOwner)

It receives lifecycle owner as a parameter, especially for fragments.

Parameters

See also