# 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)

*** ** * ** ***


```
public final class WindowArea
```

<br />

*** ** * ** ***

The current state of a window area. The `https://developer.android.com/reference/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 |
|---|
| `public final class https://developer.android.com/reference/androidx/window/area/WindowArea.Type` Represents a type of `https://developer.android.com/reference/androidx/window/area/WindowArea` |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/window/area/WindowArea#equals(kotlin.Any)(https://developer.android.com/reference/java/lang/Object.html other)` |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/window/area/WindowAreaCapability` | `https://developer.android.com/reference/androidx/window/area/WindowArea#getCapability(androidx.window.area.WindowAreaCapability.Operation)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/window/area/WindowAreaCapability.Operation operation)` Returns the `https://developer.android.com/reference/androidx/window/area/WindowAreaCapability` corresponding to the `https://developer.android.com/reference/androidx/window/area/WindowArea#getCapability(androidx.window.area.WindowAreaCapability.Operation)` provided. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/window/area/WindowAreaToken` | `https://developer.android.com/reference/androidx/window/area/WindowArea#getToken()()` `https://developer.android.com/reference/androidx/window/area/WindowAreaToken` token to identify the specific WindowArea |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/window/area/WindowArea.Type` | `https://developer.android.com/reference/androidx/window/area/WindowArea#getType()()` The `https://developer.android.com/reference/androidx/window/area/WindowArea.Type` of this window area |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/window/layout/WindowMetrics` | `https://developer.android.com/reference/androidx/window/area/WindowArea#getWindowMetrics()()` The `https://developer.android.com/reference/androidx/window/layout/WindowMetrics` that represent the size of the area. |
| `int` | `https://developer.android.com/reference/androidx/window/area/WindowArea#hashCode()()` |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/window/area/WindowArea#toString()()` |

## Public methods

### equals

```
public boolean equals(Object other)
```

### getCapability

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

```
public final @NonNull WindowAreaCapability getCapability(@NonNull WindowAreaCapability.Operation operation)
```

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

### getToken

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

```
public final @NonNull WindowAreaToken getToken()
```

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

### getType

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

```
public final @NonNull WindowArea.Type getType()
```

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

### getWindowMetrics

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

```
public final @NonNull WindowMetrics getWindowMetrics()
```

The `https://developer.android.com/reference/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.

### hashCode

```
public int hashCode()
```

### toString

```
public @NonNull String toString()
```