# TestWindowArea

Added in 1.6.0-alpha05

*** ** * ** ***


```
public final class TestWindowArea
```

<br />

*** ** * ** ***

## Summary

| ### Public methods |
|---|---|
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/window/area/WindowArea` | `https://developer.android.com/reference/androidx/window/testing/area/TestWindowArea#createTestWindowArea(androidx.window.layout.WindowMetrics,androidx.window.area.WindowArea.Type,android.os.IBinder)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/window/layout/WindowMetrics metrics, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/window/area/WindowArea.Type type, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/IBinder.html token )` Creates an `https://developer.android.com/reference/androidx/window/testing/area/package-summary#WindowArea(androidx.window.layout.WindowMetrics,androidx.window.area.WindowArea.Type,android.os.IBinder)` instance for testing. |

## Public methods

### createTestWindowArea

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

```
public static final @NonNull WindowArea createTestWindowArea(
    @NonNull WindowMetrics metrics,
    @NonNull WindowArea.Type type,
    @NonNull IBinder token
)
```

Creates an `https://developer.android.com/reference/androidx/window/testing/area/package-summary#WindowArea(androidx.window.layout.WindowMetrics,androidx.window.area.WindowArea.Type,android.os.IBinder)` instance for testing. The default values are a default `https://developer.android.com/reference/androidx/window/layout/WindowMetrics` object, a type of `https://developer.android.com/reference/androidx/window/area/WindowArea.Type#TYPE_REAR_FACING()` and a default `https://developer.android.com/reference/android/os/IBinder.html` token.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/window/layout/WindowMetrics metrics` | The `https://developer.android.com/reference/androidx/window/layout/WindowMetrics` the `https://developer.android.com/reference/androidx/window/testing/area/package-summary#WindowArea(androidx.window.layout.WindowMetrics,androidx.window.area.WindowArea.Type,android.os.IBinder)` should represent. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/window/area/WindowArea.Type type` | Indicates what type this `https://developer.android.com/reference/androidx/window/testing/area/package-summary#WindowArea(androidx.window.layout.WindowMetrics,androidx.window.area.WindowArea.Type,android.os.IBinder)` is. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/IBinder.html token` | Identifying token for this `https://developer.android.com/reference/androidx/window/testing/area/package-summary#WindowArea(androidx.window.layout.WindowMetrics,androidx.window.area.WindowArea.Type,android.os.IBinder)` |

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/window/area/WindowArea` | A `https://developer.android.com/reference/androidx/window/testing/area/package-summary#WindowArea(androidx.window.layout.WindowMetrics,androidx.window.area.WindowArea.Type,android.os.IBinder)` instance for testing. |