# SpatialComposeFlags

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


```
@ExperimentalSpatialComposeApi
object SpatialComposeFlags
```

<br />

*** ** * ** ***

Configuration flags to enable or disable specific features or refactorings within the spatial compose module. These are typically enabled by default but can be turned off by module consumers to mitigate potential regressions.

These flags are temporary and subject to removal in future releases. Consumers who disable a flag to fix a regression are advised to report the issue promptly.

**Usage:**

To disable a feature, modify the flag value early in the application lifecycle, such as in the `Application.onCreate` method. Altering flag values after Compose has initialized might lead to unpredictable behavior.

```kotlin
class MyApplication : Application() {
    override fun onCreate() {
        SpatialComposeFlags.isSomeFeatureEnabled = false
        super.onCreate()
    }
}
```

## Summary

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/compose/SpatialComposeFlags#isMainPanelResetOnSubspaceDisposeEnabled()` Determines whether the main panel returns to its default 2D window configuration when switching back from 3D to 2D content after the final Subspace is removed. |

## Public properties

### isMainPanelResetOnSubspaceDisposeEnabled

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

```
var isMainPanelResetOnSubspaceDisposeEnabled: Boolean
```

Determines whether the main panel returns to its default 2D window configuration when switching back from 3D to 2D content after the final Subspace is removed. If set to false, the main panel may remain hidden upon disposal of the last Subspace.