Stay organized with collections
Save and categorize content based on your preferences.
VisualStateCallback
abstract class VisualStateCallback
Callback interface supplied to postVisualStateCallback
for receiving notifications about the visual state.
Summary
Public methods |
abstract Unit |
Invoked when the visual state is ready to be drawn in the next onDraw .
|
Public constructors
VisualStateCallback
VisualStateCallback()
Public methods
onComplete
abstract fun onComplete(requestId: Long): Unit
Invoked when the visual state is ready to be drawn in the next onDraw
.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# WebView.VisualStateCallback\n\nAdded in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nVisualStateCallback\n===================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/webkit/WebView.VisualStateCallback \"View this page in Java\") \n\n```\nabstract class VisualStateCallback\n```\n\n|---|-------------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.webkit.WebView.VisualStateCallback](#) |\n\nCallback interface supplied to [postVisualStateCallback](/reference/kotlin/android/webkit/WebView#postVisualStateCallback(kotlin.Long,%20android.webkit.WebView.VisualStateCallback)) for receiving notifications about the visual state.\n\nSummary\n-------\n\n| Public constructors ||\n|----------------------------------------------------------|---|\n| [VisualStateCallback](#VisualStateCallback())`()` \u003cbr /\u003e |\n\n| Public methods ||\n|---------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onComplete](#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](/reference/kotlin/android/webkit/WebView#onDraw(android.graphics.Canvas)). |\n\nPublic constructors\n-------------------\n\n### VisualStateCallback\n\n```\nVisualStateCallback()\n```\n\nPublic methods\n--------------\n\n### onComplete\n\nAdded in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun onComplete(requestId: Long): Unit\n```\n\nInvoked when the visual state is ready to be drawn in the next [onDraw](/reference/kotlin/android/webkit/WebView#onDraw(android.graphics.Canvas)).\n\n| Parameters ||\n|-------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `requestId` | [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html): The identifier passed to [postVisualStateCallback](/reference/kotlin/android/webkit/WebView#postVisualStateCallback(kotlin.Long,%20android.webkit.WebView.VisualStateCallback)) when this callback was posted. |"]]