WebViewStartUpConfig.Builder


@WebViewCompat.ExperimentalAsyncStartUp
class WebViewStartUpConfig.Builder


Summary

Public constructors

Builder(executor: Executor)

Builder for WebViewStartUpConfig.

Public functions

WebViewStartUpConfig

Build and return a WebViewStartUpConfig object.

WebViewStartUpConfig.Builder
setShouldRunUiThreadStartUpTasks(
    shouldRunUiThreadStartUpTasks: Boolean
)

Setter to run only parts of startup that doesn't block the UI thread.

Public constructors

Builder

Builder(executor: Executor)

Builder for WebViewStartUpConfig.

Parameters
executor: Executor

The portions of WebView startup that can run on a background thread are scheduled on this executor. Blocking tasks will be run on the executor.

Public functions

build

fun build(): WebViewStartUpConfig

Build and return a WebViewStartUpConfig object.

Returns
WebViewStartUpConfig

immutable WebViewStartUpConfig object.

setShouldRunUiThreadStartUpTasks

fun setShouldRunUiThreadStartUpTasks(
    shouldRunUiThreadStartUpTasks: Boolean
): WebViewStartUpConfig.Builder

Setter to run only parts of startup that doesn't block the UI thread.

WebView startup tasks that are required to run on the UI thread are not attempted when startUpWebView is called if set to false.

Defaults to `true`. If not set to `false`, UI thread startup tasks will be run.