tezvyn:

What problem does Jetpack ViewModel solve during configuration changes?

Source: developer.android.combeginner

This tests your understanding of state loss during configuration changes. A good answer explains that Activities are destroyed on rotation, and ViewModel survives this event, preserving UI state.

This tests your grasp of the Android lifecycle's destructive nature during configuration changes. A great answer first details how rotation destroys an Activity, losing its state. Then, explain that a ViewModel survives this recreation, allowing the new Activity instance to reconnect and retrieve the data. A red flag is confusing its purpose with `onSaveInstanceState`, which is for system-initiated process death.

Read the original → developer.android.com

Get five bites like this every day.

Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.

What problem does Jetpack ViewModel solve during configuration changes? · Tezvyn