bohregard
06/23/2020, 1:43 AMBox(
modifier = Modifier.fillMaxWidth() + Modifier.fillMaxHeight()
) {
AndroidView(view = webView(ContextAmbient.current, "<https://google.com>"))
}
fun webView(context: Context, url: String) = WebView(context).apply {
loadUrl(url)
settings.apply {
javaScriptEnabled = true
domStorageEnabled = true
}
webViewClient = client
}
Any ideas why it would be frozen?Zach Klippenstein (he/him) [MOD]
06/23/2020, 5:44 AMAndroidView
- I think you need to remember
it or create the webview using the compose hooks.
I believe compose also ships with a built-in helper for webview specifically that acts as a good sample: https://cs.android.com/androidx/platform/frameworks/support/+/androidx-master-dev:ui/ui-android-view/src/main/java/androidx/ui/androidview/WebComponent.kt
The emitView
syntax just landed last week, so the current syntax in dev13 is a little different, but I think you can just use WebComponent directly (or look at the history on that page to see what it used to be)Manuel Vivo
06/23/2020, 6:32 AMZach Klippenstein (he/him) [MOD]
06/23/2020, 2:03 PMManuel Vivo
06/23/2020, 2:16 PMbohregard
06/23/2020, 2:17 PMcoolchandrakumar
06/25/2020, 4:18 AMManuel Vivo
06/25/2020, 8:25 AMAndroidView
?coolchandrakumar
06/25/2020, 8:29 AMemitView
syntax just landed last week, so the current syntax in dev13 is a little different"
Looking this caseZach Klippenstein (he/him) [MOD]
06/25/2020, 12:39 PMemitView
stuff landed on June 18, which I believe was the day after dev14 was cut, so I think it will only be available in dev15. Also it's not mentioned in the release notes for dev14. You can click the History button at the bottom of the file to see how it was done before.bohregard
06/25/2020, 1:22 PMZach Klippenstein (he/him) [MOD]
06/25/2020, 1:23 PMbohregard
06/25/2020, 1:42 PMShep Shapard
08/26/2020, 7:20 PM