ViewModelProviders

public class ViewModelProviders
extends Object

java.lang.Object
   ↳ androidx.lifecycle.ViewModelProviders


This class is deprecated.
Use the constructors for ERROR(/ViewModelProvider) directly.

Utilities methods for ViewModelStore class.

Summary

Nested classes

class ViewModelProviders.DefaultFactory

This class is deprecated. Use ERROR(/ViewModelProvider.AndroidViewModelFactory)  

Public constructors

ViewModelProviders()

This constructor is deprecated. This class should not be directly instantiated

Public methods

static ViewModelProvider of(Fragment fragment, ViewModelProvider.Factory factory)

This method is deprecated. Use the 'by viewModels()' Kotlin property delegate or ERROR(/ViewModelProvider#ViewModelProvider(ViewModelStoreOwner, Factory)), passing in the fragment and factory.

static ViewModelProvider of(Fragment fragment)

This method is deprecated. Use the 'by viewModels()' Kotlin property delegate or ERROR(/ViewModelProvider#ViewModelProvider(ViewModelStoreOwner)), passing in the fragment.

static ViewModelProvider of(FragmentActivity activity, ViewModelProvider.Factory factory)

This method is deprecated. Use the 'by viewModels()' Kotlin property delegate or ERROR(/ViewModelProvider#ViewModelProvider(ViewModelStoreOwner, Factory)), passing in the activity and factory.

static ViewModelProvider of(FragmentActivity activity)

This method is deprecated. Use the 'by viewModels()' Kotlin property delegate or ERROR(/ViewModelProvider#ViewModelProvider(ViewModelStoreOwner)), passing in the activity.

Inherited methods