androidx.compose.material3.adaptive

Posture

Class · from org.jetbrains.compose.material3.adaptive:adaptive:1.3.0

No hand-written docs yet.

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.

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

How to get one

Create it

Properties

isTabletop

val isTabletop: Boolean

hingeList

val hingeList: List<HingeInfo>
Library docs

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.