WebViewAssetLoader.Builder

public static final class WebViewAssetLoader.Builder
extends Object

java.lang.Object
   ↳ androidx.webkit.WebViewAssetLoader.Builder


A builder class for constructing WebViewAssetLoader objects.

Summary

Public constructors

Builder()

Public methods

WebViewAssetLoader.Builder addPathHandler(String path, WebViewAssetLoader.PathHandler handler)

Register a WebViewAssetLoader.PathHandler for a specific path.

WebViewAssetLoader build()

Build and return a WebViewAssetLoader object.

WebViewAssetLoader.Builder setDomain(String domain)

Set the domain under which app assets can be accessed.

WebViewAssetLoader.Builder setHttpAllowed(boolean httpAllowed)

Allow using the HTTP scheme in addition to HTTPS.

Inherited methods

Public constructors

Builder

public Builder ()

Public methods

addPathHandler

public WebViewAssetLoader.Builder addPathHandler (String path, 
                WebViewAssetLoader.PathHandler handler)

Register a WebViewAssetLoader.PathHandler for a specific path.

The path should start and end with a "/" and it shouldn't collide with a real web path.