# WebView.VisualStateCallback

Added in[API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

# VisualStateCallback

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/android/webkit/WebView.VisualStateCallback "View this page in Java")  

```
abstract class VisualStateCallback
```

|---|------------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                           ||
| ↳ | [android.webkit.WebView.VisualStateCallback](https://developer.android.com/reference/kotlin/android/webkit/WebView.VisualStateCallback#) |

Callback interface supplied to[postVisualStateCallback](https://developer.android.com/reference/kotlin/android/webkit/WebView#postVisualStateCallback(kotlin.Long,%20android.webkit.WebView.VisualStateCallback))for receiving notifications about the visual state.

## Summary

|                                                                 Public constructors                                                                  ||
|---------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [VisualStateCallback](https://developer.android.com/reference/kotlin/android/webkit/WebView.VisualStateCallback#VisualStateCallback())`()` <br /> |

|                                                                                                                                                                                                                                           Public methods                                                                                                                                                                                                                                            ||
|--------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| abstract[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onComplete](https://developer.android.com/reference/kotlin/android/webkit/WebView.VisualStateCallback#onComplete(kotlin.Long))`(`requestId:` `[Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)`)` Invoked when the visual state is ready to be drawn in the next[onDraw](https://developer.android.com/reference/kotlin/android/webkit/WebView#onDraw(android.graphics.Canvas)). |

## Public constructors

### VisualStateCallback

```
VisualStateCallback()
```

## Public methods

### onComplete

Added in[API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
abstract fun onComplete(requestId: Long): Unit
```

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

|                                                                                                                                                             Parameters                                                                                                                                                              ||
|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `requestId` | [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html):The identifier passed to[postVisualStateCallback](https://developer.android.com/reference/kotlin/android/webkit/WebView#postVisualStateCallback(kotlin.Long,%20android.webkit.WebView.VisualStateCallback))when this callback was posted. |