Package icyllis.modernui.lifecycle
Interface ViewModelProvider.Factory
- All Known Implementing Classes:
ViewModelProvider.NewInstanceFactory
- Enclosing class:
ViewModelProvider
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Implementations of
Factory
interface are responsible to instantiate ViewModels.-
Method Summary
-
Method Details
-
create
Creates a new instance of the givenClass
.- Type Parameters:
T
- The type parameter for the ViewModel.- Parameters:
modelClass
- aClass
whose instance is requested- Returns:
- a newly created ViewModel
-