View Model Delegate Factory
interface ViewModelDelegateFactory
Content copied to clipboard
This is invoked each time a Fragment accesses a ViewModel via the MvRx extension functions (eg fragmentViewModel, activityViewModel, existingViewModel).
It allows global callbacks for when a view model is instantiated, with control over how the view model state should be instantiated.
Functions
create Lazy View Model
Link copied to clipboard
abstract fun <S : MavericksState, T : Fragment, MavericksView, VM : MavericksViewModel<S>> createLazyViewModel(fragment: T, viewModelProperty: KProperty<*>, viewModelClass: KClass<VM>, keyFactory: () -> String, stateClass: KClass<S>, existingViewModel: Boolean, viewModelProvider: (stateFactory: MavericksStateFactory<VM, S>) -> VM): Lazy<VM>
Content copied to clipboard
Create a Lazy ViewModel for the given Fragment.
Inheritors
DefaultViewModelDelegateFactory
Link copied to clipboard