Function

DarkMode

A DeviceConfigurationOverride that overrides the dark mode or light mode theme for the contained content.

DarkMode

Source set: Android
fun DeviceConfigurationOverride.Companion.DarkMode(
    isDarkMode: Boolean
): DeviceConfigurationOverride

A DeviceConfigurationOverride that overrides the dark mode or light mode theme for the contained content. Inside the content under test, isSystemInDarkTheme() will return isDarkMode.

Parameters

isDarkMode if true, render content under test in dark mode.

Returns

a DeviceConfigurationOverride that specifies the dark mode for the content under test.

Last updated: