# androidx.window.testing.layout

*** ** * ** ***

## Classes

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/window/testing/layout/WindowLayoutInfoPublisherRule` | A `https://junit.org/junit4/javadoc/latest/org/junit/rules/TestRule.html` to help test consuming a stream of `https://developer.android.com/reference/kotlin/androidx/window/layout/WindowLayoutInfo` values. |
| `https://developer.android.com/reference/kotlin/androidx/window/testing/layout/WindowMetricsCalculatorRule` | A `https://junit.org/junit4/javadoc/latest/org/junit/rules/TestRule.html` that will sub out the actual `https://developer.android.com/reference/kotlin/androidx/window/layout/WindowMetricsCalculator` with a more simple one that will support testing independent of the current platform. |

## Objects

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/window/testing/layout/FoldingFeatureTestingConstants` | A class to contain all the constants related to testing `https://developer.android.com/reference/kotlin/androidx/window/layout/DisplayFeature`s. |

## Top-level functions summary

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/window/layout/FoldingFeature` | `https://developer.android.com/reference/kotlin/androidx/window/testing/layout/package-summary#FoldingFeature(android.app.Activity,kotlin.Int,kotlin.Int,androidx.window.layout.FoldingFeature.State,androidx.window.layout.FoldingFeature.Orientation)( activity: https://developer.android.com/reference/android/app/Activity.html, center: @https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = -1) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, size: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, state: https://developer.android.com/reference/kotlin/androidx/window/layout/FoldingFeature.State, orientation: https://developer.android.com/reference/kotlin/androidx/window/layout/FoldingFeature.Orientation )` A convenience method to get a test fold with default values provided. |
| `https://developer.android.com/reference/kotlin/androidx/window/layout/FoldingFeature` | `https://developer.android.com/reference/kotlin/androidx/window/testing/layout/package-summary#FoldingFeature(android.graphics.Rect,kotlin.Int,kotlin.Int,androidx.window.layout.FoldingFeature.State,androidx.window.layout.FoldingFeature.Orientation)( windowBounds: https://developer.android.com/reference/android/graphics/Rect.html, center: @https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = -1) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, size: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, state: https://developer.android.com/reference/kotlin/androidx/window/layout/FoldingFeature.State, orientation: https://developer.android.com/reference/kotlin/androidx/window/layout/FoldingFeature.Orientation )` A convenience method to get a test `https://developer.android.com/reference/kotlin/androidx/window/testing/layout/package-summary#FoldingFeature(android.graphics.Rect,kotlin.Int,kotlin.Int,androidx.window.layout.FoldingFeature.State,androidx.window.layout.FoldingFeature.Orientation)` with default values provided. |
| `https://developer.android.com/reference/kotlin/androidx/window/layout/WindowLayoutInfo` | `https://developer.android.com/reference/kotlin/androidx/window/testing/layout/package-summary#TestWindowLayoutInfo(kotlin.collections.List)(displayFeatures: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/window/layout/DisplayFeature>)` Returns a `https://developer.android.com/reference/kotlin/androidx/window/layout/WindowLayoutInfo` with default values for testing. |
| `https://developer.android.com/reference/kotlin/androidx/window/layout/WindowLayoutInfo` | `[TestWindowLayoutInfo](https://developer.android.com/reference/kotlin/androidx/window/testing/layout/package-summary#TestWindowLayoutInfo(kotlin.collections.List,kotlin.collections.Set))( displayFeatures: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/window/layout/DisplayFeature>, engagementModes: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html<https://developer.android.com/reference/kotlin/androidx/window/layout/WindowLayoutInfo.EngagementMode> )` **This function is deprecated.** WindowLayoutInfo.EngagementMode is deprecated. |
| `https://developer.android.com/reference/kotlin/androidx/window/layout/WindowMetrics` | `https://developer.android.com/reference/kotlin/androidx/window/testing/layout/package-summary#TestWindowMetrics(android.graphics.Rect,kotlin.Float)(bounds: https://developer.android.com/reference/android/graphics/Rect.html, density: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Returns a `https://developer.android.com/reference/kotlin/androidx/window/layout/WindowMetrics` with default values for testing. |
| `https://developer.android.com/reference/kotlin/androidx/window/layout/WindowMetrics` | `https://developer.android.com/reference/kotlin/androidx/window/testing/layout/package-summary#TestWindowMetrics(kotlin.Int,kotlin.Int,kotlin.Int,kotlin.Int,kotlin.Float)(left: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, top: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, right: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, bottom: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, density: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Returns a `https://developer.android.com/reference/kotlin/androidx/window/layout/WindowMetrics` with default values for testing. |

## Top-level functions

### FoldingFeature

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/DisplayFeatureTesting.kt+function:FoldingFeature) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/window#1.0.0)

```
fun FoldingFeature(
    activity: Activity,
    center: @IntRange(from = -1) Int = FOLDING_FEATURE_CENTER_DEFAULT,
    size: Int = 0,
    state: FoldingFeature.State = HALF_OPENED,
    orientation: FoldingFeature.Orientation = HORIZONTAL
): FoldingFeature
```

A convenience method to get a test fold with default values provided. With the default values it returns a `https://developer.android.com/reference/kotlin/androidx/window/layout/FoldingFeature.State#HALF_OPENED()` feature that splits the screen along the `https://developer.android.com/reference/kotlin/androidx/window/layout/FoldingFeature.Orientation#HORIZONTAL()` axis.

The bounds of the feature are calculated based on `https://developer.android.com/reference/kotlin/androidx/window/testing/layout/package-summary#FoldingFeature(android.app.Activity,kotlin.Int,kotlin.Int,androidx.window.layout.FoldingFeature.State,androidx.window.layout.FoldingFeature.Orientation)` and `https://developer.android.com/reference/kotlin/androidx/window/testing/layout/package-summary#FoldingFeature(android.app.Activity,kotlin.Int,kotlin.Int,androidx.window.layout.FoldingFeature.State,androidx.window.layout.FoldingFeature.Orientation)`. If the feature is `https://developer.android.com/reference/kotlin/androidx/window/layout/FoldingFeature.Orientation#VERTICAL()` then the feature is centered horizontally. The top-left x-coordinate is center - (`https://developer.android.com/reference/kotlin/androidx/window/testing/layout/package-summary#FoldingFeature(android.app.Activity,kotlin.Int,kotlin.Int,androidx.window.layout.FoldingFeature.State,androidx.window.layout.FoldingFeature.Orientation)` / 2) and the top-right x-coordinate is center + (`https://developer.android.com/reference/kotlin/androidx/window/testing/layout/package-summary#FoldingFeature(android.app.Activity,kotlin.Int,kotlin.Int,androidx.window.layout.FoldingFeature.State,androidx.window.layout.FoldingFeature.Orientation)` / 2). If the feature is `https://developer.android.com/reference/kotlin/androidx/window/layout/FoldingFeature.Orientation#HORIZONTAL()` then the feature is centered vertically. The top-left y-coordinate is center - (`https://developer.android.com/reference/kotlin/androidx/window/testing/layout/package-summary#FoldingFeature(android.app.Activity,kotlin.Int,kotlin.Int,androidx.window.layout.FoldingFeature.State,androidx.window.layout.FoldingFeature.Orientation)` / 2) and the bottom-left y-coordinate is center - (`https://developer.android.com/reference/kotlin/androidx/window/testing/layout/package-summary#FoldingFeature(android.app.Activity,kotlin.Int,kotlin.Int,androidx.window.layout.FoldingFeature.State,androidx.window.layout.FoldingFeature.Orientation)` / 2). The folding features always cover the window in one dimension and that determines the other coordinates.

Use `https://developer.android.com/reference/kotlin/androidx/window/testing/layout/FoldingFeatureTestingConstants#FOLDING_FEATURE_CENTER_DEFAULT()` to default to the center of `https://developer.android.com/reference/android/app/Activity.html` window bounds. Otherwise, use values greater than or equal to 0 to specify the center.

| Parameters |
|---|---|
| `activity: https://developer.android.com/reference/android/app/Activity.html` | that will house the `https://developer.android.com/reference/kotlin/androidx/window/testing/layout/package-summary#FoldingFeature(android.app.Activity,kotlin.Int,kotlin.Int,androidx.window.layout.FoldingFeature.State,androidx.window.layout.FoldingFeature.Orientation)`. |
| `center: @https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = -1) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html = FOLDING_FEATURE_CENTER_DEFAULT` | the center of the fold complementary to the orientation in px. For a `https://developer.android.com/reference/kotlin/androidx/window/layout/FoldingFeature.Orientation#HORIZONTAL()` fold, this is the y-axis and for a `https://developer.android.com/reference/kotlin/androidx/window/layout/FoldingFeature.Orientation#VERTICAL()` fold this is the x-axis. The default value will be calculated to be in the middle of the window. |
| `size: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html = 0` | the smaller dimension of the fold in px. The larger dimension always covers the entire window. |
| `state: https://developer.android.com/reference/kotlin/androidx/window/layout/FoldingFeature.State = HALF_OPENED` | `https://developer.android.com/reference/kotlin/androidx/window/layout/FoldingFeature.State` of the fold. The default value is `https://developer.android.com/reference/kotlin/androidx/window/layout/FoldingFeature.State#HALF_OPENED()` |
| `orientation: https://developer.android.com/reference/kotlin/androidx/window/layout/FoldingFeature.Orientation = HORIZONTAL` | `https://developer.android.com/reference/kotlin/androidx/window/layout/FoldingFeature.Orientation` of the fold. The default value is `https://developer.android.com/reference/kotlin/androidx/window/layout/FoldingFeature.Orientation#HORIZONTAL()` |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/window/layout/FoldingFeature` | `https://developer.android.com/reference/kotlin/androidx/window/testing/layout/package-summary#FoldingFeature(android.app.Activity,kotlin.Int,kotlin.Int,androidx.window.layout.FoldingFeature.State,androidx.window.layout.FoldingFeature.Orientation)` that is splitting if the width is not 0 and runs parallel to the `https://developer.android.com/reference/kotlin/androidx/window/layout/FoldingFeature.Orientation` axis. |

### FoldingFeature

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/DisplayFeatureTesting.kt+function:FoldingFeature) Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/window#1.2.0)

```
fun FoldingFeature(
    windowBounds: Rect,
    center: @IntRange(from = -1) Int = FOLDING_FEATURE_CENTER_DEFAULT,
    size: Int = 0,
    state: FoldingFeature.State = HALF_OPENED,
    orientation: FoldingFeature.Orientation = HORIZONTAL
): FoldingFeature
```

A convenience method to get a test `https://developer.android.com/reference/kotlin/androidx/window/testing/layout/package-summary#FoldingFeature(android.graphics.Rect,kotlin.Int,kotlin.Int,androidx.window.layout.FoldingFeature.State,androidx.window.layout.FoldingFeature.Orientation)` with default values provided. With the default values it returns a `https://developer.android.com/reference/kotlin/androidx/window/layout/FoldingFeature.State#HALF_OPENED()` feature that splits the screen along the `https://developer.android.com/reference/kotlin/androidx/window/layout/FoldingFeature.Orientation#HORIZONTAL()` axis.

The bounds of the feature are calculated based on `https://developer.android.com/reference/kotlin/androidx/window/testing/layout/package-summary#FoldingFeature(android.graphics.Rect,kotlin.Int,kotlin.Int,androidx.window.layout.FoldingFeature.State,androidx.window.layout.FoldingFeature.Orientation)` and `https://developer.android.com/reference/kotlin/androidx/window/testing/layout/package-summary#FoldingFeature(android.graphics.Rect,kotlin.Int,kotlin.Int,androidx.window.layout.FoldingFeature.State,androidx.window.layout.FoldingFeature.Orientation)`. If the feature is `https://developer.android.com/reference/kotlin/androidx/window/layout/FoldingFeature.Orientation#VERTICAL()` then the feature is centered horizontally. The top-left x-coordinate is center - (`https://developer.android.com/reference/kotlin/androidx/window/testing/layout/package-summary#FoldingFeature(android.graphics.Rect,kotlin.Int,kotlin.Int,androidx.window.layout.FoldingFeature.State,androidx.window.layout.FoldingFeature.Orientation)` / 2) and the top-right x-coordinate is center + (`https://developer.android.com/reference/kotlin/androidx/window/testing/layout/package-summary#FoldingFeature(android.graphics.Rect,kotlin.Int,kotlin.Int,androidx.window.layout.FoldingFeature.State,androidx.window.layout.FoldingFeature.Orientation)` / 2). If the feature is `https://developer.android.com/reference/kotlin/androidx/window/layout/FoldingFeature.Orientation#HORIZONTAL()` then the feature is centered vertically. The top-left y-coordinate is center - (`https://developer.android.com/reference/kotlin/androidx/window/testing/layout/package-summary#FoldingFeature(android.graphics.Rect,kotlin.Int,kotlin.Int,androidx.window.layout.FoldingFeature.State,androidx.window.layout.FoldingFeature.Orientation)` / 2) and the bottom-left y-coordinate is center - (`https://developer.android.com/reference/kotlin/androidx/window/testing/layout/package-summary#FoldingFeature(android.graphics.Rect,kotlin.Int,kotlin.Int,androidx.window.layout.FoldingFeature.State,androidx.window.layout.FoldingFeature.Orientation)` / 2). The folding features always cover the window in one dimension and that determines the other coordinates.

Use `https://developer.android.com/reference/kotlin/androidx/window/testing/layout/FoldingFeatureTestingConstants#FOLDING_FEATURE_CENTER_DEFAULT()` to default to the center of `https://developer.android.com/reference/android/app/Activity.html` window bounds. Otherwise, use values greater than or equal to 0 to specify the center.

| Parameters |
|---|---|
| `windowBounds: https://developer.android.com/reference/android/graphics/Rect.html` | that will contain the `https://developer.android.com/reference/kotlin/androidx/window/testing/layout/package-summary#FoldingFeature(android.graphics.Rect,kotlin.Int,kotlin.Int,androidx.window.layout.FoldingFeature.State,androidx.window.layout.FoldingFeature.Orientation)`. |
| `center: @https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = -1) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html = FOLDING_FEATURE_CENTER_DEFAULT` | the center of the fold complementary to the orientation in px. For a `https://developer.android.com/reference/kotlin/androidx/window/layout/FoldingFeature.Orientation#HORIZONTAL()` fold, this is the y-axis and for a `https://developer.android.com/reference/kotlin/androidx/window/layout/FoldingFeature.Orientation#VERTICAL()` fold this is the x-axis. The default value will be calculated to be in the middle of the window. |
| `size: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html = 0` | the smaller dimension of the fold in px. The larger dimension always covers the entire window. |
| `state: https://developer.android.com/reference/kotlin/androidx/window/layout/FoldingFeature.State = HALF_OPENED` | `https://developer.android.com/reference/kotlin/androidx/window/layout/FoldingFeature.State` of the fold. The default value is `https://developer.android.com/reference/kotlin/androidx/window/layout/FoldingFeature.State#HALF_OPENED()` |
| `orientation: https://developer.android.com/reference/kotlin/androidx/window/layout/FoldingFeature.Orientation = HORIZONTAL` | `https://developer.android.com/reference/kotlin/androidx/window/layout/FoldingFeature.Orientation` of the fold. The default value is `https://developer.android.com/reference/kotlin/androidx/window/layout/FoldingFeature.Orientation#HORIZONTAL()` |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/window/layout/FoldingFeature` | `https://developer.android.com/reference/kotlin/androidx/window/testing/layout/package-summary#FoldingFeature(android.graphics.Rect,kotlin.Int,kotlin.Int,androidx.window.layout.FoldingFeature.State,androidx.window.layout.FoldingFeature.Orientation)` that is splitting if the width is not 0 and runs parallel to the `https://developer.android.com/reference/kotlin/androidx/window/layout/FoldingFeature.Orientation` axis. |

### TestWindowLayoutInfo

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)

```
fun TestWindowLayoutInfo(displayFeatures: List<DisplayFeature> = emptyList()): WindowLayoutInfo
```

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

| Parameters |
|---|---|
| `displayFeatures: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/window/layout/DisplayFeature> = emptyList()` | a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html` of `https://developer.android.com/reference/kotlin/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/kotlin/androidx/window/layout/WindowLayoutInfo` | `https://developer.android.com/reference/kotlin/androidx/window/layout/WindowLayoutInfo` with matching parameters. |

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

### TestWindowLayoutInfo

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)

```
fun [TestWindowLayoutInfo](https://developer.android.com/reference/kotlin/androidx/window/testing/layout/package-summary#TestWindowLayoutInfo(kotlin.collections.List,kotlin.collections.Set))(
    displayFeatures: List<DisplayFeature> = emptyList(),
    engagementModes: Set<WindowLayoutInfo.EngagementMode>
): WindowLayoutInfo
```

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

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

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

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

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

### TestWindowMetrics

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/WindowMetricsTesting.kt+function:TestWindowMetrics) Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/window#1.4.0)

```
fun TestWindowMetrics(bounds: Rect, density: Float = 1.0f): WindowMetrics
```

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

| Parameters |
|---|---|
| `bounds: https://developer.android.com/reference/android/graphics/Rect.html` | The window bounds This value cannot be null. |
| `density: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = 1.0f` | The window density. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/window/layout/WindowMetrics` | `https://developer.android.com/reference/kotlin/androidx/window/layout/WindowMetrics` object |

### TestWindowMetrics

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/WindowMetricsTesting.kt+function:TestWindowMetrics) Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/window#1.4.0)

```
fun TestWindowMetrics(
    left: Int,
    top: Int,
    right: Int,
    bottom: Int,
    density: Float = 1.0f
): WindowMetrics
```

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

| Parameters |
|---|---|
| `left: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The X coordinate of the left side of window bounds. |
| `top: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The Y coordinate of the top side of window bounds. |
| `right: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The X coordinate of the right side of window bounds. |
| `bottom: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The Y coordinate of the bottom side of window bounds. |
| `density: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = 1.0f` | The window density. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/window/layout/WindowMetrics` | `https://developer.android.com/reference/kotlin/androidx/window/layout/WindowMetrics` object |