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
A androidx.lifecycle.LifecycleOwner's lifecycle.
It receives lifecycle owner as a parameter, especially for fragments.
Parameters
lifecycleOwner
See also
for details.