requireContainerLifecycleOwner

fun ViewGroup.requireContainerLifecycleOwner(): LifecycleOwner

If this ViewGroup has a ViewDataBinding associated with it, it will find it and return the associated LifecycleOwner. It will traverse its parents all through the view hierarchy searching for the first LifecycleOwner it encounters.

Throws