setViewModelStoreOwner

open fun setViewModelStoreOwner(@Nullable viewModelStoreOwner: ViewModelStoreOwner)

Sets the ViewModelStoreOwner to be used by child views that require ViewModel support. This should typically be set to the hosting Activity or Fragment.

Parameters

viewModelStoreOwner

The ViewModelStoreOwner to use, or null to clear.