Package 

Class DefaultViewModelDelegateFactory

  • All Implemented Interfaces:
    com.airbnb.mvrx.ViewModelDelegateFactory

    
    public final class DefaultViewModelDelegateFactory
     implements ViewModelDelegateFactory
                        

    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).

    ViewModels are created with a RealMavericksStateFactory.

    The Fragment is subscribed to all changes to the ViewModel, so that MavericksView.postInvalidate is called on each State change. This allows the Fragment view to be automatically invalidated, only while the Fragment is in the STARTED lifecycle state.

    • Constructor Detail

      • DefaultViewModelDelegateFactory

        DefaultViewModelDelegateFactory()
    • Method Detail