koin-android-viewmodel / org.koin.android.viewmodel.ext.android / android.support.v4.app.Fragment / sharedViewModel

sharedViewModel

inline fun <reified T : ViewModel> Fragment.sharedViewModel(qualifier: Qualifier? = null, noinline from: ViewModelStoreOwnerDefinition = { activity as ViewModelStoreOwner }, noinline parameters: ParametersDefinition? = null): Lazy<T>

Lazy getByClass a viewModel instance shared with Activity

Parameters

qualifier -

from -

parameters -

fun <T : ViewModel> Fragment.sharedViewModel(clazz: KClass<T>, qualifier: Qualifier? = null, from: ViewModelStoreOwnerDefinition = { activity as ViewModelStoreOwner }, parameters: ParametersDefinition? = null): Lazy<T>

Lazy getByClass a viewModel instance shared with Activity

Parameters

qualifier -

from -

parameters -

clazz -