What’s New in Android Architecture Components in a Nutshell
1 min readMay 9, 2019
This year google added some of the features in android architecture components. I am sharing the highlights here.
Data Binding:
- Faster annotation processing
- Live class generation means no need to compile after updating xml
- Better error messages rather showing thousand of meaningless errors
- View Binding for accessing views (From AS 3.6) which is 100% compile safety and faster build time
Lifecycle:
- SavedState after process kill/death using SavedStateHandle
- SavedState for UI bits like selections, scroll state and navigation state even for LiveData
- ViewModel initialisation by property delegation
- Use direct livedata instead of using Transformations for mapping
Workmanager:
- On demand initialisation means need context for lazy initialisation
- Integration with play services for pre-M support
- Unit testing and robolectric support
- Foreground service support
Room:
- Added coroutines suspend methods for Room DAO interface
- Full text search
- RX return support in Room DAO interface
Paging:
- Network support with error handling
- Better RXJava and Coroutines support
Waiting for these awesome updates with stable release.