# 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)

*** ** * ** ***


```
public final 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/androidx/window/layout/WindowInfoController#requestVisualState(android.content.Context,androidx.window.layout.VisualStateRequest)` |   |

## Summary

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

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/window/layout/VisualStateRequest#equals(kotlin.Any)(https://developer.android.com/reference/java/lang/Object.html other)` |
| `int` | `https://developer.android.com/reference/androidx/window/layout/VisualStateRequest#hashCode()()` |
| `final boolean` | `https://developer.android.com/reference/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. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/window/layout/VisualStateRequest#toString()()` |

## Public methods

### equals

```
public boolean equals(Object other)
```

### hashCode

```
public int hashCode()
```

### isSustainedVisualsEnabled

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

```
public final boolean isSustainedVisualsEnabled()
```

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

```
public @NonNull String toString()
```