androidx.web


Web is a collection of modern APIs that can be used with android.webkit, androidx.webkit, and androidx.web.compose.

This package provides components to manage WebView state independently of the view hierarchy, allowing WebView state to outlive configuration changes.

Key components include:

Classes

DetachedWebContentView

A specialized WebContentView that represents a WebContent session which has been temporarily detached from the view hierarchy.

WebContent

WebContent can attach and detachs to outlive Activity lifetimes.

WebContent.Builder

Builder for WebContent.

WebContentView

This is a WebView that is created via WebContent.

Objects

WebFeature

Utility class for checking which Web features are supported on the device.

Top-level functions summary

WebContent
@RequiresFeature(name = "WEB_CONTENT", enforcement = "androidx.web.WebFeature#isFeatureSupported")
WebContent(block: WebContent.Builder.() -> Unit)

Creates and configures a WebContent instance.

Top-level functions

WebContent

@RequiresFeature(name = "WEB_CONTENT", enforcement = "androidx.web.WebFeature#isFeatureSupported")
fun WebContent(block: WebContent.Builder.() -> Unit = {}): WebContent

Creates and configures a WebContent instance.