ViewModelProviderGetKt
public final class ViewModelProviderGetKt
Summary
Public methods |
|
|---|---|
static final @NonNull VM |
@MainThreadReturns an existing ViewModel or creates a new one in the scope (usually, a fragment or an activity), associated with this |
static final @NonNull VM |
@MainThreadReturns an existing ViewModel or creates a new one in the scope (usually, a fragment or an activity), associated with this |
Public methods
get
@MainThread
public static final @NonNull VM <VM extends ViewModel> get(@NonNull ViewModelProvider receiver)
Returns an existing ViewModel or creates a new one in the scope (usually, a fragment or an activity), associated with this ViewModelProvider.
| See also | |
|---|---|
get |
(Class) |
get
@MainThread
public static final @NonNull VM <VM extends ViewModel> get(@NonNull ViewModelProvider receiver, @NonNull String key)
Returns an existing ViewModel or creates a new one in the scope (usually, a fragment or an activity), associated with this ViewModelProvider and the given key.
| See also | |
|---|---|
get |
(String, Class) |