Package com.airbnb.mvrx
See: Description
-
Class Summary Class Description DeliveryMode Defines what updates a subscription should receive. UniqueOnly The subscription will receive the most recent state update when transitioning from locked to unlocked states (stopped -> started), only if the state has changed while locked. ViewModelDoesNotExistException RealMavericksStateFactory MavericksViewInternalViewModel MavericksViewModel All Mavericks ViewModels must extend this class. MavericksViewModelConfig Provides configuration for a MavericksViewModel. MavericksViewModelConfigFactory Factory for providing the MavericksViewModelConfig for each new ViewModel that is created. ViewModelContext Creation context for the ViewModel. ActivityViewModelContext The ViewModelContext for a ViewModel created with an activity scope ( val viewModel by activityViewModel<MyViewModel>).FragmentViewModelContext The ViewModelContext for a ViewModel created with a fragment scope ( val viewModel by fragmentViewModel<MyViewModel>).StateRestorer MavericksViewModelWrapper ScriptableMavericksStateStore A MavericksStateStore which ignores standard calls to set. MavericksDelegateProvider DefaultViewModelDelegateFactory Creates ViewModels that are wrapped with a lifecycleAwareLazy so that the ViewModel is automatically created when the Fragment is started (if it is not accessed before then). lifecycleAwareLazy This was copied from SynchronizedLazyImpl but modified to automatically initialize in ON_CREATE. AndroidStrictModeExtensionsKt MavericksExtensionsKt MavericksLifecycleAwareFlowKt MavericksViewKt MavericksViewModelExtensionsKt PersistStateKt ViewModelStateContainerKt -
Object Summary Object Description RedeliverOnStart The subscription will receive the most recent state update when transitioning from locked to unlocked states (stopped -> started), even if the state has not changed while locked. Mavericks Companion MavericksViewModelProvider Helper ViewModelProvider that has a single method for taking either a Fragment or ComponentActivity instead of two separate ones. -
Interface Summary Interface Description MavericksStateFactory MavericksView MavericksViewModelFactory Implement this on your ViewModel's companion object for hooks into state creation and ViewModel creation. ScriptableStateStore ViewModelDelegateFactory This is invoked each time a Fragment accesses a ViewModel via the Mavericks extension functions (eg fragmentViewModel, activityViewModel, existingViewModel). -
Annotation Summary Annotation Description PersistState Annotate a field in your MavericksViewModel state with PersistState to have it automatically persisted when Android kills your process to free up memory.