generated from JetBrains/compose-multiplatform-template
-
Notifications
You must be signed in to change notification settings - Fork 124
Open
Description
Hi! I met some strange behavior with rendering the webview. If I have any Dialogs or Progress or any other view that should overlay WebView - WebView always above and this breaks a lot of UI things.
Just a sample of this to see this behavior. Is it something expected and I should play around with this? Or did I do something wrong?
val webViewState =
rememberWebViewStateWithHTMLFile(
fileName = "fileChoose.html",
readType = WebViewFileReadType.ASSET_RESOURCES,
)
val webViewNavigator = rememberWebViewNavigator()
LaunchedEffect(Unit) {
webViewState.webSettings.zoomLevel = 1.0
webViewState.webSettings.apply {
zoomLevel = 1.0
logSeverity = KLogSeverity.Debug
backgroundColor = Color.White
androidWebSettings.apply {
isAlgorithmicDarkeningAllowed = true
safeBrowsingEnabled = true
allowFileAccess = false
}
iOSWebSettings.apply {
backgroundColor = Color.White
underPageBackgroundColor = Color.White
}
}
}
Column {
TopAppBar(
modifier =
Modifier
.background(
color = MaterialTheme.colors.primary,
).padding(
top =
WindowInsets.statusBars
.asPaddingValues()
.calculateTopPadding(),
),
title = { Text(text = "Html Sample") },
navigationIcon = {
},
)
Box(Modifier.fillMaxSize()) {
WebView(
state = webViewState,
modifier = Modifier.height(205.dp).fillMaxWidth(),
navigator = webViewNavigator,
)
}
}
AlertDialog(
{},
{},
title = { Text("Title") },
text = {
Text("This is Alert Dialog")
}
)
Metadata
Metadata
Assignees
Labels
No labels