Some Android devices can change configurations while the app is running. Some examples include screen orientation, locale or dark mode vs light mode. When a configuration change occurs, Android recreates existing activities to reload resources for the new configuration. The composable functions are recomposed with the new configurations. It’s important to restore the app UI to its previous state to handle restarting an activity properly.
In this lesson, you’ll learn how to store and restore the state of your composables when a configuration change occurs.
See forum comments
This content was released on Sep 10 2024. The official support period is 6-months
from this date.
Learn about configuration changes in an Android app and how to persist state across a configuration change.
Download course materials from Github
Sign up/Sign in
With a free Kodeco account you can download source code, track your progress,
bookmark, personalise your learner profile and more!
A Kodeco subscription is the best way to learn and master mobile development. Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive catalog of 50+ books and 4,000+ videos.