added in version 1.0.0
belongs to Maven artifact android.arch.lifecycle:viewmodel:1.1.1
belongs to Maven artifact android.arch.lifecycle:viewmodel:1.1.1
AndroidViewModel
public
class
AndroidViewModel
extends ViewModel
java.lang.Object | ||
↳ | android.arch.lifecycle.ViewModel | |
↳ | android.arch.lifecycle.AndroidViewModel |
Application context aware ViewModel
.
Subclasses must have a constructor which accepts Application
as the only parameter.
Summary
Public constructors | |
---|---|
AndroidViewModel(Application application)
|
Public methods | |
---|---|
<T extends Application>
T
|
getApplication()
Return the application. |
Inherited methods | |
---|---|
Public constructors
AndroidViewModel
added in version 1.0.0
AndroidViewModel (Application application)
Parameters | |
---|---|
application |
Application |
Public methods
Annotations
Interfaces
Classes
- AndroidViewModel
- Lifecycle
- LifecycleRegistry
- LifecycleService
- LiveData
- LiveDataReactiveStreams
- MediatorLiveData
- MutableLiveData
- ProcessLifecycleOwner
- ServiceLifecycleDispatcher
- Transformations
- ViewModel
- ViewModelProvider
- ViewModelProvider.AndroidViewModelFactory
- ViewModelProvider.NewInstanceFactory
- ViewModelProviders
- ViewModelProviders.DefaultFactory
- ViewModelStore
- ViewModelStores
Enums