# VisualStateRequest

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

*** ** * ** ***


```
class VisualStateRequest
```

<br />

*** ** * ** ***

A request to modify the visual state of the display for the window.

Useful for when the display is an opaque optical see-through display, e.g. XR glasses, that allows applications to request the display visuals remain sustained even if the screen would normally turn off.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/window/layout/WindowInfoController#requestVisualState(android.content.Context,androidx.window.layout.VisualStateRequest)` |   |

## Summary

| ### Nested types |
|---|
| `class https://developer.android.com/reference/kotlin/androidx/window/layout/VisualStateRequest.Builder` A builder for `https://developer.android.com/reference/kotlin/androidx/window/layout/VisualStateRequest`. |

| ### Public functions |
|---|---|
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/window/layout/VisualStateRequest#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/window/layout/VisualStateRequest#hashCode()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/window/layout/VisualStateRequest#isSustainedVisualsEnabled()()` If true, requests the screen visuals to be sustained on displays when the system would otherwise turn off the screen. |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/window/layout/VisualStateRequest#toString()()` |

## Public functions

### equals

```
open operator fun equals(other: Any?): Boolean
```

### hashCode

```
open fun hashCode(): Int
```

### isSustainedVisualsEnabled

Added in [1.6.0-alpha05](https://developer.android.com/jetpack/androidx/releases/window#1.6.0-alpha05)

```
fun isSustainedVisualsEnabled(): Boolean
```

If true, requests the screen visuals to be sustained on displays when the system would otherwise turn off the screen. The default value is false.

This feature is only supported on Android 16 (API level 37) and above. On lower API levels, the request will be ignored.

### toString

```
open fun toString(): String
```