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

Represents a device in a semi-open state, folded similarly to an open book.

Cmn
UiMediaScope.Posture

Represents a flat posture, where the window's display area on a foldable device is flat (either fully open or closed).

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

Represents a device in a semi-open state, folded similarly to an open book. The window spans across a vertical fold or hinge, splitting the display area into two logical parts.

Flat

val FlatUiMediaScope.Posture

Represents a flat posture, where the window's display area on a foldable device is flat (either fully open or closed). It's the default posture for non-foldable devices, or when the window does not span across a hinge or fold (such as in split-screen mode on a single panel).

Tabletop

val TabletopUiMediaScope.Posture

Represents a device in a semi-open state, similar to a laptop. The window spans across a horizontal fold or hinge, splitting the display area into two logical parts.

Public functions

toString

open fun toString(): String