UiMediaScope.Posture


Describes the posture of the window, typically on a foldable device.

This represents the arrangement of the window's display area in relation to physical features like hinges or folds.

Note that this describes the window's state, which may differ from the physical device posture. For example, if the device is in a half-folded state but the app is in split-screen mode on a single panel, the window posture will be Posture.Flat.

Summary

Public companion properties

UiMediaScope.Posture

The device is folded similarly to an open book, with the flexible screen area oriented vertically.

Cmn
UiMediaScope.Posture

Represents a flat posture, where the foldable device's screen is fully open and flat, similar to a traditional phone or tablet.

Cmn
UiMediaScope.Posture

Represents a device in a semi-open state, similar to a laptop.

Cmn

Public functions

open String
Cmn

Public companion properties

Book

val BookUiMediaScope.Posture

The device is folded similarly to an open book, with the flexible screen area oriented vertically.

Flat

val FlatUiMediaScope.Posture

Represents a flat posture, where the foldable device's screen is fully open and flat, similar to a traditional phone or tablet. It's the default posture for non-foldable devices.

Tabletop

val TabletopUiMediaScope.Posture

Represents a device in a semi-open state, similar to a laptop. The flexible display area is split into two logical parts, with a fold in between.

Public functions

toString

open fun toString(): String