# SpatialWindowTester

Artifact: [androidx.xr.scenecore:scenecore-testing](https://developer.android.com/jetpack/androidx/releases/xr-scenecore) [View Source](https://cs.android.com/search?q=file:androidx/xr/scenecore/testing/SpatialWindowTester.kt+class:androidx.xr.scenecore.testing.SpatialWindowTester) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-scenecore#1.0.0)

*** ** * ** ***


```
public final class SpatialWindowTester
```

<br />

*** ** * ** ***

A test data accessor for the `https://developer.android.com/reference/androidx/xr/scenecore/SpatialWindow`.

## Summary

| ### Public methods |
|---|---|
| `final float` | `https://developer.android.com/reference/androidx/xr/scenecore/testing/SpatialWindowTester#getPreferredAspectRatio()()` The preferred main panel aspect ratio determined by taking the panel's width over its height. |

## Public methods

### getPreferredAspectRatio

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-scenecore#1.0.0)

```
public final float getPreferredAspectRatio()
```

The preferred main panel aspect ratio determined by taking the panel's width over its height.

This reflects the preference set via `https://developer.android.com/reference/androidx/xr/scenecore/SpatialWindow#setPreferredAspectRatio(androidx.xr.runtime.Session,android.app.Activity,kotlin.Float)`.

`https://developer.android.com/reference/androidx/xr/scenecore/SpatialWindow#NO_PREFERRED_ASPECT_RATIO()` indicates that there are no preferences for Home Space Mode.