# WebViewCompat.VisualStateCallback

Artifact: [androidx.webkit:webkit](https://developer.android.com/jetpack/androidx/releases/webkit) [View Source](https://cs.android.com/search?q=file:androidx/webkit/WebViewCompat.java+class:androidx.webkit.WebViewCompat.VisualStateCallback) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/webkit#1.1.0)

*** ** * ** ***


```
interface WebViewCompat.VisualStateCallback
```

<br />

*** ** * ** ***

Callback interface supplied to `https://developer.android.com/reference/kotlin/androidx/webkit/WebViewCompat#postVisualStateCallback(android.webkit.WebView,long,androidx.webkit.WebViewCompat.VisualStateCallback)` for receiving notifications about the visual state.

## Summary

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/annotation/UiThread https://developer.android.com/reference/kotlin/androidx/webkit/WebViewCompat.VisualStateCallback#onComplete(long)(requestId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Invoked when the visual state is ready to be drawn in the next `https://developer.android.com/reference/android/webkit/WebView.html#onDraw(android.graphics.Canvas)`. |

## Public functions

### onComplete

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/webkit#1.1.0)

```
@UiThread
fun onComplete(requestId: Long): Unit
```

Invoked when the visual state is ready to be drawn in the next `https://developer.android.com/reference/android/webkit/WebView.html#onDraw(android.graphics.Canvas)`.

| Parameters |
|---|---|
| `requestId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The identifier passed to `https://developer.android.com/reference/kotlin/androidx/webkit/WebViewCompat#postVisualStateCallback(android.webkit.WebView,long,androidx.webkit.WebViewCompat.VisualStateCallback)` when this callback was posted. |