Joseph Hawkes-Cates
04/07/2022, 2:13 PMJoseph Hawkes-Cates
04/07/2022, 2:14 PMChris Fillmore
04/07/2022, 6:08 PMclass MyActivity : Activity() {
val webview: WebView = ...
override fun onCreate() {
setContent {
AndroidView(factory = { webview })
}
}
}
Joseph Hawkes-Cates
04/07/2022, 6:37 PMJoseph Hawkes-Cates
04/07/2022, 6:39 PMChris Fillmore
04/07/2022, 8:10 PMremember
the WebView in a parent composable, and pass it to the child screen that needs it. I can’t confirm this is a good idea; I haven’t tested or inquired about that.