All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- Add SavedStateHandle support, this includes:
- New constructors to InjectedViewModelProvider to pass the SavedStateRegistry
- New get overloads to construct instances using the SavedStateHandle
- Deprecated old ktx
viewModel
methods in favor ofviewModels
methods to match androidx. These new methods always support SavedStateHandle. - There's a new
injectedvmprovider-fragment-ktx
artifact that you must include if you were using these methods on in fragments.
- Deprecated InjectedViewModelProvider.of, you can use the constructors instead.
- Removed deprecated methods
- Use the same default key as ViewModelProvider so the same ViewModel can be access from both a ViewModelProvider and an InjectedViewModelProvider.
- Add get overload that takes a viewModel class to allow using a lambda as your provider.
- Add viewModel lazy delegate functions for nice init in kotlin
- Deprecated ViewModelProviders and the -extensions package, you can use ViewModelProvider instead.
- Remove usage of deprecated ViewModelStores
- Androidx version of 1.1.0
- Add additional methods to support custom factories.
- Initial androidx version
- Initial version