dispatchVirtualDisplayConfigurationChanged
Notifies every AndroidAutoVirtualDisplayScreen in this session's screen stack of a car configuration change, including screens below the top. Other screen types are left unchanged.
Call this from your session's Session.onCarConfigurationChanged override:
override fun onCarConfigurationChanged(newConfiguration: Configuration) {
super.onCarConfigurationChanged(newConfiguration)
dispatchVirtualDisplayConfigurationChanged(newConfiguration)
}Content copied to clipboard
Import com.mapbox.navigation.ui.androidauto.virtualdisplay.dispatchVirtualDisplayConfigurationChanged to use the extension. Java callers can use AndroidAutoVirtualDisplaySessionUtils.dispatchVirtualDisplayConfigurationChanged(this, newConfiguration).
Each screen dispatches the configuration to its view hierarchy and requests layout and redraw. Views are not recreated and resources inflated from XML are not automatically reapplied.
Parameters
newConfiguration
the configuration supplied by the car session