Class

UiMediaScope.Posture

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

Source set: Common
@ExperimentalMediaQueryApi
    value class Posture private constructor(private val description: String)

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.

Companion Object

Properties

Source set: Common
val Flat = Posture("Flat")

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).

Source set: Common
val Tabletop = Posture("Tabletop")

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.

Source set: Common
val Book = Posture("Book")

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.

Last updated: