Skip to content
Commitwise
Menu

Configuration change

A change like rotation, dark mode, language or window size that makes Android destroy and recreate the Activity.

Definition

Android recreates the Activity so layouts, strings and colors for the new configuration are used. Fields and remember values are lost; the ViewModel survives; small UI state survives in rememberSaveable or saved instance state. Work started in the Activity is cancelled or orphaned, which is why loading belongs in the ViewModel.

In practice

Rotating the phone during a profile load starts a second request unless the request lives in the ViewModel.

Related terms

Esc

Type to search the whole site.