WebViewStartUpConfig.Builder


@WebViewCompat.ExperimentalAsyncStartUp
public final class WebViewStartUpConfig.Builder


Summary

Public constructors

Builder for WebViewStartUpConfig.

Public methods

@NonNull WebViewStartUpConfig

Build and return a WebViewStartUpConfig object.

@NonNull WebViewStartUpConfig.Builder
setShouldRunUiThreadStartUpTasks(
    boolean shouldRunUiThreadStartUpTasks
)

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

Public constructors

Builder

public Builder(@NonNull Executor executor)

Builder for WebViewStartUpConfig.

Parameters
@NonNull 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 methods

build

public @NonNull WebViewStartUpConfig build()

Build and return a WebViewStartUpConfig object.

setShouldRunUiThreadStartUpTasks

public @NonNull WebViewStartUpConfig.Builder setShouldRunUiThreadStartUpTasks(
    boolean shouldRunUiThreadStartUpTasks
)

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.