Created
January 31, 2023 18:18
-
-
Save virtualprodigy/857c81a333a7b5652d532ab35c237f69 to your computer and use it in GitHub Desktop.
Adding a webview in Compose. Other views maybe substituted
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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