added in version 1.1.0
belongs to Maven artifact android.arch.lifecycle:extensions:1.1.1

ViewModelStores

public class ViewModelStores
extends Object

java.lang.Object
   ↳ android.arch.lifecycle.ViewModelStores


Factory methods for ViewModelStore class.

Summary

Public methods

static ViewModelStore of(Fragment fragment)

Returns the ViewModelStore of the given fragment.

static ViewModelStore of(FragmentActivity activity)

Returns the ViewModelStore of the given activity.

Inherited methods

Object clone()
boolean equals(Object arg0)
void finalize()
final Class<?> getClass()
int hashCode()
final void notify()
final void notifyAll()
String toString()
final void wait(long arg0, int arg1)
final void wait(long arg0)
final void wait()

Public methods

of

added in version 1.1.0
ViewModelStore of (Fragment fragment)

Returns the ViewModelStore of the given fragment.

Parameters
fragment Fragment: a fragment whose ViewModelStore is requested

Returns
ViewModelStore a ViewModelStore

of

added in version 1.1.0
ViewModelStore of (FragmentActivity activity)

Returns the ViewModelStore of the given activity.

Parameters
activity FragmentActivity: an activity whose ViewModelStore is requested

Returns
ViewModelStore a ViewModelStore