Closed linhttbk97 closed 2 months ago
WebView expanded to fit screen width before resize to the parent width
Example code
val url = flow< String> { delay(5000) emit("https://github.com/google/accompanist/issues/1702") }.onStart { emit("") } #onCreate val webURL by url.collectAsState(initial = "") Row(Modifier.fillMaxSize()) { Spacer( modifier = Modifier .width(100.dp) .fillMaxHeight() .background(Color.Red) ) Box( modifier = Modifier.fillMaxSize(), contentAlignment = Alignment.Center ) { if (webURL.isNotEmpty()) { WebView(state = rememberWebViewState(url = webURL), onCreated = { it.settings.javaScriptEnabled = true }, modifier = Modifier.fillMaxSize()) } Text(text = "sssss") } }
WebView always fit parent width
https://github.com/google/accompanist/assets/107523533/724c0c16-ec78-4060-83b1-6d5a54cde01d
Add any other context about the problem here.
The Accompanist WebView library has been deprecated and is no longer receiving any updates.
Describe the bug
WebView expanded to fit screen width before resize to the parent width
To Reproduce
Example code
Expected behavior
WebView always fit parent width
Screenshots?
https://github.com/google/accompanist/assets/107523533/724c0c16-ec78-4060-83b1-6d5a54cde01d
Environment:
Additional context
Add any other context about the problem here.