UiMediaScope.WindowPosture


Represents the overall physical posture of the window, aggregating all underlying hardware folding features into a unified state.

Note that this describes the window's state, which may differ from the physical device's posture. For example, if a foldable device is physically half-opened, but the current app is in split-screen mode entirely on one side of the hinge, the window is not intersected by the hinge and its posture will evaluate as isFlat == true.

Summary

Public constructors

Cmn

Public functions

open operator Boolean
equals(other: Any?)
Cmn
open Int
Cmn
open String
Cmn

Public properties

List<UiMediaScope.WindowFold>

A list of all active WindowFold features intersecting the window.

Cmn
Boolean

Whether the physical footprint of the window has no active bends disrupting its surface.

Cmn
Boolean

Whether the device is in a semi-open tabletop state, similar to a laptop.

Cmn

Public constructors

WindowPosture

WindowPosture(folds: List<UiMediaScope.WindowFold>)
Parameters
folds: List<UiMediaScope.WindowFold>

A list of all active WindowFold features intersecting the window.

Public functions

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

toString

open fun toString(): String

Public properties

folds

val folds: List<UiMediaScope.WindowFold>

A list of all active WindowFold features intersecting the window.

isFlat

val isFlat: Boolean

Whether the physical footprint of the window has no active bends disrupting its surface.

This gracefully evaluates to true for traditional non-foldable slab devices, foldables that are completely opened to 180 degrees, and multi-window apps that do not span across a hinge.

isTabletop

val isTabletop: Boolean

Whether the device is in a semi-open tabletop state, similar to a laptop.

This evaluates to true if the window is intersected by at least one horizontal, half-opened hinge, logically splitting the horizontal display into top and bottom halves.