Home
vector / com.haroldadmin.vector / androidx.fragment.app.Fragment
Extensions for androidx.fragment.app.Fragment¶
| Name | Summary |
|---|---|
| activityViewModel | fun <VM :VectorViewModel<S>, S :VectorState>Fragment.activityViewModel(stateStoreContext:CoroutineContext= Dispatchers.Default + Job()):vectorLazy<VM>Lazy delegate for creating an activity scoped VectorViewModel from a Fragment. Creates and returns the requested VectorViewModel automatically using reflection. The returned ViewModel is scoped to this Fragment's parent activity. fun <VM :VectorViewModel<S>, S :VectorState>Fragment.activityViewModel(viewModelCreator: (initialState:S, handle:SavedStateHandle) ->VM):vectorLazy<VM>Lazy delegate for creating a parent activity scoped VectorViewModel from a Fragment using the given producer lambda |
| activityViewModelOwner | funFragment.activityViewModelOwner():ActivityViewModelOwnerCreates a ViewModelOwner from the parent activity of this Fragment |
| fragmentViewModel | fun <VM :VectorViewModel<S>, S :VectorState>Fragment.fragmentViewModel(stateStoreContext:CoroutineContext= Dispatchers.Default + Job()):vectorLazy<VM>Lazy delegate for creating a VectorViewModel from a Fragment fun <VM :VectorViewModel<S>, S :VectorState>Fragment.fragmentViewModel(viewModelCreator: (initialState:S, handle:SavedStateHandle) ->VM):vectorLazy<VM>Lazy delegate for creating a VectorViewModel from a Fragment using the given producer lambda |
| fragmentViewModelOwner | funFragment.fragmentViewModelOwner():FragmentViewModelOwnerCreates a ViewModelOwner from this Fragment |