Class

Posture

Posture info that can help make layout adaptation decisions.

RevenueCat

RevenueCat

Add subscriptions to your apps in minutes

Ad Get started for free
Source set: Common

Added in 1.0.0-alpha06

@ExperimentalMaterial3AdaptiveApi
class Posture(
    val isTabletop: Boolean = false,
    val hingeList: List<HingeInfo> = emptyList()
)

Posture info that can help make layout adaptation decisions. For example when Posture.separatingVerticalHingeBounds is not empty, the layout may want to avoid putting any content over those hinge area. We suggest to use calculatePosture to retrieve instances of this class in applications, unless you have a strong need of customization that cannot be fulfilled by the default implementation.

Note that the hinge bounds will be represent as Rect with window coordinates, instead of layout coordinate.