# Posture

Artifact: [androidx.compose.material3.adaptive:adaptive](https://developer.android.com/jetpack/androidx/releases/compose-material3-adaptive) [View Source](https://cs.android.com/search?q=file:androidx/compose/material3/adaptive/Posture.kt+class:androidx.compose.material3.adaptive.Posture) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-material3-adaptive#1.0.0) Common/AllAndroid/JVM
- Cmn

  ```
  class Posture
  ```

*** ** * ** ***

Posture info that can help make layout adaptation decisions. For example when `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/package-summary#(androidx.compose.material3.adaptive.Posture).separatingVerticalHingeBounds()` is not empty, the layout may want to avoid putting any content over those hinge area. We suggest to use `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/package-summary#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 `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Rect` with window coordinates, instead of layout coordinate.

## Summary

| ### Public constructors |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/Posture#Posture(kotlin.Boolean,kotlin.collections.List)(isTabletop: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, hingeList: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/HingeInfo>)` create an instance of `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/Posture` | Cmn |

| ### Public functions |
|---|---|---|
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/Posture#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/Posture#hashCode()()` | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/Posture#toString()()` | Cmn |

| ### Public properties |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/HingeInfo>` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/Posture#hingeList()` a list of all hinges that are relevant to the posture. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/Posture#isTabletop()` `true` if the current window is considered as in the table top mode, i.e. there is one half-opened horizontal hinge in the middle of the current window. | Cmn |

| ### Extension properties |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Rect>` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/Posture.https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/Posture#(androidx.compose.material3.adaptive.Posture).allHorizontalHingeBounds()` Returns the list of all horizontal hinge bounds. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Rect>` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/Posture.https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/Posture#(androidx.compose.material3.adaptive.Posture).allVerticalHingeBounds()` Returns the list of all vertical hinge bounds. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Rect>` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/Posture.https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/Posture#(androidx.compose.material3.adaptive.Posture).occludingHorizontalHingeBounds()` Returns the list of horizontal hinge bounds that are occluding. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Rect>` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/Posture.https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/Posture#(androidx.compose.material3.adaptive.Posture).occludingVerticalHingeBounds()` Returns the list of vertical hinge bounds that are occluding. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Rect>` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/Posture.https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/Posture#(androidx.compose.material3.adaptive.Posture).separatingHorizontalHingeBounds()` Returns the list of horizontal hinge bounds that are separating. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Rect>` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/Posture.https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/Posture#(androidx.compose.material3.adaptive.Posture).separatingVerticalHingeBounds()` Returns the list of vertical hinge bounds that are separating. | Cmn |

## Public constructors

### Posture

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-material3-adaptive#1.0.0)

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

create an instance of `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/Posture`

## Public functions

### equals

Cmn

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

### hashCode

Cmn

```
open fun hashCode(): Int
```

### toString

Cmn

```
open fun toString(): String
```

## Public properties

### hingeList

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-material3-adaptive#1.0.0)

```
val hingeList: List<HingeInfo>
```

a list of all hinges that are relevant to the posture.

### isTabletop

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-material3-adaptive#1.0.0)

```
val isTabletop: Boolean
```

`true` if the current window is considered as in the table top mode, i.e. there is one half-opened horizontal hinge in the middle of the current window. When this is `true` it usually means it's hard for users to interact with the window area around the hinge and developers may consider separating the layout along the hinge and show software keyboard or other controls in the bottom half of the window.

## Extension properties

### Posture.allHorizontalHingeBounds

Cmn Artifact: [androidx.compose.material3.adaptive:adaptive](https://developer.android.com/jetpack/androidx/releases/compose-material3-adaptive) [View Source](https://cs.android.com/search?q=file:androidx/compose/material3/adaptive/Posture.kt+symbol:allHorizontalHingeBounds) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-material3-adaptive#1.0.0)

```
val Posture.allHorizontalHingeBounds: List<Rect>
```

Returns the list of all horizontal hinge bounds.

### Posture.allVerticalHingeBounds

Cmn Artifact: [androidx.compose.material3.adaptive:adaptive](https://developer.android.com/jetpack/androidx/releases/compose-material3-adaptive) [View Source](https://cs.android.com/search?q=file:androidx/compose/material3/adaptive/Posture.kt+symbol:allVerticalHingeBounds) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-material3-adaptive#1.0.0)

```
val Posture.allVerticalHingeBounds: List<Rect>
```

Returns the list of all vertical hinge bounds.

### Posture.occludingHorizontalHingeBounds

Cmn Artifact: [androidx.compose.material3.adaptive:adaptive](https://developer.android.com/jetpack/androidx/releases/compose-material3-adaptive) [View Source](https://cs.android.com/search?q=file:androidx/compose/material3/adaptive/Posture.kt+symbol:occludingHorizontalHingeBounds) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-material3-adaptive#1.0.0)

```
val Posture.occludingHorizontalHingeBounds: List<Rect>
```

Returns the list of horizontal hinge bounds that are occluding.

### Posture.occludingVerticalHingeBounds

Cmn Artifact: [androidx.compose.material3.adaptive:adaptive](https://developer.android.com/jetpack/androidx/releases/compose-material3-adaptive) [View Source](https://cs.android.com/search?q=file:androidx/compose/material3/adaptive/Posture.kt+symbol:occludingVerticalHingeBounds) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-material3-adaptive#1.0.0)

```
val Posture.occludingVerticalHingeBounds: List<Rect>
```

Returns the list of vertical hinge bounds that are occluding.

### Posture.separatingHorizontalHingeBounds

Cmn Artifact: [androidx.compose.material3.adaptive:adaptive](https://developer.android.com/jetpack/androidx/releases/compose-material3-adaptive) [View Source](https://cs.android.com/search?q=file:androidx/compose/material3/adaptive/Posture.kt+symbol:separatingHorizontalHingeBounds) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-material3-adaptive#1.0.0)

```
val Posture.separatingHorizontalHingeBounds: List<Rect>
```

Returns the list of horizontal hinge bounds that are separating.

### Posture.separatingVerticalHingeBounds

Cmn Artifact: [androidx.compose.material3.adaptive:adaptive](https://developer.android.com/jetpack/androidx/releases/compose-material3-adaptive) [View Source](https://cs.android.com/search?q=file:androidx/compose/material3/adaptive/Posture.kt+symbol:separatingVerticalHingeBounds) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-material3-adaptive#1.0.0)

```
val Posture.separatingVerticalHingeBounds: List<Rect>
```

Returns the list of vertical hinge bounds that are separating.