Chapter 8. Best Practices for the Android, JUnit, and JVM UI Frameworks
In this chapter, we will cover the following recipes:
- Clean and safe
View
binding with the Android Extensions plugin - Applying coroutines for asynchronous UI programming on Android, JavaFX, and Swing
- Easy class-serialization on Android using the
@Parcelize
annotation - Implementing a custom property delegate that provides lifecycle-aware values
- Easy operations on
SharedPreferences
- Less boilerplate
Cursor
data parsing - Mocking dependencies with the Mockito Kotlin library
- Verifying function invocations
- Unit tests for Kotlin coroutines