Package com.google.accompanist.web

Types

AccompanistWebChromeClient
Link copied to clipboard
open class AccompanistWebChromeClient : WebChromeClient
AccompanistWebChromeClientA parent class implementation of WebChromeClient that can be subclassed to add custom behaviour.
AccompanistWebViewClient
Link copied to clipboard
open class AccompanistWebViewClient : WebViewClient
AccompanistWebViewClientA parent class implementation of WebViewClient that can be subclassed to add custom behaviour.
LoadingState
Link copied to clipboard
sealed class LoadingState
Sealed class for constraining possible loading states.
WebContent
Link copied to clipboard
sealed class WebContent
WebViewError
Link copied to clipboard
@Immutable()
data class WebViewError(request: WebResourceRequest?, error: WebResourceError)
A wrapper class to hold errors from the WebView.
WebViewNavigator
Link copied to clipboard
@Stable()
class WebViewNavigator(coroutineScope: CoroutineScope)
Allows control over the navigation of a WebView from outside the composable.
WebViewState
Link copied to clipboard
@Stable()
class WebViewState(webContent: WebContent)
A state holder to hold the state for the WebView.

Functions

rememberWebViewNavigator
Link copied to clipboard
@Composable()
fun rememberWebViewNavigator(coroutineScope: CoroutineScope = rememberCoroutineScope()): WebViewNavigator
Creates and remembers a WebViewNavigator using the default CoroutineScope or a provided override.
rememberWebViewState
Link copied to clipboard
@Composable()
fun rememberWebViewState(url: String, additionalHttpHeaders: Map<String, String> = emptyMap()): WebViewState
Creates a WebView state that is remembered across Compositions.
rememberWebViewStateWithHTMLData
Link copied to clipboard
@Composable()
fun rememberWebViewStateWithHTMLData(data: String, baseUrl: String? = null): WebViewState
Creates a WebView state that is remembered across Compositions.
WebView
Link copied to clipboard
@Composable()
fun WebView(state: WebViewState, modifier: Modifier = Modifier, captureBackPresses: Boolean = true, navigator: WebViewNavigator = rememberWebViewNavigator(), onCreated: (WebView) -> Unit = {}, onDispose: (WebView) -> Unit = {}, client: AccompanistWebViewClient = remember { AccompanistWebViewClient() }, chromeClient: AccompanistWebChromeClient = remember { AccompanistWebChromeClient() }, factory: (Context) -> WebView? = null)
A wrapper around the Android View WebView to provide a basic WebView composable.