# WindowArea

Artifact: [androidx.window:window](https://developer.android.com/jetpack/androidx/releases/window) [View Source](https://cs.android.com/search?q=file:androidx/window/area/WindowArea.kt+class:androidx.window.area.WindowArea) Added in [1.6.0-alpha05](https://developer.android.com/jetpack/androidx/releases/window#1.6.0-alpha05)

*** ** * ** ***


```
class WindowArea
```

<br />

*** ** * ** ***

The current state of a window area. The `https://developer.android.com/reference/kotlin/androidx/window/area/WindowArea` can represent a part of or an entire display in the system. These values can be used to modify the UI to show/hide controls and determine when features can be enabled.

## Summary

| ### Nested types |
|---|
| `class https://developer.android.com/reference/kotlin/androidx/window/area/WindowArea.Type` Represents a type of `https://developer.android.com/reference/kotlin/androidx/window/area/WindowArea` |

| ### Public functions |
|---|---|
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/window/area/WindowArea#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `https://developer.android.com/reference/kotlin/androidx/window/area/WindowAreaCapability` | `https://developer.android.com/reference/kotlin/androidx/window/area/WindowArea#getCapability(androidx.window.area.WindowAreaCapability.Operation)(operation: https://developer.android.com/reference/kotlin/androidx/window/area/WindowAreaCapability.Operation)` Returns the `https://developer.android.com/reference/kotlin/androidx/window/area/WindowAreaCapability` corresponding to the `https://developer.android.com/reference/kotlin/androidx/window/area/WindowArea#getCapability(androidx.window.area.WindowAreaCapability.Operation)` provided. |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/window/area/WindowArea#hashCode()()` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/window/area/WindowArea#toString()()` |

| ### Public properties |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/window/area/WindowAreaToken` | `https://developer.android.com/reference/kotlin/androidx/window/area/WindowArea#token()` `https://developer.android.com/reference/kotlin/androidx/window/area/WindowAreaToken` token to identify the specific WindowArea |
| `https://developer.android.com/reference/kotlin/androidx/window/area/WindowArea.Type` | `https://developer.android.com/reference/kotlin/androidx/window/area/WindowArea#type()` The `https://developer.android.com/reference/kotlin/androidx/window/area/WindowArea.Type` of this window area |
| `https://developer.android.com/reference/kotlin/androidx/window/layout/WindowMetrics` | `https://developer.android.com/reference/kotlin/androidx/window/area/WindowArea#windowMetrics()` The `https://developer.android.com/reference/kotlin/androidx/window/layout/WindowMetrics` that represent the size of the area. |

## Public functions

### equals

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

### getCapability

Added in [1.6.0-alpha05](https://developer.android.com/jetpack/androidx/releases/window#1.6.0-alpha05)

```
fun getCapability(operation: WindowAreaCapability.Operation): WindowAreaCapability
```

Returns the `https://developer.android.com/reference/kotlin/androidx/window/area/WindowAreaCapability` corresponding to the `https://developer.android.com/reference/kotlin/androidx/window/area/WindowArea#getCapability(androidx.window.area.WindowAreaCapability.Operation)` provided. If this `https://developer.android.com/reference/kotlin/androidx/window/area/WindowAreaCapability` does not exist for this `https://developer.android.com/reference/kotlin/androidx/window/area/WindowArea`, a `https://developer.android.com/reference/kotlin/androidx/window/area/WindowAreaCapability` with a `https://developer.android.com/reference/kotlin/androidx/window/area/WindowAreaCapability.Status#WINDOW_AREA_STATUS_UNSUPPORTED()` value is returned.

### hashCode

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

### toString

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

## Public properties

### token

Added in [1.6.0-alpha05](https://developer.android.com/jetpack/androidx/releases/window#1.6.0-alpha05)

```
val token: WindowAreaToken
```

`https://developer.android.com/reference/kotlin/androidx/window/area/WindowAreaToken` token to identify the specific WindowArea

### type

Added in [1.6.0-alpha05](https://developer.android.com/jetpack/androidx/releases/window#1.6.0-alpha05)

```
val type: WindowArea.Type
```

The `https://developer.android.com/reference/kotlin/androidx/window/area/WindowArea.Type` of this window area

### windowMetrics

Added in [1.6.0-alpha05](https://developer.android.com/jetpack/androidx/releases/window#1.6.0-alpha05)

```
val windowMetrics: WindowMetrics
```

The `https://developer.android.com/reference/kotlin/androidx/window/layout/WindowMetrics` that represent the size of the area. Used to determine if the behavior desired fits the size of the window area available.