LayoutDirection

Function

Common
expect fun DeviceConfigurationOverride.Companion.LayoutDirection(
    layoutDirection: LayoutDirection
): DeviceConfigurationOverride

A DeviceConfigurationOverride that overrides the layout direction for the contained content.

Parameters

layoutDirectionthe LayoutDirection to use for the content under test.

Returns

a DeviceConfigurationOverride that specifies the layout direction for the content under test.
Android
actual fun DeviceConfigurationOverride.Companion.LayoutDirection(
    layoutDirection: LayoutDirection
): DeviceConfigurationOverride

Code Examples

DeviceConfigurationOverrideLayoutDirectionSample

@Composable
fun DeviceConfigurationOverrideLayoutDirectionSample() {
    DeviceConfigurationOverride(DeviceConfigurationOverride.LayoutDirection(LayoutDirection.Rtl)) {
        MyComponent() // will be rendered with a right-to-left layout direction
    }
}