Stop Losing UI State on Rotation: ViewModel and LiveData Done Right
Activities get destroyed on rotation and take your UI state with them. Here's how ViewModel + LiveData fixes that, with a working counter example and three ways to verify the lifecycle behavior yourself.