Introduction

Heads up... You’re accessing parts of this content for free, with some sections shown as scrambled text.

Heads up... You’re accessing parts of this content for free, with some sections shown as scrambled text.

Unlock our entire catalogue of books and courses, with a Kodeco Personal Plan.

Unlock now

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
Download course materials from Github
Previous: Quiz: State Hoisting Next: Instruction