belongs to Maven artifact androidx.lifecycle:lifecycle-extensions:2.0.0-alpha1

ViewModelStores

public class ViewModelStores
extends Object

java.lang.Object
   ↳ androidx.lifecycle.ViewModelStores


This class is deprecated.
Use FragmentActivity.getViewModelStore() or Fragment.getViewModelStore() to retrieve a ViewModelStore directly from activities and fragments.

Factory methods for ViewModelStore class.

Summary

Public methods

static ViewModelStore of(Fragment fragment)

This method is deprecated. Use Fragment.getViewModelStore()

static ViewModelStore of(FragmentActivity activity)

This method is deprecated. Use FragmentActivity.getViewModelStore()

Inherited methods

Public methods

of

ViewModelStore of (Fragment fragment)

This method is deprecated.
Use Fragment.getViewModelStore()

Returns the ViewModelStore of the given fragment.

Parameters
fragment Fragment: a fragment whose ViewModelStore is requested

Returns
ViewModelStore a ViewModelStore

of

ViewModelStore of (FragmentActivity activity)

This method is deprecated.
Use FragmentActivity.getViewModelStore()

Returns the ViewModelStore of the given activity.

Parameters
activity FragmentActivity: an activity whose ViewModelStore is requested

Returns
ViewModelStore a ViewModelStore