Language

ContentProvider.OnConfigurationChanged(Configuration) Method

Definition

Called by the system when the device configuration changes while your component is running. Note that, unlike activities, other components are never restarted when a configuration changes: they must always deal with the results of the change, such as by re-retrieving resources. At the time that this function has been called, your Resources object will have been updated to return resource values matching the new configuration. For more information, read Handling Runtime Changes . This method is always called on the application main thread, and must not perform lengthy operations. The default content provider implementation does nothing. Override this method to take appropriate action. (Content providers do not usually care about things like screen orientation, but may want to know about locale changes.) Parameters newConfig Configuration : The new device configuration. This value cannot be null .

[Android.Runtime.Register("onConfigurationChanged", "(Landroid/content/res/Configuration;)V", "GetOnConfigurationChanged_Landroid_content_res_Configuration_Handler")]
public virtual void OnConfigurationChanged(Android.Content.Res.Configuration? newConfig);
[<Android.Runtime.Register("onConfigurationChanged", "(Landroid/content/res/Configuration;)V", "GetOnConfigurationChanged_Landroid_content_res_Configuration_Handler")>]
abstract member OnConfigurationChanged : Android.Content.Res.Configuration -> unit
override this.OnConfigurationChanged : Android.Content.Res.Configuration -> unit

Parameters

newConfig
Configuration

The new device configuration.

Implements

Attributes

Remarks

Called by the system when the device configuration changes while your component is running. Note that, unlike activities, other components are never restarted when a configuration changes: they must always deal with the results of the change, such as by re-retrieving resources. At the time that this function has been called, your Resources object will have been updated to return resource values matching the new configuration. For more information, read Handling Runtime Changes . This method is always called on the application main thread, and must not perform lengthy operations. The default content provider implementation does nothing. Override this method to take appropriate action. (Content providers do not usually care about things like screen orientation, but may want to know about locale changes.) Parameters newConfig Configuration : The new device configuration. This value cannot be null .

Java documentation for android.content.ContentProvider.onConfigurationChanged(android.content.res.Configuration).

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