Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save virtualprodigy/857c81a333a7b5652d532ab35c237f69 to your computer and use it in GitHub Desktop.
Save virtualprodigy/857c81a333a7b5652d532ab35c237f69 to your computer and use it in GitHub Desktop.
Adding a webview in Compose. Other views maybe substituted
AndroidView(factory = {
WebView(it).apply {
layoutParams = ViewGroup.LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.MATCH_PARENT
)
webViewClient = WebViewClient()
loadUrl(url)
}
}, update = {
it.loadUrl(url)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment