Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
View issue level access limits(Press Alt + Right arrow for more information)
Unintended behavior
View staffing
Description
Android Studio Build:#AI-211.7628.21.2111.8139111, built on February 2, 2022
Kotlin version:
Steps to Reproduce:
1.run the code below in MainActivity at onCreate Method, use "setContent{ Test2() }"
2.run the project
3.you will find that your BottomDrawer will open when you run the app, but the code is declared that the BottomDrawer is closed
the code:
@ExperimentalMaterialApi
@Composable
fun Test2() {
val drawerState = rememberBottomDrawerState(initialValue = BottomDrawerValue.Closed)
BottomDrawer(
drawerState = drawerState,
gesturesEnabled = true,
drawerContent = {
ComposeWebView(
url = "
modifier = Modifier.fillMaxWidth()
)
}
) {
}
}
@Composable
private fun ComposeWebView(modifier: Modifier = Modifier, url: String) {
AndroidView(
modifier = modifier,
factory = { context ->
WebView(context).apply {
settings.javaScriptEnabled = true
settings.javaScriptCanOpenWindowsAutomatically = true
settings.domStorageEnabled = true
settings.loadsImagesAutomatically = true
settings.mediaPlaybackRequiresUserGesture = false
settings.allowFileAccess = true
webViewClient = WebViewClient()
loadUrl(url)
}
},
update = { webView ->
webView.loadUrl(url)
}
)
}