OnConfigurationChangedProvider

Added in 1.8.0

interface OnConfigurationChangedProvider

Known direct subclasses
ComponentActivity

Base class for activities that enables composition of higher level components.

Known indirect subclasses
AppCompatActivity

Base class for activities that wish to use some of the newer platform features on older Android devices.

BaseCarAppActivity

Core logic for CarAppLibrary Activity interaction with a host.

CarAppActivity

The class representing a car app activity in the main display.

FragmentActivity

Base class for activities that want to use the support-based Fragments.

LauncherActivity

This class handles providing the right launcher activity when running native applications and Car App Library applications.

PreviewActivity

Activity used to run @Composable previews from Android Studio.

SdkActivity

Activity to start for SDKs running locally.

SubspaceTestingActivity

Custom test class that should be used for testing SubspaceComposable content.


Interface for components that can dispatch calls from ComponentCallbacks.onConfigurationChanged.

Summary

Public functions

Unit

Add a new listener that will get a callback associated with ComponentCallbacks.onConfigurationChanged with the new Configuration.

Unit

Remove a previously added listener.

Public functions

addOnConfigurationChangedListener

Added in 1.8.0
fun addOnConfigurationChangedListener(listener: Consumer<Configuration>): Unit

Add a new listener that will get a callback associated with ComponentCallbacks.onConfigurationChanged with the new Configuration.

Parameters
listener: Consumer<Configuration>

The listener that should be called whenever {ComponentCallbacks.onConfigurationChanged was called.

removeOnConfigurationChangedListener

Added in 1.8.0
fun removeOnConfigurationChangedListener(listener: Consumer<Configuration>): Unit

Remove a previously added listener. It will not receive any future callbacks.

Parameters
listener: Consumer<Configuration>

The listener previously added with addOnConfigurationChangedListener that should be removed.