Language

Activity.IsChangingConfigurations Property

Definition

Check to see whether this activity is in the process of being destroyed in order to be recreated with a new configuration.

public virtual bool IsChangingConfigurations { [Android.Runtime.Register("isChangingConfigurations", "()Z", "GetIsChangingConfigurationsHandler")] get; }
[<get: Android.Runtime.Register("isChangingConfigurations", "()Z", "GetIsChangingConfigurationsHandler")>]
member this.IsChangingConfigurations : bool

Property Value

Attributes

Remarks

Check to see whether this activity is in the process of being destroyed in order to be recreated with a new configuration. This is often used in onStop() to determine whether the state needs to be cleaned up or will be passed on to the next instance of the activity via onRetainNonConfigurationInstance(). However, if the activity has already been in the background as stopped, and then gets recreated with different configuration, there won't be another onPause() or onStop() with this API returning true.

For example, if an activity that is not handling size configuration change is first minimized, and then get rotated with the display, it should first receive onPause() and onStop() with this API returning false, and then receive onDestroy() with this API returning true.

Android reference for android.app.Activity.isChangingConfigurations.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to