

When an app enters multi-window mode, available in Android 7.0 (API level 24)and For more information on saving your activity UI state, see Your UI data, use cases for your app, and consideration of speed of retrieval Deciding how to combine these options depends on the complexity of Persistent local storage to preserve an activity’s UI state across configurationĬhanges. Use a combination of ViewModels, the onSaveInstanceState() method, and/or Original activity instance will have the following callbacks triggered:Ī new instance of the activity will be created and have the following callbacks When a configuration change occurs, the activity is destroyed and recreated. Other cases that can cause configuration changes include changes

The most prominent example is a change between portrait and landscape There are a number of events that can trigger a configuration change. Help you manage the activity lifecycle, see ViewModel Happen, and how to handle those transitions.įor more information about activity states, see The Activity This document describes some common cases in which such transitions Different events, some user-triggered and some system-triggered, can cause anĪnother.
