Function

WindowSize

A DeviceConfigurationOverride that overrides the window size for the contained content.

WindowSize

Source set: Common
expect fun DeviceConfigurationOverride.Companion.WindowSize(
    size: DpSize
): DeviceConfigurationOverride

A DeviceConfigurationOverride that overrides the window size for the contained content.

Like ForcedSize, this is only suitable for tests, since this will override LocalDensity to ensure that the size is met (as opposed to Modifier.requiredSize which will result in clipping).

Unlike ForcedSize, this override will override LocalWindowInfo and LocalConfiguration on Android to reflect the requested size.

Parameters

size the DpSize to force the window size to appear as, changing density if necessary

Returns

a DeviceConfigurationOverride that forces the window size.

WindowSize

Source set: Android
actual fun DeviceConfigurationOverride.Companion.WindowSize(
    size: DpSize
): DeviceConfigurationOverride

Last updated: