Package tangle.viewmodel

Types

TangleGraph
Link copied to clipboard
object TangleGraph
Holds a reference to the application's Dagger graph, so that it can be accessed by TangleViewModelFactory.
TangleViewModelComponent
Link copied to clipboard
interface TangleViewModelComponent
Used to provide a way of retrieving TangleViewModelMapSubcomponent.Factory from a main app Component.
TangleViewModelKeysSubcomponent
Link copied to clipboard
interface TangleViewModelKeysSubcomponent
Used to provide viewModelKeys for use in the TangleViewModelFactory
TangleViewModelMapSubcomponent
Link copied to clipboard
interface TangleViewModelMapSubcomponent
Internal-use Subcomponent which provides a map of ViewModels to the TangleViewModelFactory.
TangleViewModelProviderMap
Link copied to clipboard
Qualifier for the internal Map<KClass<ViewModel>, ViewModel>> used in Tangle's ViewModel multi-binding.
VMInject
Link copied to clipboard
annotation class VMInject
Annotates the constructor of a ViewModel which will be injected via Tangle.

Functions

tangleViewModel
Link copied to clipboard
inline fun <VM : ViewModel> ComponentActivity.tangleViewModel(): Lazy<VM>
Equivalent to the Androidx ktx by viewModels() delegate.
inline fun <VM : ViewModel> Fragment.tangleViewModel(): Lazy<VM>
Equivalent to the Androidx ktx by viewModels() delegate.