# WindowLayoutInfoTesting

Added in 1.0.0

*** ** * ** ***


```
public final class WindowLayoutInfoTesting
```

<br />

*** ** * ** ***

## Summary

| ### Public methods |
|---|---|
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/window/layout/WindowLayoutInfo` | `https://developer.android.com/reference/androidx/window/testing/layout/WindowLayoutInfoTesting#createWindowLayoutInfo(kotlin.collections.List)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/window/layout/DisplayFeature> displayFeatures )` Returns a `https://developer.android.com/reference/androidx/window/layout/WindowLayoutInfo` with default values for testing. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/window/layout/WindowLayoutInfo` | `[createWindowLayoutInfo](https://developer.android.com/reference/androidx/window/testing/layout/WindowLayoutInfoTesting#createWindowLayoutInfo(kotlin.collections.List,kotlin.collections.Set))( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/window/layout/DisplayFeature> displayFeatures, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Set.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/window/layout/WindowLayoutInfo.EngagementMode> engagementModes )` **This method is deprecated.** WindowLayoutInfo.EngagementMode is deprecated. |

## Public methods

### createWindowLayoutInfo

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/layout/WindowLayoutInfoTesting.kt+function:TestWindowLayoutInfo)

```
public static final @NonNull WindowLayoutInfo createWindowLayoutInfo(
    @NonNull List<@NonNull DisplayFeature> displayFeatures
)
```

Returns a `https://developer.android.com/reference/androidx/window/layout/WindowLayoutInfo` with default values for testing.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/window/layout/DisplayFeature> displayFeatures` | a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html` of `https://developer.android.com/reference/androidx/window/layout/DisplayFeature`, the default value is an empty `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html`. |

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/window/layout/WindowLayoutInfo` | `https://developer.android.com/reference/androidx/window/layout/WindowLayoutInfo` with matching parameters. |

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/window/testing/layout/WindowLayoutInfoPublisherRule#overrideWindowLayoutInfo(androidx.window.layout.WindowLayoutInfo)` |   |

### createWindowLayoutInfo

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/layout/WindowLayoutInfoTesting.kt+function:TestWindowLayoutInfo)

```
public static final @NonNull WindowLayoutInfo [createWindowLayoutInfo](https://developer.android.com/reference/androidx/window/testing/layout/WindowLayoutInfoTesting#createWindowLayoutInfo(kotlin.collections.List,kotlin.collections.Set))(
    @NonNull List<@NonNull DisplayFeature> displayFeatures,
    @NonNull Set<@NonNull WindowLayoutInfo.EngagementMode> engagementModes
)
```

> [!CAUTION]
> **This method is deprecated.**   
> WindowLayoutInfo.EngagementMode is deprecated. Use TestWindowLayoutInfo without engagementModes, use this instead:
>
> ```
> TestWindowLayoutInfo(displayFeatures)
> ```

Returns a `https://developer.android.com/reference/androidx/window/layout/WindowLayoutInfo` with default values for testing.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/window/layout/DisplayFeature> displayFeatures` | a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html` of `https://developer.android.com/reference/androidx/window/layout/DisplayFeature`, the default value is an empty `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html`. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Set.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/window/layout/WindowLayoutInfo.EngagementMode> engagementModes` | a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html` of `https://developer.android.com/reference/androidx/window/layout/WindowLayoutInfo.EngagementMode`, the default value is `https://developer.android.com/reference/androidx/window/layout/WindowLayoutInfo.EngagementMode#VISUALS_ON()` and `https://developer.android.com/reference/androidx/window/layout/WindowLayoutInfo.EngagementMode#AUDIO_ON()`. |

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/window/layout/WindowLayoutInfo` | `https://developer.android.com/reference/androidx/window/layout/WindowLayoutInfo` with matching parameters. |

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/window/testing/layout/WindowLayoutInfoPublisherRule#overrideWindowLayoutInfo(androidx.window.layout.WindowLayoutInfo)` |   |